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
|
|
|
*/
|
2018-02-03 19:17:37 +01:00
|
|
|
String notifyProductUpdate(ManageProductBean bean) throws Exception;
|
2017-12-07 12:37:21 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Identifier of the record (UUID)
|
|
|
|
* @param id
|
2018-01-23 18:25:16 +01:00
|
|
|
* @return the url of the record
|
2017-12-07 12:37:21 +01:00
|
|
|
* @throws Exception
|
|
|
|
*/
|
2018-01-23 18:25:16 +01:00
|
|
|
String checkIdentifierExists(String id) throws Exception;
|
2017-12-07 12:37:21 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Identifier of the record (UUID)
|
|
|
|
* @param id
|
|
|
|
* @param domain (stock or fishery)
|
2018-01-23 18:25:16 +01:00
|
|
|
* @return the url of the record
|
2017-12-07 12:37:21 +01:00
|
|
|
* @throws Exception
|
|
|
|
*/
|
2018-01-23 18:25:16 +01:00
|
|
|
String checkIdentifierExistsInDomain(String id, String domain) throws Exception;
|
2017-12-07 12:37:21 +01:00
|
|
|
|
2018-02-02 15:28:35 +01:00
|
|
|
/**
|
2018-02-02 17:46:48 +01:00
|
|
|
* Check if the given url for reverting the operation is valid and send the request to the knowledge base
|
2018-02-02 15:28:35 +01:00
|
|
|
* @param url
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
void validateRevertOperation(String url) throws Exception;
|
|
|
|
|
2017-01-26 18:21:33 +01:00
|
|
|
}
|