2017-01-26 18:21:33 +01:00
|
|
|
package org.gcube.datacatalogue.grsf_manage_widget.client;
|
|
|
|
|
|
|
|
import org.gcube.datacatalogue.grsf_manage_widget.shared.ManageProductBean;
|
|
|
|
|
|
|
|
import com.google.gwt.user.client.rpc.RemoteService;
|
|
|
|
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
|
|
|
|
|
|
|
|
|
|
|
|
@RemoteServiceRelativePath("grsfmanageservice")
|
|
|
|
public interface GRSFManageWidgetService extends RemoteService {
|
|
|
|
|
|
|
|
/**
|
2017-11-09 14:49:07 +01:00
|
|
|
* check if the user has the rights to manage the item
|
2017-01-26 18:21:33 +01:00
|
|
|
*/
|
2017-11-09 14:49:07 +01:00
|
|
|
boolean isAdminUser();
|
|
|
|
|
2017-01-26 18:21:33 +01:00
|
|
|
/**
|
|
|
|
* Get the product bean from the product identifier
|
|
|
|
* @param identifier
|
|
|
|
* @return ManageProductBean
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
ManageProductBean getProductBeanById(String identifier) throws Exception;
|
2017-11-09 14:49:07 +01:00
|
|
|
|
2017-02-16 18:32:19 +01:00
|
|
|
/**
|
2017-11-09 14:49:07 +01:00
|
|
|
* Notify product update
|
2017-02-16 18:32:19 +01:00
|
|
|
*/
|
2017-11-23 20:04:47 +01:00
|
|
|
String notifyProductUpdate(ManageProductBean bean) throws Exception;
|
2017-12-07 12:37:21 +01:00
|
|
|
|
2017-11-23 20:04:47 +01:00
|
|
|
/**
|
|
|
|
* Check that a record with such semantic identifier exists
|
|
|
|
* @param semanticIdentifier
|
|
|
|
* @return true or false
|
|
|
|
*/
|
|
|
|
boolean checkSemanticIdentifierExists(String semanticIdentifier) throws Exception;
|
2017-11-09 14:49:07 +01:00
|
|
|
|
2017-11-23 20:04:47 +01:00
|
|
|
/**
|
|
|
|
* Check that a record with such semantic identifier exists in a given domain
|
|
|
|
* @param semanticIdentifier
|
|
|
|
* @param domain
|
|
|
|
* @return
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
boolean checkSemanticIdentifierExistsInDomain(String semanticIdentifier, String domain) throws Exception;
|
2017-12-07 12:37:21 +01:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Identifier of the record (UUID)
|
|
|
|
* @param id
|
|
|
|
* @return
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
boolean checkIdentifierExists(String id) throws Exception;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Identifier of the record (UUID)
|
|
|
|
* @param id
|
|
|
|
* @param domain (stock or fishery)
|
|
|
|
* @return
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
boolean checkIdentifierExistsInDomain(String id, String domain) throws Exception;
|
|
|
|
|
2017-01-26 18:21:33 +01:00
|
|
|
}
|