public class CKANPublisherServicesImpl extends com.google.gwt.user.server.rpc.RemoteServiceServlet implements CKanPublisherService
| Modifier and Type | Field and Description |
|---|---|
static String |
ITEM_URL_FIELD |
static List<String> |
NOT_UPGRADABLE_CUSTOM_FIELDS_PREFIXES |
static String |
RELATED_IDENTIFIER_ZENODO |
static String |
SYS_TYPE |
static String |
SYSTEM_KEY_PREFIX |
static String |
TAGS_VOCABULARY_KEY |
| Constructor and Description |
|---|
CKANPublisherServicesImpl() |
| Modifier and Type | Method and Description |
|---|---|
ResourceElementBean |
addResourceToDataset(ResourceElementBean resource,
String organizationName,
String datasetId)
Adds the resource to dataset.
|
DatasetBean |
buildPartialDatasetBean(String folderId)
Builds the partial dataset bean.
|
static List<org.gcube.portlets.widgets.mpformbuilder.shared.metadata.MetadataFieldWrapper> |
cloneList(List<org.gcube.portlets.widgets.mpformbuilder.shared.metadata.MetadataFieldWrapper> list)
Clone list.
|
DatasetBean |
createCKanDataset(DatasetBean toCreate)
Creates the C kan dataset.
|
boolean |
datasetIdAlreadyExists(String title,
String orgName)
Dataset id already exists.
|
boolean |
deleteItem(DatasetBean datasetBean)
Delete item.
|
boolean |
deleteResourceFromDataset(ResourceElementBean resource)
Delete resource from dataset.
|
void |
fetchProfilesFromCurrentScope()
Fetch profiles from current scope.
|
DatasetBean |
getBasicDatasetBean(String datasetIdOrName)
Gets the basic dataset bean.
|
org.gcube.datacatalogue.utillibrary.server.DataCatalogue |
getCatalogue(String scope)
Retrieve an instance of the library for the scope.
|
DatasetBean |
getDatasetBeanForUpdate(String datasetIdOrName)
Gets the dataset bean for update.
|
List<org.gcube.portlets.widgets.mpformbuilder.shared.license.LicenseBean> |
getLicenses()
Gets the licenses.
|
MetadataProfileBeanForUpdate |
getProfileForUpdate(String orgName,
String datasetType,
String datasedIdOrName)
Gets the profile for update.
|
List<org.gcube.portlets.widgets.mpformbuilder.shared.metadata.MetaDataProfileBean> |
getProfiles(String orgName)
Gets the profiles.
|
String |
getPublicLinkForFileItemId(String itemId,
boolean shortenUrl)
Gets the public link for file item id.
|
static Map<String,List<String>> |
getReserverdSystemFields(Map<String,List<String>> extras)
Gets the reserverd system fields.
|
List<String> |
getTagsForOrganization(String orgName)
Gets the tags for organization.
|
List<OrganizationBean> |
getUserGroups(String orgName)
Gets the user groups.
|
protected org.gcube.common.storagehubwrapper.server.tohl.Workspace |
getWorkspaceFromStorageHub()
Gets the workspace from storage hub.
|
boolean |
isGeoJSONValid(String geoJson)
Checks if is geo JSON valid.
|
Boolean |
isPublisherOwnerOrAdminUser(String datasetIdOrName)
Checks if is publisher owner or admin user.
|
Boolean |
isPublisherUser()
Checks if is publisher user.
|
static boolean |
isWithinPortal()
Online or in development mode?.
|
static Map<String,List<String>> |
purgeSystemFields(Map<String,List<String>> extras)
Purge system fields.
|
DatasetBean |
updateCKANDataset(DatasetBean toUpdate)
Update CKAN dataset.
|
checkPermutationStrongName, doGetSerializationPolicy, getCodeServerPolicyUrl, getRequestModuleBasePath, getSerializationPolicy, init, loadPolicyFromCodeServer, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processCall, processPost, shouldCompressResponsedoPost, doUnexpectedFailure, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContentdoDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, servicepublic static final String TAGS_VOCABULARY_KEY
public static final String ITEM_URL_FIELD
public static final String RELATED_IDENTIFIER_ZENODO
public static final String SYSTEM_KEY_PREFIX
public static final List<String> NOT_UPGRADABLE_CUSTOM_FIELDS_PREFIXES
public static final String SYS_TYPE
public org.gcube.datacatalogue.utillibrary.server.DataCatalogue getCatalogue(String scope)
scope - if it is null it is evaluated from the sessionpublic static boolean isWithinPortal()
protected org.gcube.common.storagehubwrapper.server.tohl.Workspace getWorkspaceFromStorageHub()
throws Exception
Exception - the exceptionpublic List<org.gcube.portlets.widgets.mpformbuilder.shared.license.LicenseBean> getLicenses()
getLicenses in interface CKanPublisherServicepublic DatasetBean buildPartialDatasetBean(String folderId) throws Exception
buildPartialDatasetBean in interface CKanPublisherServicefolderId - the folder idException - the exceptionpublic DatasetBean getBasicDatasetBean(String datasetIdOrName) throws Exception
getBasicDatasetBean in interface CKanPublisherServicedatasetIdOrName - the dataset id or nameException - the exceptionpublic DatasetBean getDatasetBeanForUpdate(String datasetIdOrName) throws Exception
getDatasetBeanForUpdate in interface CKanPublisherServicedatasetIdOrName - the dataset id or nameException - the exceptionpublic List<String> getTagsForOrganization(String orgName) throws Exception
getTagsForOrganization in interface CKanPublisherServiceorgName - the org nameException - the exceptionpublic DatasetBean createCKanDataset(DatasetBean toCreate) throws Exception
createCKanDataset in interface CKanPublisherServicetoCreate - the to createException - the exceptionpublic DatasetBean updateCKANDataset(DatasetBean toUpdate) throws Exception
updateCKANDataset in interface CKanPublisherServicetoUpdate - the to createException - the exceptionpublic ResourceElementBean addResourceToDataset(ResourceElementBean resource, String organizationName, String datasetId) throws Exception
addResourceToDataset in interface CKanPublisherServiceresource - the resourceorganizationName - the organization namedatasetId - the dataset idException - the exceptionpublic boolean deleteResourceFromDataset(ResourceElementBean resource) throws Exception
deleteResourceFromDataset in interface CKanPublisherServiceresource - the resourceException - the exceptionpublic List<org.gcube.portlets.widgets.mpformbuilder.shared.metadata.MetaDataProfileBean> getProfiles(String orgName) throws Exception
getProfiles in interface CKanPublisherServiceorgName - the org nameException - the exceptionpublic void fetchProfilesFromCurrentScope()
throws Exception
fetchProfilesFromCurrentScope in interface CKanPublisherServiceException - the exceptionpublic MetadataProfileBeanForUpdate getProfileForUpdate(String orgName, String datasetType, String datasedIdOrName) throws Exception
getProfileForUpdate in interface CKanPublisherServiceorgName - the org namedatasetType - the dataset typedatasedIdOrName - the datased id or nameException - the exceptionpublic boolean datasetIdAlreadyExists(String title, String orgName) throws Exception
datasetIdAlreadyExists in interface CKanPublisherServicetitle - the titleorgName - the org nameException - the exceptionpublic boolean deleteItem(DatasetBean datasetBean) throws Exception
deleteItem in interface CKanPublisherServicedatasetBean - the dataset beanException - the exceptionpublic List<OrganizationBean> getUserGroups(String orgName)
getUserGroups in interface CKanPublisherServiceorgName - the org namepublic Boolean isPublisherUser() throws Exception
isPublisherUser in interface CKanPublisherServiceException - the exceptionpublic Boolean isPublisherOwnerOrAdminUser(String datasetIdOrName) throws Exception
isPublisherOwnerOrAdminUser in interface CKanPublisherServicedatasetIdOrName - the dataset id or nameException - the exceptionpublic boolean isGeoJSONValid(String geoJson) throws Exception
isGeoJSONValid in interface CKanPublisherServicegeoJson - the geo jsonException - the exceptionpublic static Map<String,List<String>> purgeSystemFields(Map<String,List<String>> extras)
extras - the extraspublic String getPublicLinkForFileItemId(String itemId, boolean shortenUrl) throws Exception
getPublicLinkForFileItemId in interface CKanPublisherServiceitemId - the item idshortenUrl - the shorten urlException - the exceptionpublic static Map<String,List<String>> getReserverdSystemFields(Map<String,List<String>> extras)
extras - the extrasCopyright © 2026. All rights reserved.