Class CKANPublisherServicesImpl
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
-
- com.google.gwt.user.server.rpc.RemoteServiceServlet
-
- org.gcube.portlets.widgets.ckandatapublisherwidget.server.CKANPublisherServicesImpl
-
- All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService,com.google.gwt.user.server.rpc.SerializationPolicyProvider,Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig,CKanPublisherService
public class CKANPublisherServicesImpl extends com.google.gwt.user.server.rpc.RemoteServiceServlet implements CKanPublisherService
Server side of the data publisher.- Author:
- Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CKANPublisherServicesImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourceElementBeanaddResourceToDataset(ResourceElementBean resource, String datasetId)Adds the resource to dataset.DatasetBeancreateCKanDataset(DatasetBean toCreate)Creates the C kan dataset.booleandatasetIdAlreadyExists(String title, String orgName)Dataset id already exists.booleandeleteResourceFromDataset(ResourceElementBean resource)Delete resource from dataset.org.gcube.datacatalogue.utillibrary.server.DataCataloguegetCatalogue(String scope)Retrieve an instance of the library for the scope.DatasetBeangetDatasetBean(String folderId)Gets the dataset bean.List<LicenseBean>getLicenses()Gets the licenses.List<MetaDataProfileBean>getProfiles(String orgName)Gets the profiles.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.WorkspacegetWorkspaceFromStorageHub()Gets the workspace from storage hub.booleanisGeoJSONValid(String geoJson)Checks if is geo JSON valid.booleanisPublisherUser(boolean isWorkspaceRequest)Checks if is publisher user.-
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
checkPermutationStrongName, doGetSerializationPolicy, getCodeServerPolicyUrl, getRequestModuleBasePath, getSerializationPolicy, init, loadPolicyFromCodeServer, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processCall, processPost, shouldCompressResponse
-
Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
doPost, doUnexpectedFailure, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContent
-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
-
-
-
-
Method Detail
-
getCatalogue
public org.gcube.datacatalogue.utillibrary.server.DataCatalogue getCatalogue(String scope)
Retrieve an instance of the library for the scope.- Parameters:
scope- if it is null it is evaluated from the session- Returns:
- the catalogue
-
getWorkspaceFromStorageHub
protected org.gcube.common.storagehubwrapper.server.tohl.Workspace getWorkspaceFromStorageHub() throws ExceptionGets the workspace from storage hub.- Returns:
- the workspace from storage hub
- Throws:
Exception- the exception
-
getLicenses
public List<LicenseBean> getLicenses()
Gets the licenses.- Specified by:
getLicensesin interfaceCKanPublisherService- Returns:
- the licenses
-
getDatasetBean
public DatasetBean getDatasetBean(String folderId) throws Exception
Gets the dataset bean.- Specified by:
getDatasetBeanin interfaceCKanPublisherService- Parameters:
folderId- the folder id- Returns:
- the dataset bean
- Throws:
Exception- the exception
-
getTagsForOrganization
public List<String> getTagsForOrganization(String orgName) throws Exception
Gets the tags for organization.- Specified by:
getTagsForOrganizationin interfaceCKanPublisherService- Parameters:
orgName- the org name- Returns:
- the tags for organization
- Throws:
Exception- the exception
-
createCKanDataset
public DatasetBean createCKanDataset(DatasetBean toCreate) throws Exception
Creates the C kan dataset.- Specified by:
createCKanDatasetin interfaceCKanPublisherService- Parameters:
toCreate- the to create- Returns:
- the dataset bean
- Throws:
Exception- the exception
-
addResourceToDataset
public ResourceElementBean addResourceToDataset(ResourceElementBean resource, String datasetId) throws Exception
Adds the resource to dataset.- Specified by:
addResourceToDatasetin interfaceCKanPublisherService- Parameters:
resource- the resourcedatasetId- the dataset id- Returns:
- the resource element bean
- Throws:
Exception- the exception
-
deleteResourceFromDataset
public boolean deleteResourceFromDataset(ResourceElementBean resource) throws Exception
Delete resource from dataset.- Specified by:
deleteResourceFromDatasetin interfaceCKanPublisherService- Parameters:
resource- the resource- Returns:
- true, if successful
- Throws:
Exception- the exception
-
getProfiles
public List<MetaDataProfileBean> getProfiles(String orgName) throws Exception
Gets the profiles.- Specified by:
getProfilesin interfaceCKanPublisherService- Parameters:
orgName- the org name- Returns:
- the profiles
- Throws:
Exception- the exception
-
datasetIdAlreadyExists
public boolean datasetIdAlreadyExists(String title, String orgName) throws Exception
Dataset id already exists.- Specified by:
datasetIdAlreadyExistsin interfaceCKanPublisherService- Parameters:
title- the titleorgName- the org name- Returns:
- true, if successful
- Throws:
Exception- the exception
-
getUserGroups
public List<OrganizationBean> getUserGroups(String orgName)
Gets the user groups.- Specified by:
getUserGroupsin interfaceCKanPublisherService- Parameters:
orgName- the org name- Returns:
- the user groups
-
isPublisherUser
public boolean isPublisherUser(boolean isWorkspaceRequest) throws ExceptionChecks if is publisher user.- Specified by:
isPublisherUserin interfaceCKanPublisherService- Parameters:
isWorkspaceRequest- the is workspace request- Returns:
- true, if is publisher user
- Throws:
Exception- the exception
-
isGeoJSONValid
public boolean isGeoJSONValid(String geoJson) throws Exception
Checks if is geo JSON valid.- Specified by:
isGeoJSONValidin interfaceCKanPublisherService- Parameters:
geoJson- the geo json- Returns:
- true, if is geo JSON valid
- Throws:
Exception- the exception
-
-