Interface CKanPublisherService
-
- All Superinterfaces:
com.google.gwt.user.client.rpc.RemoteService
- All Known Implementing Classes:
CKANPublisherServicesImpl
@RemoteServiceRelativePath("ckanservices") public interface CKanPublisherService extends com.google.gwt.user.client.rpc.RemoteServiceCKAN publisher services.- Author:
- Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ResourceElementBeanaddResourceToDataset(ResourceElementBean resource, String datasetId)Add this resource to the dataset whose id is datasetIdDatasetBeancreateCKanDataset(DatasetBean toCreate)Try to create such dataset starting from the information contained into the toCreate bean.booleandatasetIdAlreadyExists(String title, String orgName)Given the title the user wants to give to the new product to create, a check is performed to understand if a dataset with the proposed title (and so the id generated at server side) already existsbooleandeleteResourceFromDataset(ResourceElementBean resource)Delete this resource from the dataset with id datasetIdDatasetBeangetDatasetBean(String folderIdOrFileId)Retrieve a partially filled bean given a folder id/file id and its owner.List<LicenseBean>getLicenses()Retrieve the list of licenses to show to the user.List<MetaDataProfileBean>getProfiles(String orgName)Retrieve the list of profiles for a given organization name .List<String>getTagsForOrganization(String orgName)Get the list of vocabulary tags for this scopeList<OrganizationBean>getUserGroups(String orgName)Retrieve the list of groups the user can choose to associate this product with.booleanisGeoJSONValid(String json)Validate a geo json fieldbooleanisPublisherUser(boolean isWorkspaceRequest)The method checks if the user is a publisher or he/she doesn't have the rights to publish
-
-
-
Method Detail
-
getLicenses
List<LicenseBean> getLicenses()
Retrieve the list of licenses to show to the user.- Returns:
- a LicenseBean on success, null on error.
-
getProfiles
List<MetaDataProfileBean> getProfiles(String orgName) throws Exception
Retrieve the list of profiles for a given organization name .- Returns:
- a List
on success, null on error. - Throws:
Exception
-
getDatasetBean
DatasetBean getDatasetBean(String folderIdOrFileId) throws Exception
Retrieve a partially filled bean given a folder id/file id and its owner.- Parameters:
folderIdOrFileId- the id of the folder of file to publish- Returns:
- Throws:
Exception
-
createCKanDataset
DatasetBean createCKanDataset(DatasetBean toCreate) throws Exception
Try to create such dataset starting from the information contained into the toCreate bean.- Parameters:
toCreate-- Returns:
- the sent bean filled with the needed information
- Throws:
Exception
-
addResourceToDataset
ResourceElementBean addResourceToDataset(ResourceElementBean resource, String datasetId) throws Exception
Add this resource to the dataset whose id is datasetId- Parameters:
resource-datasetId-- Throws:
Exception
-
deleteResourceFromDataset
boolean deleteResourceFromDataset(ResourceElementBean resource) throws Exception
Delete this resource from the dataset with id datasetId- Parameters:
resource-datasetId-- Returns:
- true on success, false otherwise
- Throws:
Exception
-
datasetIdAlreadyExists
boolean datasetIdAlreadyExists(String title, String orgName) throws Exception
Given the title the user wants to give to the new product to create, a check is performed to understand if a dataset with the proposed title (and so the id generated at server side) already exists- Parameters:
title-- Returns:
- true if it exists, false otherwise
- Throws:
Exception
-
getUserGroups
List<OrganizationBean> getUserGroups(String orgName)
Retrieve the list of groups the user can choose to associate this product with.- Parameters:
orgName- retrieve the groups in the context linked to this name. If null, returns the one in the current context.- Returns:
- a list of groups' beans
-
isPublisherUser
boolean isPublisherUser(boolean isWorkspaceRequest) throws ExceptionThe method checks if the user is a publisher or he/she doesn't have the rights to publish- Returns:
- true if he/she can publish, false otherwise
- Throws:
Exception
-
getTagsForOrganization
List<String> getTagsForOrganization(String orgName) throws Exception
Get the list of vocabulary tags for this scope- Parameters:
orgName-- Returns:
- Throws:
Exception
-
-