2016-06-13 09:48:29 +02:00
|
|
|
package org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client;
|
|
|
|
|
2016-09-27 18:38:33 +02:00
|
|
|
import java.util.List;
|
2016-06-29 16:50:18 +02:00
|
|
|
|
2016-11-21 10:12:24 +01:00
|
|
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.BeanUserInOrgGroupRole;
|
2016-06-23 12:49:45 +02:00
|
|
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanConnectorAccessPoint;
|
2016-06-13 09:48:29 +02:00
|
|
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanRole;
|
2016-11-29 17:20:50 +01:00
|
|
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.ManageProductBean;
|
2016-06-13 09:48:29 +02:00
|
|
|
|
|
|
|
import com.google.gwt.user.client.rpc.RemoteService;
|
|
|
|
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
|
|
|
|
|
2016-11-04 13:01:35 +01:00
|
|
|
|
2016-06-13 09:48:29 +02:00
|
|
|
/**
|
2016-11-04 13:01:35 +01:00
|
|
|
* The Interface GcubeCkanDataCatalogService.
|
2016-06-20 15:22:21 +02:00
|
|
|
*
|
|
|
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
2016-11-04 13:01:35 +01:00
|
|
|
* Nov 4, 2016
|
2016-06-13 09:48:29 +02:00
|
|
|
*/
|
|
|
|
@RemoteServiceRelativePath("ckandatacatalogue")
|
|
|
|
public interface GcubeCkanDataCatalogService extends RemoteService {
|
|
|
|
|
2016-06-20 16:05:58 +02:00
|
|
|
|
2016-09-14 16:42:46 +02:00
|
|
|
/**
|
2016-11-04 13:01:35 +01:00
|
|
|
* Get the ckan connector access point.
|
|
|
|
*
|
|
|
|
* @param pathInfoParameters the path info parameters
|
|
|
|
* @param queryStringParameters the query string parameters
|
|
|
|
* @param currentUrl the current url
|
|
|
|
* @return the c kan connector
|
|
|
|
* @throws Exception the exception
|
2016-09-14 16:42:46 +02:00
|
|
|
*/
|
2016-06-23 12:49:45 +02:00
|
|
|
CkanConnectorAccessPoint getCKanConnector(
|
2016-11-29 17:20:50 +01:00
|
|
|
String pathInfoParameters, String queryStringParameters, String currentUrl) throws Exception;
|
2016-06-20 15:22:21 +02:00
|
|
|
|
2016-09-14 16:42:46 +02:00
|
|
|
/**
|
2016-11-04 13:01:35 +01:00
|
|
|
* Get the current role in CKAN for this user.
|
|
|
|
*
|
|
|
|
* @return the my role
|
|
|
|
* @throws Exception the exception
|
2016-09-14 16:42:46 +02:00
|
|
|
*/
|
2016-06-13 09:48:29 +02:00
|
|
|
CkanRole getMyRole() throws Exception;
|
2016-11-04 13:01:35 +01:00
|
|
|
|
2016-06-29 16:50:18 +02:00
|
|
|
/**
|
2016-11-04 13:01:35 +01:00
|
|
|
* Retrieve the list of organizations to whom the user belongs and their urls.
|
|
|
|
*
|
|
|
|
* @return the ckan organizations names and urls for user
|
2016-06-29 16:50:18 +02:00
|
|
|
*/
|
2016-11-21 10:12:24 +01:00
|
|
|
List<BeanUserInOrgGroupRole> getCkanOrganizationsNamesAndUrlsForUser();
|
2016-11-29 17:20:50 +01:00
|
|
|
|
2016-11-20 22:33:51 +01:00
|
|
|
/**
|
|
|
|
* Retrieve the list of groups to whom the user belongs and their urls.
|
|
|
|
*
|
|
|
|
* @return the ckan groups names and urls for user
|
|
|
|
*/
|
2016-11-21 10:12:24 +01:00
|
|
|
List<BeanUserInOrgGroupRole> getCkanGroupsNamesAndUrlsForUser();
|
2016-06-23 12:49:45 +02:00
|
|
|
|
2016-09-14 16:42:46 +02:00
|
|
|
/**
|
2016-11-04 13:01:35 +01:00
|
|
|
* Logout from ckan.
|
|
|
|
*
|
|
|
|
* @return the string
|
2016-09-14 16:42:46 +02:00
|
|
|
*/
|
2016-11-04 13:01:35 +01:00
|
|
|
String logoutFromCkanURL();
|
2016-06-28 12:45:24 +02:00
|
|
|
|
|
|
|
/**
|
2016-11-04 13:01:35 +01:00
|
|
|
* Remove auth cookie for ckan of this user.
|
|
|
|
*
|
|
|
|
* @return the string
|
2016-06-28 12:45:24 +02:00
|
|
|
*/
|
|
|
|
String logoutURIFromCkan();
|
2016-11-04 13:01:35 +01:00
|
|
|
|
2016-06-29 18:35:01 +02:00
|
|
|
/**
|
2016-11-04 13:01:35 +01:00
|
|
|
* Check if the there is a user logged in.
|
|
|
|
*
|
|
|
|
* @return true, if successful
|
2016-06-29 18:35:01 +02:00
|
|
|
*/
|
|
|
|
boolean outsidePortal();
|
2016-11-29 17:20:50 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Check if the manage product needs to be shown (e.g., for GRSF products)
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
boolean isManageProductEnabled();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Notify product update
|
|
|
|
*/
|
2016-12-10 10:52:38 +01:00
|
|
|
String notifyProductUpdate(ManageProductBean bean);
|
2016-11-29 17:20:50 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the product bean from the product identifier
|
|
|
|
* @param identifier
|
|
|
|
* @return ManageProductBean
|
2016-11-29 18:42:27 +01:00
|
|
|
* @throws Exception
|
2016-11-29 17:20:50 +01:00
|
|
|
*/
|
2016-11-29 18:42:27 +01:00
|
|
|
ManageProductBean getProductBeanById(String identifier) throws Exception;
|
2016-06-13 09:48:29 +02:00
|
|
|
}
|