added code to speed up connection on ckan, but it is still slow sometimes (vres and role of the user in that vres are sent)

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/gcube-ckan-datacatalog@141795 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2017-01-25 17:30:53 +00:00
parent 7053c761b5
commit c793a06e5b
15 changed files with 158 additions and 193 deletions

View File

@ -22,16 +22,16 @@
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/gcube-ckan-datacatalog-1.2.0-SNAPSHOT/WEB-INF/classes"/> <classpathentry kind="output" path="target/gcube-ckan-datacatalog-1.2.0-SNAPSHOT/WEB-INF/classes"/>
</classpath> </classpath>

View File

@ -1,6 +1,6 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.7 org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error

View File

@ -4,6 +4,9 @@
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/> <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<dependent-module archiveName="ckan-metadata-publisher-widget-1.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/ckan-metadata-publisher-widget/ckan-metadata-publisher-widget">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="context-root" value="gcube-ckan-datacatalog"/> <property name="context-root" value="gcube-ckan-datacatalog"/>
<property name="java-output-path" value="/gcube-ckan-datacatalog/target/gcube-ckan-datacatalog-1.0.0-SNAPSHOT/WEB-INF/classes"/> <property name="java-output-path" value="/gcube-ckan-datacatalog/target/gcube-ckan-datacatalog-1.0.0-SNAPSHOT/WEB-INF/classes"/>
</wb-module> </wb-module>

View File

@ -23,7 +23,7 @@
<distroDirectory>distro</distroDirectory> <distroDirectory>distro</distroDirectory>
<!-- GWT needs at least java 1.6 --> <!-- GWT needs at least java 1.6 -->
<maven.compiler.source>1.7</maven.compiler.source> <maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory> <webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
@ -215,7 +215,7 @@
<version>2.3.2</version> <version>2.3.2</version>
<configuration> <configuration>
<source>1.7</source> <source>1.7</source>
<target>1.7</target> <target>1.8</target>
</configuration> </configuration>
</plugin> </plugin>
<!-- SA Plugin --> <!-- SA Plugin -->

View File

@ -21,7 +21,8 @@
<!-- Inherits widget --> <!-- Inherits widget -->
<inherits <inherits
name='org.gcube.portlets.widgets.ckandatapublisherwidget.CKanMetadataPublisher' /> name='org.gcube.portlets.widgets.ckandatapublisherwidget.CKanMetadataPublisher' />
<inherits
name='org.gcube.datacatalogue.ckanutillibrary.CkanUtilLibrary' />
<inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' /> <inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
<!-- Specify the paths for translatable code --> <!-- Specify the paths for translatable code -->

View File

@ -2,9 +2,9 @@ package org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client;
import java.util.List; import java.util.List;
import org.gcube.datacatalogue.ckanutillibrary.shared.RolesCkanGroupOrOrg;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.BeanUserInOrgGroupRole; import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.BeanUserInOrgGroupRole;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanConnectorAccessPoint; import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanConnectorAccessPoint;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanRole;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.ManageProductBean; import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.ManageProductBean;
import com.google.gwt.user.client.rpc.RemoteService; import com.google.gwt.user.client.rpc.RemoteService;
@ -26,12 +26,11 @@ public interface GcubeCkanDataCatalogService extends RemoteService {
* *
* @param pathInfoParameters the path info parameters * @param pathInfoParameters the path info parameters
* @param queryStringParameters the query string parameters * @param queryStringParameters the query string parameters
* @param currentUrl the current url
* @return the c kan connector * @return the c kan connector
* @throws Exception the exception * @throws Exception the exception
*/ */
CkanConnectorAccessPoint getCKanConnector( CkanConnectorAccessPoint getCKanConnector(
String pathInfoParameters, String queryStringParameters, String currentUrl) throws Exception; String pathInfoParameters, String queryStringParameters) throws Exception;
/** /**
* Get the current role in CKAN for this user. * Get the current role in CKAN for this user.
@ -39,7 +38,7 @@ public interface GcubeCkanDataCatalogService extends RemoteService {
* @return the my role * @return the my role
* @throws Exception the exception * @throws Exception the exception
*/ */
CkanRole getMyRole() throws Exception; RolesCkanGroupOrOrg getMyRole() throws Exception;
/** /**
* Retrieve the list of organizations to whom the user belongs and their urls. * Retrieve the list of organizations to whom the user belongs and their urls.

View File

@ -5,9 +5,9 @@ package org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client;
import java.util.List; import java.util.List;
import org.gcube.datacatalogue.ckanutillibrary.shared.RolesCkanGroupOrOrg;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.BeanUserInOrgGroupRole; import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.BeanUserInOrgGroupRole;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanConnectorAccessPoint; import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanConnectorAccessPoint;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanRole;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.ManageProductBean; import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.ManageProductBean;
import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.rpc.AsyncCallback;
@ -28,19 +28,18 @@ public interface GcubeCkanDataCatalogServiceAsync {
* @param callback the callback * @param callback the callback
* @return the my role * @return the my role
*/ */
void getMyRole(AsyncCallback<CkanRole> callback); void getMyRole(AsyncCallback<RolesCkanGroupOrOrg> callback);
/** /**
* Gets the c kan connector. * Gets the c kan connector.
* *
* @param pathInfoParameters the path info parameters * @param pathInfoParameters the path info parameters
* @param queryStringParameters the query string parameters * @param queryStringParameters the query string parameters
* @param currentUrl the current url
* @param callback the callback * @param callback the callback
* @return the c kan connector * @return the c kan connector
*/ */
void getCKanConnector( void getCKanConnector(
String pathInfoParameters, String queryStringParameters, String currentUrl, String pathInfoParameters, String queryStringParameters,
AsyncCallback<CkanConnectorAccessPoint> callback); AsyncCallback<CkanConnectorAccessPoint> callback);
/** /**

View File

@ -8,11 +8,11 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.gcube.datacatalogue.ckanutillibrary.shared.RolesCkanGroupOrOrg;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.GCubeCkanDataCatalog; import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.GCubeCkanDataCatalog;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.resource.CkanPortletResources; import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.resource.CkanPortletResources;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.BeanUserInOrgGroupRole; import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.BeanUserInOrgGroupRole;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanConnectorAccessPoint; import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanConnectorAccessPoint;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanRole;
import com.google.gwt.core.client.GWT; import com.google.gwt.core.client.GWT;
import com.google.gwt.event.logical.shared.ResizeEvent; import com.google.gwt.event.logical.shared.ResizeEvent;
@ -85,10 +85,9 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
String pathParameter = paramsMap.get(GCubeCkanDataCatalog.GET_PATH_PARAMETER); //Window.Location.getParameter(GCubeCkanDataCatalog.GET_PATH_PARAMETER); String pathParameter = paramsMap.get(GCubeCkanDataCatalog.GET_PATH_PARAMETER); //Window.Location.getParameter(GCubeCkanDataCatalog.GET_PATH_PARAMETER);
String queryParameter = paramsMap.get(GCubeCkanDataCatalog.GET_QUERY_PARAMETER);// Window.Location.getParameter(GCubeCkanDataCatalog.GET_QUERY_PARAMETER); String queryParameter = paramsMap.get(GCubeCkanDataCatalog.GET_QUERY_PARAMETER);// Window.Location.getParameter(GCubeCkanDataCatalog.GET_QUERY_PARAMETER);
String currentPortletUrl = Window.Location.getHref().split("\\?")[0];// ignore get parameters
GCubeCkanDataCatalog.service.getCKanConnector( GCubeCkanDataCatalog.service.getCKanConnector(
pathParameter, queryParameter, currentPortletUrl, pathParameter, queryParameter,
new AsyncCallback<CkanConnectorAccessPoint>() { new AsyncCallback<CkanConnectorAccessPoint>() {
@Override @Override
@ -131,7 +130,7 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
}); });
// MANAGE CKAN MANAGEMENT PANEL ACCORDING TO MY ROLE // MANAGE CKAN MANAGEMENT PANEL ACCORDING TO MY ROLE
GCubeCkanDataCatalog.service.getMyRole(new AsyncCallback<CkanRole>() { GCubeCkanDataCatalog.service.getMyRole(new AsyncCallback<RolesCkanGroupOrOrg>() {
@Override @Override
public void onFailure(Throwable caught) { public void onFailure(Throwable caught) {
@ -139,7 +138,7 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
} }
@Override @Override
public void onSuccess(CkanRole result) { public void onSuccess(RolesCkanGroupOrOrg result) {
switch (result) { switch (result) {
case ADMIN: case ADMIN:
showEditInsertButtons(true); showEditInsertButtons(true);
@ -155,44 +154,38 @@ public class GCubeCkanDataCatalogPanel extends BaseViewTemplate {
break; break;
} }
// retrieve organizations
GCubeCkanDataCatalog.service.getCkanOrganizationsNamesAndUrlsForUser(new AsyncCallback<List<BeanUserInOrgGroupRole>>() {
@Override
public void onSuccess(List<BeanUserInOrgGroupRole> result) {
ckanOrganizationsPanel.setOrganizations(result);
}
@Override
public void onFailure(Throwable caught) {
// an error message will be displayed
ckanOrganizationsPanel.setOrganizations(null);
}
});
// retrieve groups
GCubeCkanDataCatalog.service.getCkanGroupsNamesAndUrlsForUser(new AsyncCallback<List<BeanUserInOrgGroupRole>>() {
@Override
public void onSuccess(List<BeanUserInOrgGroupRole> result) {
ckanGroupsPanel.setGroups(result);
}
@Override
public void onFailure(Throwable caught) {
ckanGroupsPanel.setGroups(null);
}
});
} }
}); });
// retrieve organizations
GCubeCkanDataCatalog.service.getCkanOrganizationsNamesAndUrlsForUser(new AsyncCallback<List<BeanUserInOrgGroupRole>>() {
@Override
public void onSuccess(List<BeanUserInOrgGroupRole> result) {
ckanOrganizationsPanel.setOrganizations(result);
}
@Override
public void onFailure(Throwable caught) {
// an error message will be displayed
ckanOrganizationsPanel.setOrganizations(null);
}
});
// retrieve groups
GCubeCkanDataCatalog.service.getCkanGroupsNamesAndUrlsForUser(new AsyncCallback<List<BeanUserInOrgGroupRole>>() {
@Override
public void onSuccess(List<BeanUserInOrgGroupRole> result) {
ckanGroupsPanel.setGroups(result);
}
@Override
public void onFailure(Throwable caught) {
ckanGroupsPanel.setGroups(null);
}
});
} }
} }

View File

@ -12,20 +12,20 @@ import org.apache.commons.codec.binary.Base64;
import org.gcube.common.authorization.client.exceptions.ObjectNotFound; import org.gcube.common.authorization.client.exceptions.ObjectNotFound;
import org.gcube.common.authorization.library.provider.UserInfo; import org.gcube.common.authorization.library.provider.UserInfo;
import org.gcube.common.portal.PortalContext; import org.gcube.common.portal.PortalContext;
import org.gcube.datacatalogue.ckanutillibrary.DataCatalogue; import org.gcube.datacatalogue.ckanutillibrary.server.DataCatalogue;
import org.gcube.datacatalogue.ckanutillibrary.DataCatalogueFactory; import org.gcube.datacatalogue.ckanutillibrary.server.DataCatalogueFactory;
import org.gcube.datacatalogue.ckanutillibrary.utils.SessionCatalogueAttributes; import org.gcube.datacatalogue.ckanutillibrary.server.utils.SessionCatalogueAttributes;
import org.gcube.datacatalogue.ckanutillibrary.utils.UtilMethods; import org.gcube.datacatalogue.ckanutillibrary.server.utils.UtilMethods;
import org.gcube.portlets.widgets.ckandatapublisherwidget.shared.GroupBean; import org.gcube.datacatalogue.ckanutillibrary.shared.RolesCkanGroupOrOrg;
import org.gcube.portlets.widgets.ckandatapublisherwidget.shared.OrganizationBean;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.GcubeCkanDataCatalogService; import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.GcubeCkanDataCatalogService;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.server.manage.GRSFNotificationService; import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.server.manage.GRSFNotificationService;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.BeanUserInOrgGroupRole; import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.BeanUserInOrgGroupRole;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanConnectorAccessPoint; import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanConnectorAccessPoint;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanRole;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.GRSFStatus; import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.GRSFStatus;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.ManageProductBean; import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.ManageProductBean;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.ex.NoGRSFRecordException; import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.ex.NoGRSFRecordException;
import org.gcube.portlets.widgets.ckandatapublisherwidget.shared.GroupBean;
import org.gcube.portlets.widgets.ckandatapublisherwidget.shared.OrganizationBean;
import org.gcube.vomanagement.usermanagement.GroupManager; import org.gcube.vomanagement.usermanagement.GroupManager;
import org.gcube.vomanagement.usermanagement.impl.LiferayGroupManager; import org.gcube.vomanagement.usermanagement.impl.LiferayGroupManager;
import org.gcube.vomanagement.usermanagement.impl.LiferayRoleManager; import org.gcube.vomanagement.usermanagement.impl.LiferayRoleManager;
@ -67,7 +67,7 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
* @return * @return
*/ */
public DataCatalogue getCatalogue(String discoverScope){ public DataCatalogue getCatalogue(String discoverScope){
String currentScope = SessionUtil.getCurrentContext(getThreadLocalRequest(), false); String currentScope = SessionUtil.getCurrentContext(getThreadLocalRequest(), false);
DataCatalogue instance = null; DataCatalogue instance = null;
try{ try{
String scopeInWhichDiscover = discoverScope != null && !discoverScope.isEmpty() ? discoverScope : currentScope; String scopeInWhichDiscover = discoverScope != null && !discoverScope.isEmpty() ? discoverScope : currentScope;
@ -83,8 +83,8 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
* @see org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.GcubeCkanDataCatalogService#getCKanConnector(java.lang.String, java.lang.String) * @see org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.GcubeCkanDataCatalogService#getCKanConnector(java.lang.String, java.lang.String)
*/ */
@Override @Override
public CkanConnectorAccessPoint getCKanConnector(String pathInfoParameter, String queryStringParameters, String currentPortletUrl) throws Exception { public CkanConnectorAccessPoint getCKanConnector(String pathInfoParameter, String queryStringParameters) throws Exception {
logger.info("getCKanConnector [pathInfo: "+pathInfoParameter + ", query: "+queryStringParameters+"], current url is " + currentPortletUrl); logger.info("getCKanConnector [pathInfo: "+pathInfoParameter + ", query: "+queryStringParameters+"]");
try{ try{
// just get the current scope and set it into ScopeProvider... // just get the current scope and set it into ScopeProvider...
@ -167,8 +167,8 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
} }
// retrieve the list of VREs to whom the user belongs // retrieve the list of VREs to whom the user belongs
List<String> listVres = UserUtil.getListVreForUser(SessionUtil.getCurrentUser(getThreadLocalRequest()).getEmail()); Map<String, String> roleForVre = UserUtil.getVreRoleForUser(SessionUtil.getCurrentUser(getThreadLocalRequest()).getEmail(), scopePerCurrentUrl);
ckan.addListOfVREs(listVres); ckan.addListOfVREs(roleForVre);
return ckan; return ckan;
} }
@ -201,14 +201,14 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
* @see org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.GcubeCkanDataCatalogService#getMyRole() * @see org.gcube.portlets.gcubeckan.gcubeckandatacatalog.client.GcubeCkanDataCatalogService#getMyRole()
*/ */
@Override @Override
public CkanRole getMyRole(){ public RolesCkanGroupOrOrg getMyRole(){
// base role as default value // base role as default value
CkanRole toReturn = CkanRole.MEMBER; RolesCkanGroupOrOrg toReturn = RolesCkanGroupOrOrg.MEMBER;
if(!SessionUtil.isIntoPortal()){ if(!SessionUtil.isIntoPortal()){
logger.warn("OUT FROM PORTAL DETECTED RETURNING ROLE: "+CkanRole.ADMIN); logger.warn("OUT FROM PORTAL DETECTED RETURNING ROLE: "+RolesCkanGroupOrOrg.ADMIN);
toReturn = CkanRole.ADMIN; toReturn = RolesCkanGroupOrOrg.ADMIN;
}else{ }else{
HttpSession httpSession = this.getThreadLocalRequest().getSession(); HttpSession httpSession = this.getThreadLocalRequest().getSession();
@ -225,7 +225,7 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
// check into session // check into session
if(httpSession.getAttribute(keyPerScopeRole) != null){ if(httpSession.getAttribute(keyPerScopeRole) != null){
toReturn = (CkanRole)httpSession.getAttribute(keyPerScopeRole); toReturn = (RolesCkanGroupOrOrg)httpSession.getAttribute(keyPerScopeRole);
logger.info("Found user role into session " + toReturn + " and it is going to be returned for user " + username); logger.info("Found user role into session " + toReturn + " and it is going to be returned for user " + username);
}else{ }else{
@ -245,7 +245,7 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
// if he is an admin/editor preload: // if he is an admin/editor preload:
// 1) organizations in which he can publish (the widget will find these info in session) // 1) organizations in which he can publish (the widget will find these info in session)
// 2) the list of groups // 2) the list of groups
if(toReturn.equals(CkanRole.ADMIN) || toReturn.equals(CkanRole.EDITOR)){ if(!toReturn.equals(RolesCkanGroupOrOrg.MEMBER)){
httpSession.setAttribute(keyPerScopeOrganizations, orgsInWhichAtLeastEditorRole); httpSession.setAttribute(keyPerScopeOrganizations, orgsInWhichAtLeastEditorRole);
httpSession.setAttribute(keyPerScopeGroups, fetchUserGroups(scopePerCurrentUrl, username)); httpSession.setAttribute(keyPerScopeGroups, fetchUserGroups(scopePerCurrentUrl, username));
} }
@ -414,7 +414,7 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
if(!SessionUtil.isIntoPortal()){ if(!SessionUtil.isIntoPortal()){
logger.warn("You are not into the portal"); logger.warn("You are not into the portal");
BeanUserInOrgGroupRole org = new BeanUserInOrgGroupRole("testVRE", "/organization/devvre", CkanRole.ADMIN); BeanUserInOrgGroupRole org = new BeanUserInOrgGroupRole("testVRE", "/organization/devvre", RolesCkanGroupOrOrg.ADMIN);
toReturn.add(org); toReturn.add(org);
}else{ }else{
@ -437,7 +437,7 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
String apiKey = catalogue.getApiKeyFromUsername(username); String apiKey = catalogue.getApiKeyFromUsername(username);
for (CkanOrganization ckanOrganization : organizations) { for (CkanOrganization ckanOrganization : organizations) {
String role = catalogue.getRoleOfUserInOrganization(username, ckanOrganization.getName(), apiKey); String role = catalogue.getRoleOfUserInOrganization(username, ckanOrganization.getName(), apiKey);
BeanUserInOrgGroupRole org = new BeanUserInOrgGroupRole(ckanOrganization.getTitle(), "/organization/" + ckanOrganization.getName(), CkanRole.valueOf(role.toUpperCase())); BeanUserInOrgGroupRole org = new BeanUserInOrgGroupRole(ckanOrganization.getTitle(), "/organization/" + ckanOrganization.getName(), RolesCkanGroupOrOrg.valueOf(role.toUpperCase()));
toReturn.add(org); toReturn.add(org);
} }
logger.debug("List of organizations to return for user " + username + " is " + toReturn); logger.debug("List of organizations to return for user " + username + " is " + toReturn);
@ -457,7 +457,7 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
if(!SessionUtil.isIntoPortal()){ if(!SessionUtil.isIntoPortal()){
logger.warn("You are not into the portal"); logger.warn("You are not into the portal");
BeanUserInOrgGroupRole org = new BeanUserInOrgGroupRole("testGroup", "/group/testgroup", CkanRole.MEMBER); BeanUserInOrgGroupRole org = new BeanUserInOrgGroupRole("testGroup", "/group/testgroup", RolesCkanGroupOrOrg.MEMBER);
toReturn.add(org); toReturn.add(org);
}else{ }else{
@ -480,7 +480,7 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
String apiKey = catalogue.getApiKeyFromUsername(username); String apiKey = catalogue.getApiKeyFromUsername(username);
for (CkanGroup ckanGroup : groups) { for (CkanGroup ckanGroup : groups) {
String role = catalogue.getRoleOfUserInGroup(username, ckanGroup.getName(), apiKey); String role = catalogue.getRoleOfUserInGroup(username, ckanGroup.getName(), apiKey);
BeanUserInOrgGroupRole org = new BeanUserInOrgGroupRole(ckanGroup.getTitle(), "/group/" + ckanGroup.getName(), CkanRole.valueOf(role.toUpperCase())); BeanUserInOrgGroupRole org = new BeanUserInOrgGroupRole(ckanGroup.getTitle(), "/group/" + ckanGroup.getName(), RolesCkanGroupOrOrg.valueOf(role.toUpperCase()));
toReturn.add(org); toReturn.add(org);
} }
logger.debug("List of groups to return for user " + username + " is " + toReturn); logger.debug("List of groups to return for user " + username + " is " + toReturn);

View File

@ -8,7 +8,7 @@ import javax.servlet.http.HttpSession;
import org.gcube.common.portal.PortalContext; import org.gcube.common.portal.PortalContext;
import org.gcube.common.scope.api.ScopeProvider; import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.datacatalogue.ckanutillibrary.ApplicationProfileScopePerUrlReader; import org.gcube.datacatalogue.ckanutillibrary.server.ApplicationProfileScopePerUrlReader;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanConnectorAccessPoint; import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanConnectorAccessPoint;
import org.gcube.vomanagement.usermanagement.GroupManager; import org.gcube.vomanagement.usermanagement.GroupManager;
import org.gcube.vomanagement.usermanagement.exception.GroupRetrievalFault; import org.gcube.vomanagement.usermanagement.exception.GroupRetrievalFault;
@ -16,8 +16,6 @@ import org.gcube.vomanagement.usermanagement.exception.UserManagementSystemExcep
import org.gcube.vomanagement.usermanagement.impl.LiferayGroupManager; import org.gcube.vomanagement.usermanagement.impl.LiferayGroupManager;
import org.gcube.vomanagement.usermanagement.model.GCubeGroup; import org.gcube.vomanagement.usermanagement.model.GCubeGroup;
import org.gcube.vomanagement.usermanagement.model.GCubeUser; import org.gcube.vomanagement.usermanagement.model.GCubeUser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.log.LogFactoryUtil;

View File

@ -3,13 +3,14 @@
*/ */
package org.gcube.portlets.gcubeckan.gcubeckandatacatalog.server; package org.gcube.portlets.gcubeckan.gcubeckandatacatalog.server;
import java.util.ArrayList; import java.util.HashMap;
import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map;
import org.gcube.datacatalogue.ckanutillibrary.DataCatalogue; import org.gcube.datacatalogue.ckanutillibrary.server.DataCatalogue;
import org.gcube.datacatalogue.ckanutillibrary.models.RolesCkanGroupOrOrg; import org.gcube.datacatalogue.ckanutillibrary.shared.RolesCkanGroupOrOrg;
import org.gcube.portlets.widgets.ckandatapublisherwidget.shared.OrganizationBean; import org.gcube.portlets.widgets.ckandatapublisherwidget.shared.OrganizationBean;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.CkanRole;
import org.gcube.vomanagement.usermanagement.GroupManager; import org.gcube.vomanagement.usermanagement.GroupManager;
import org.gcube.vomanagement.usermanagement.RoleManager; import org.gcube.vomanagement.usermanagement.RoleManager;
import org.gcube.vomanagement.usermanagement.UserManager; import org.gcube.vomanagement.usermanagement.UserManager;
@ -40,73 +41,76 @@ public class UserUtil {
//private static Logger logger = LoggerFactory.getLogger(UserUtil.class); //private static Logger logger = LoggerFactory.getLogger(UserUtil.class);
private static final Log logger = LogFactoryUtil.getLog(UserUtil.class); private static final Log logger = LogFactoryUtil.getLog(UserUtil.class);
private static final String SOBIGDATA_VO_CONTEXT = "/d4science.research-infrastructures.eu/SoBigData";
/** /**
* Gets the list vre for user. * Gets the list vre for user and the role the user has in them.
* retrieve the groups to whom a given user belongs (given the user EMail) * retrieve the groups to whom a given user belongs (given the user EMail)
*
* @param userEMail the user e mail * @param userEMail the user e mail
* @return the list vre for user * @return the list vre for user
*/ */
public static List<String> getListVreForUser(String userEMail){ public static Map<String, String> getVreRoleForUser(String userEMail, String context){
// Instanciate the manager
GroupManager groupManager = new LiferayGroupManager(); GroupManager groupManager = new LiferayGroupManager();
// Instanciate the manager
UserManager userManager = new LiferayUserManager(); UserManager userManager = new LiferayUserManager();
RoleManager roleManager = new LiferayRoleManager();
Map<String, String> mapRoleByGroup = new HashMap<String, String>();
GCubeUser user; GCubeUser user;
try { try {
user = userManager.getUserByEmail(userEMail); user = userManager.getUserByEmail(userEMail);
// retrieve the groups to whom a given user belongs (given the user identifier)
List<GCubeGroup> listOfGroups = groupManager.listGroupsByUser(user.getUserId()); List<GCubeGroup> listOfGroups = groupManager.listGroupsByUser(user.getUserId());
logger.info("List of VREs for "+userEMail+ " is/are: "+listOfGroups.size());
List<String> vreNames = new ArrayList<String>(listOfGroups.size());
boolean containsSoBigDataVRE = false; // filter according the current context: if it is a VO/VRE, we send all the VRES under the VO. If it is the root vo, we send all user's vres.
for (GCubeGroup gCubeGroup : listOfGroups) { long groupIdContext = groupManager.getGroupIdFromInfrastructureScope(context);
vreNames.add(gCubeGroup.getGroupName()); GCubeGroup groupContext = groupManager.getGroup(groupIdContext);
Iterator<GCubeGroup> iterator = listOfGroups.iterator();
if(groupManager.isVRE(groupIdContext)){
// in case of sobigdata vres (under the SoBigData VO) we need to let users access all the sobigdata organizations in ckan long parentId = groupContext.getParentGroupId();
// The VO scope is "/d4science.research-infrastructures.eu/SoBigData"
// This code will work only if all the sobigdata organizations are on the same ckan, of course while (iterator.hasNext()) {
if(!containsSoBigDataVRE) GCubeGroup gCubeGroup = (GCubeGroup) iterator.next();
if(gCubeGroup.getParentGroupId() != -1 && SOBIGDATA_VO_CONTEXT.equals(groupManager.getInfrastructureScope(gCubeGroup.getParentGroupId()))) if(gCubeGroup.getParentGroupId() != parentId)
containsSoBigDataVRE = true; iterator.remove();
}
}else if(groupManager.isVO(groupIdContext)){
// get the list of vres
while (iterator.hasNext()) {
GCubeGroup gCubeGroup = (GCubeGroup) iterator.next();
if(groupIdContext != gCubeGroup.getParentGroupId())
iterator.remove();
}
}else{
// only the vres
while (iterator.hasNext()) {
GCubeGroup gCubeGroup = (GCubeGroup) iterator.next();
if(!groupManager.isVRE(gCubeGroup.getGroupId()))
iterator.remove();
}
} }
// check if we need to add also sobigdata vres // retrieve the role
if(containsSoBigDataVRE) for (GCubeGroup vre: listOfGroups) {
addSoBigDataVREs(groupManager, vreNames);
logger.debug("Returning VRE names: "+vreNames); mapRoleByGroup.put(vre.getGroupName().toLowerCase(),
return vreNames; RolesCkanGroupOrOrg.convertToCkanCapacity(getLiferayHighestRoleInOrg(roleManager.listRolesByUserAndGroup(user.getUserId(), vre.getGroupId()))));
}
logger.debug("Returning Map : " + mapRoleByGroup);
return mapRoleByGroup;
}catch (UserManagementSystemException | UserRetrievalFault | GroupRetrievalFault e) { }catch (UserManagementSystemException | UserRetrievalFault | GroupRetrievalFault e) {
logger.error("An error occurred during get list of VREs for user: "+userEMail, e); logger.error("An error occurred during get list of VREs for user: "+userEMail, e);
return null; return null;
} }
} }
/**
* Fetch (if needed) the groups' names of the vres under sobigdata
* @param groupManager
* @param vreNames
*/
private static void addSoBigDataVREs(GroupManager groupManager, List<String> vreNames){
try{
// fetch all sobigdata contexts
GCubeGroup sobigdataVO = groupManager.getGroup(groupManager.getGroupIdFromInfrastructureScope(SOBIGDATA_VO_CONTEXT));
List<GCubeGroup> children = sobigdataVO.getChildren();
for (GCubeGroup gcubeSobigDataChild : children) {
vreNames.add(gcubeSobigDataChild.getGroupName());
}
}catch(Exception e){
logger.error("Unable to retrieve SoBigData vres", e);
}
}
/** /**
* Retrieve the highest ckan role the user has and also retrieve the list of organizations (scopes) in which the user has the ckan-admin or ckan-editor role * Retrieve the highest ckan role the user has and also retrieve the list of organizations (scopes) in which the user has the ckan-admin or ckan-editor role
@ -117,10 +121,10 @@ public class UserUtil {
* @param orgsInWhichAdminRole * @param orgsInWhichAdminRole
* @param ckanUtils ckanUtils * @param ckanUtils ckanUtils
*/ */
public static CkanRole getHighestRole(String currentScope, String username, String groupName, GcubeCkanDataCatalogServiceImpl gcubeCkanDataCatalogServiceImpl, List<OrganizationBean> orgsInWhichAtLeastEditorRole){ public static RolesCkanGroupOrOrg getHighestRole(String currentScope, String username, String groupName, GcubeCkanDataCatalogServiceImpl gcubeCkanDataCatalogServiceImpl, List<OrganizationBean> orgsInWhichAtLeastEditorRole){
// base role as default value // base role as default value
CkanRole toReturn = CkanRole.MEMBER; RolesCkanGroupOrOrg toReturn = RolesCkanGroupOrOrg.MEMBER;
try{ try{
@ -159,12 +163,12 @@ public class UserUtil {
checkIfRoleIsSetInCkanInstance(username, gCubeGroupName, gCubeGroup.getGroupId(), checkIfRoleIsSetInCkanInstance(username, gCubeGroupName, gCubeGroup.getGroupId(),
correspondentRoleToCheck, groupManager, gcubeCkanDataCatalogServiceImpl, orgsInWhichAtLeastEditorRole); correspondentRoleToCheck, groupManager, gcubeCkanDataCatalogServiceImpl, orgsInWhichAtLeastEditorRole);
if(toReturn.equals(CkanRole.ADMIN)) if(toReturn.equals(RolesCkanGroupOrOrg.ADMIN))
continue; continue;
else if(toReturn.equals(CkanRole.EDITOR) && correspondentRoleToCheck.equals(RolesCkanGroupOrOrg.ADMIN)) else if(toReturn.equals(RolesCkanGroupOrOrg.EDITOR) && correspondentRoleToCheck.equals(RolesCkanGroupOrOrg.ADMIN))
toReturn = CkanRole.ADMIN; toReturn = RolesCkanGroupOrOrg.ADMIN;
else // it was MEMBER else // it was MEMBER
toReturn = mapRolesCkanGroupOrOrgToCkanRole(correspondentRoleToCheck); toReturn = correspondentRoleToCheck;
} }
@ -189,12 +193,12 @@ public class UserUtil {
checkIfRoleIsSetInCkanInstance(username, gCubeGroupName, gCubeGroup.getGroupId(), checkIfRoleIsSetInCkanInstance(username, gCubeGroupName, gCubeGroup.getGroupId(),
correspondentRoleToCheck, groupManager, gcubeCkanDataCatalogServiceImpl, orgsInWhichAtLeastEditorRole); correspondentRoleToCheck, groupManager, gcubeCkanDataCatalogServiceImpl, orgsInWhichAtLeastEditorRole);
if(toReturn.equals(CkanRole.ADMIN)) if(toReturn.equals(RolesCkanGroupOrOrg.ADMIN))
continue; continue;
else if(toReturn.equals(CkanRole.EDITOR) && correspondentRoleToCheck.equals(RolesCkanGroupOrOrg.ADMIN)) else if(toReturn.equals(RolesCkanGroupOrOrg.EDITOR) && correspondentRoleToCheck.equals(RolesCkanGroupOrOrg.ADMIN))
toReturn = CkanRole.ADMIN; toReturn = RolesCkanGroupOrOrg.ADMIN;
else else
toReturn = mapRolesCkanGroupOrOrgToCkanRole(correspondentRoleToCheck); toReturn = correspondentRoleToCheck;
} }
}else if(groupManager.isVRE(currentGroupId)){ }else if(groupManager.isVRE(currentGroupId)){
@ -209,12 +213,12 @@ public class UserUtil {
checkIfRoleIsSetInCkanInstance(username, groupName, currentGroupId, checkIfRoleIsSetInCkanInstance(username, groupName, currentGroupId,
correspondentRoleToCheck, groupManager, gcubeCkanDataCatalogServiceImpl, orgsInWhichAtLeastEditorRole); correspondentRoleToCheck, groupManager, gcubeCkanDataCatalogServiceImpl, orgsInWhichAtLeastEditorRole);
toReturn = mapRolesCkanGroupOrOrgToCkanRole(correspondentRoleToCheck); toReturn = correspondentRoleToCheck;
} }
}catch(Exception e){ }catch(Exception e){
logger.error("Unable to retrieve the role information for this user. Returning member role", e); logger.error("Unable to retrieve the role information for this user. Returning member role", e);
return CkanRole.MEMBER; return RolesCkanGroupOrOrg.MEMBER;
} }
// return the role // return the role
@ -281,21 +285,4 @@ public class UserUtil {
} }
return RolesCkanGroupOrOrg.MEMBER; return RolesCkanGroupOrOrg.MEMBER;
} }
/**
* Return the correspondent CkanRole
* @param correspondentRoleToCheck
* @return
*/
private static CkanRole mapRolesCkanGroupOrOrgToCkanRole(
RolesCkanGroupOrOrg correspondentRoleToCheck) {
switch(correspondentRoleToCheck){
case ADMIN: return CkanRole.ADMIN;
case EDITOR: return CkanRole.EDITOR;
case MEMBER: return CkanRole.MEMBER;
default:return null;
}
}
} }

View File

@ -11,8 +11,7 @@ import java.util.List;
import org.gcube.common.resources.gcore.ServiceEndpoint; import org.gcube.common.resources.gcore.ServiceEndpoint;
import org.gcube.common.resources.gcore.ServiceEndpoint.AccessPoint; import org.gcube.common.resources.gcore.ServiceEndpoint.AccessPoint;
import org.gcube.common.scope.api.ScopeProvider; import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.datacatalogue.ckanutillibrary.DataCatalogue; import org.gcube.datacatalogue.ckanutillibrary.server.DataCatalogue;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.server.SessionUtil;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.ManageProductBean; import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared.ManageProductBean;
import org.gcube.resources.discovery.client.api.DiscoveryClient; import org.gcube.resources.discovery.client.api.DiscoveryClient;
import org.gcube.resources.discovery.client.queries.api.SimpleQuery; import org.gcube.resources.discovery.client.queries.api.SimpleQuery;
@ -20,8 +19,6 @@ import org.gcube.vomanagement.usermanagement.impl.LiferayUserManager;
import org.json.simple.JSONArray; import org.json.simple.JSONArray;
import org.json.simple.JSONObject; import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser; import org.json.simple.parser.JSONParser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.Log;
import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.log.LogFactoryUtil;

View File

@ -2,6 +2,8 @@ package org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared;
import java.io.Serializable; import java.io.Serializable;
import org.gcube.datacatalogue.ckanutillibrary.shared.RolesCkanGroupOrOrg;
/** /**
* A bean that contains the tuple: * A bean that contains the tuple:
* <ul> * <ul>
@ -17,7 +19,7 @@ public class BeanUserInOrgGroupRole implements Serializable {
private static final long serialVersionUID = 9022496195659804838L; private static final long serialVersionUID = 9022496195659804838L;
private String name; private String name;
private String url; private String url;
private CkanRole role; private RolesCkanGroupOrOrg role;
public BeanUserInOrgGroupRole() { public BeanUserInOrgGroupRole() {
super(); super();
@ -28,7 +30,7 @@ public class BeanUserInOrgGroupRole implements Serializable {
* @param orgUrl * @param orgUrl
* @param role * @param role
*/ */
public BeanUserInOrgGroupRole(String name, String url, CkanRole role) { public BeanUserInOrgGroupRole(String name, String url, RolesCkanGroupOrOrg role) {
super(); super();
this.name = name; this.name = name;
this.url = url; this.url = url;
@ -51,11 +53,11 @@ public class BeanUserInOrgGroupRole implements Serializable {
this.url = url; this.url = url;
} }
public CkanRole getRole() { public RolesCkanGroupOrOrg getRole() {
return role; return role;
} }
public void setRole(CkanRole role) { public void setRole(RolesCkanGroupOrOrg role) {
this.role = role; this.role = role;
} }

View File

@ -4,7 +4,9 @@
package org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared; package org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.server.GcubeCkanDataCatalogServiceImpl; import org.gcube.portlets.gcubeckan.gcubeckandatacatalog.server.GcubeCkanDataCatalogServiceImpl;
@ -30,7 +32,7 @@ public class CkanConnectorAccessPoint implements Serializable{
private String pathInfoParameter; private String pathInfoParameter;
private String queryStringParameters; private String queryStringParameters;
private String gcubeTokenValue; private String gcubeTokenValue;
private List<String> listOfVRes; private Map<String, String> mapVresRoles;
private String serverviceContext; private String serverviceContext;
/** /**
@ -94,14 +96,15 @@ public class CkanConnectorAccessPoint implements Serializable{
* *
* @param listVREs the list vr es * @param listVREs the list vr es
*/ */
public void addListOfVREs(List<String> listVREs){ public void addListOfVREs(Map<String, String> listVREs){
this.listOfVRes = listVREs; this.mapVresRoles = listVREs;
String vres = ""; String vres = "";
if(listVREs!=null && listVREs.size()>0){ if(listVREs!=null && listVREs.size()>0){
for (String vre : listVREs) { Set<Entry<String, String>> set = listVREs.entrySet();
vres+=vre+","; for (Entry<String, String> entry : set) {
vres += entry.getKey().toLowerCase() + "|" + entry.getValue() + ",";
} }
vres = vres.substring(0, vres.length()-1).toLowerCase(); //remove last "," and to lower case. A CKAN Organization ID must be lower case vres = vres.substring(0, vres.length()-1); //remove last "," and to lower case. A CKAN Organization ID must be lower case
} }
if(vres.length()>0){ if(vres.length()>0){
@ -182,9 +185,9 @@ public class CkanConnectorAccessPoint implements Serializable{
* *
* @return the listOfVRes * @return the listOfVRes
*/ */
public List<String> getListOfVRes() { public Map<String, String> getListOfVRes() {
return listOfVRes; return mapVresRoles;
} }
/** /**
@ -250,7 +253,7 @@ public class CkanConnectorAccessPoint implements Serializable{
builder.append(", gcubeTokenValue="); builder.append(", gcubeTokenValue=");
builder.append(gcubeTokenValue); builder.append(gcubeTokenValue);
builder.append(", listOfVRes="); builder.append(", listOfVRes=");
builder.append(listOfVRes); builder.append(mapVresRoles);
builder.append(", context="); builder.append(", context=");
builder.append(serverviceContext); builder.append(serverviceContext);
builder.append("]"); builder.append("]");

View File

@ -1,17 +0,0 @@
/**
*
*/
package org.gcube.portlets.gcubeckan.gcubeckandatacatalog.shared;
/**
* The Ckan role list
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
* @author Costantino Perciante costantino.perciante@isti.cnr.it
* Jun 9, 2016
*/
public enum CkanRole {
MEMBER,
EDITOR,
ADMIN
}