Class GRSFNotificationService
- 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.datacatalogue.grsf_manage_widget.server.manage.GRSFNotificationService
-
- All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService,com.google.gwt.user.server.rpc.SerializationPolicyProvider,Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig,GRSFManageWidgetService
public class GRSFNotificationService extends com.google.gwt.user.server.rpc.RemoteServiceServlet implements GRSFManageWidgetService
Endpoint for sending update records information to GRSF KnowledgeBase.- Author:
- Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GRSFNotificationService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcheckIdentifierExists(String id)Identifier of the record (UUID)StringcheckIdentifierExistsInDomain(String id, String acceptedDomain)Identifier of the record (UUID)org.gcube.datacatalogue.utillibrary.server.DataCataloguegetCatalogue(String discoverScope)Instanciate the ckan util library.ManageProductBeangetProductBeanById(String productIdentifier, boolean requestForRevertingMerge)Get the product bean from the product identifierbooleanisAdminUser()check if the user has the rights to manage the itemvoidnotifyProductUpdate(ManageProductBean bean)Notify product updateBooleanperformRevertOperation(RevertableOperationInfo rInfo)Perform a revert operationRevertableOperationInfovalidateRevertOperation(String encryptedUrl)Check if the given url for reverting the operation is valid and get back the needed info to proceed-
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 discoverScope) throws Exception
Instanciate the ckan util library. Since it needs the scope, we need to check if it is null or not- Parameters:
discoverScope- if you want to the discover the utils library in this specified scope- Returns:
- DataCatalogue object
- Throws:
Exception
-
getProductBeanById
public ManageProductBean getProductBeanById(String productIdentifier, boolean requestForRevertingMerge) throws Exception
Description copied from interface:GRSFManageWidgetServiceGet the product bean from the product identifier- Specified by:
getProductBeanByIdin interfaceGRSFManageWidgetService- Returns:
- ManageProductBean
- Throws:
Exception
-
isAdminUser
public boolean isAdminUser()
Description copied from interface:GRSFManageWidgetServicecheck if the user has the rights to manage the item- Specified by:
isAdminUserin interfaceGRSFManageWidgetService
-
notifyProductUpdate
public void notifyProductUpdate(ManageProductBean bean) throws Exception
Description copied from interface:GRSFManageWidgetServiceNotify product update- Specified by:
notifyProductUpdatein interfaceGRSFManageWidgetService- Throws:
Exception
-
validateRevertOperation
public RevertableOperationInfo validateRevertOperation(String encryptedUrl) throws Exception
Description copied from interface:GRSFManageWidgetServiceCheck if the given url for reverting the operation is valid and get back the needed info to proceed- Specified by:
validateRevertOperationin interfaceGRSFManageWidgetService- Throws:
Exception
-
performRevertOperation
public Boolean performRevertOperation(RevertableOperationInfo rInfo) throws Exception
Description copied from interface:GRSFManageWidgetServicePerform a revert operation- Specified by:
performRevertOperationin interfaceGRSFManageWidgetService- Returns:
- Throws:
Exception
-
checkIdentifierExists
public String checkIdentifierExists(String id) throws Exception
Description copied from interface:GRSFManageWidgetServiceIdentifier of the record (UUID)- Specified by:
checkIdentifierExistsin interfaceGRSFManageWidgetService- Returns:
- the url of the record
- Throws:
Exception
-
checkIdentifierExistsInDomain
public String checkIdentifierExistsInDomain(String id, String acceptedDomain) throws Exception
Description copied from interface:GRSFManageWidgetServiceIdentifier of the record (UUID)- Specified by:
checkIdentifierExistsInDomainin interfaceGRSFManageWidgetServiceacceptedDomain- (stock or fishery)- Returns:
- the url of the record
- Throws:
Exception
-
-