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-09-27 18:38:33 +02:00
|
|
|
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.BeanUserInOrgRole;
|
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;
|
|
|
|
|
|
|
|
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-09-05 18:18:57 +02: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-09-27 18:38:33 +02:00
|
|
|
List<BeanUserInOrgRole> getCkanOrganizationsNamesAndUrlsForUser();
|
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-06-13 09:48:29 +02:00
|
|
|
}
|