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;
|
2018-02-04 17:42:34 +01:00
|
|
|
import org.gcube.datacatalogue.grsf_manage_widget.shared.RevertableOperationInfo;
|
2017-01-26 18:21:33 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
*/
|
2018-02-27 17:13:41 +01:00
|
|
|
ManageProductBean getProductBeanById(String identifier, boolean isRequestForRevertingMerge) 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-05 17:16:14 +01:00
|
|
|
void 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-04 17:42:34 +01:00
|
|
|
* Check if the given url for reverting the operation is valid and get back the needed info to proceed
|
2018-02-02 15:28:35 +01:00
|
|
|
* @param url
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
2018-02-04 17:42:34 +01:00
|
|
|
RevertableOperationInfo validateRevertOperation(String url) throws Exception;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Perform a revert operation
|
|
|
|
* @param rInfo
|
|
|
|
* @return
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
Boolean performRevertOperation(RevertableOperationInfo rInfo) throws Exception;
|
2018-02-02 15:28:35 +01:00
|
|
|
|
2017-01-26 18:21:33 +01:00
|
|
|
}
|