public class GenericUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
GCUBE_REQUEST_URL |
| Constructor and Description |
|---|
GenericUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getCurrentClientUrl(javax.servlet.http.HttpServletRequest httpServletRequest)
Needed to get the url of the client
|
static String |
getCurrentContext(javax.servlet.http.HttpServletRequest request,
boolean setInThread)
Retrieve the current scope by using the portal manager
|
static String |
getCurrentToken(javax.servlet.http.HttpServletRequest request,
boolean setInThread)
Retrieve the current token by using the portal manager
|
static org.gcube.vomanagement.usermanagement.model.GCubeUser |
getCurrentUser(javax.servlet.http.HttpServletRequest request)
Retrieve the current user by using the portal manager
|
static org.gcube.vomanagement.usermanagement.model.GCubeGroup |
getGroupFromScope(String scope)
Retrieve the group given the scope
|
static String |
getScopeFromClientUrl(javax.servlet.http.HttpServletRequest httpServletRequest)
Get the scope in which ckan information needs to be discovered from the url
|
static String |
retrieveScopeFromOrganizationName(String organizationName)
Given a ckan organization name retrieve the infrastructure scope
|
static String |
tryGetElseCreateToken(String username,
String context)
First check to retrieve the token, else create it
|
public static final String GCUBE_REQUEST_URL
public static String retrieveScopeFromOrganizationName(String organizationName) throws Exception
organizationName - (prevre, devvre, ...)Exceptionpublic static String tryGetElseCreateToken(String username, String context)
username - context - public static String getScopeFromClientUrl(javax.servlet.http.HttpServletRequest httpServletRequest)
httpServletRequest - public static String getCurrentClientUrl(javax.servlet.http.HttpServletRequest httpServletRequest)
httpServletRequest - the httpServletRequest objecturl at client sidepublic static org.gcube.vomanagement.usermanagement.model.GCubeUser getCurrentUser(javax.servlet.http.HttpServletRequest request)
public static String getCurrentContext(javax.servlet.http.HttpServletRequest request, boolean setInThread)
b - public static String getCurrentToken(javax.servlet.http.HttpServletRequest request, boolean setInThread)
b - public static org.gcube.vomanagement.usermanagement.model.GCubeGroup getGroupFromScope(String scope) throws org.gcube.vomanagement.usermanagement.exception.UserManagementSystemException, org.gcube.vomanagement.usermanagement.exception.GroupRetrievalFault
scope - org.gcube.vomanagement.usermanagement.exception.UserManagementSystemExceptionorg.gcube.vomanagement.usermanagement.exception.GroupRetrievalFaultCopyright © 2019. All Rights Reserved.