public class CKanUtilsImpl extends Object implements CKanUtilsInterface
| Constructor and Description |
|---|
CKanUtilsImpl(String scope) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
finalize() |
String |
findLicenseIdByLicense(String chosenLicense)
Finds the id associated to the chosen license
|
String |
getApiKeyFromUser(String username)
Retrieve the API_KEY given the username .
|
String |
getCatalogueUrl()
Return the ckan catalogue url in this scope.
|
Map<String,List<ROLES_IN_ORGANIZATION>> |
getGroupsAndRolesByUser(String username,
List<ROLES_IN_ORGANIZATION> rolesToMatch)
Given a username and a list of roles to be matched, find the organizations to who the user
belongs and the role(s) he has in them.
|
List<String> |
getLicenseTitles()
Get the list of licenses' titles.
|
List<eu.trentorise.opendata.jackan.model.CkanOrganization> |
getOrganizationsByUser(String username)
Returns the list of organizations to whom the user belongs.
|
List<String> |
getOrganizationsNamesByUser(String username)
Returns the list of organizations' names to whom the user belongs.
|
CKanUserWrapper |
getUserFromApiKey(String apiKey)
Retrieve the user given the API_KEY (the user is retrieved if it is active).
|
public String getApiKeyFromUser(String username)
CKanUtilsInterfacegetApiKeyFromUser in interface CKanUtilsInterfacepublic CKanUserWrapper getUserFromApiKey(String apiKey)
CKanUtilsInterfacegetUserFromApiKey in interface CKanUtilsInterfacepublic List<eu.trentorise.opendata.jackan.model.CkanOrganization> getOrganizationsByUser(String username)
CKanUtilsInterfacegetOrganizationsByUser in interface CKanUtilsInterfacepublic Map<String,List<ROLES_IN_ORGANIZATION>> getGroupsAndRolesByUser(String username, List<ROLES_IN_ORGANIZATION> rolesToMatch)
CKanUtilsInterfacegetGroupsAndRolesByUser in interface CKanUtilsInterfaceprotected void finalize()
throws Throwable
public String getCatalogueUrl()
CKanUtilsInterfacegetCatalogueUrl in interface CKanUtilsInterfacepublic List<String> getOrganizationsNamesByUser(String username)
CKanUtilsInterfacegetOrganizationsNamesByUser in interface CKanUtilsInterfacepublic String findLicenseIdByLicense(String chosenLicense)
CKanUtilsInterfacefindLicenseIdByLicense in interface CKanUtilsInterfacepublic List<String> getLicenseTitles()
CKanUtilsInterfacegetLicenseTitles in interface CKanUtilsInterfaceCopyright © 2016. All Rights Reserved.