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 String |
getGatewayClientHostname(javax.servlet.http.HttpServletRequest httpServletRequest)
Gets the gateway client hostname.
|
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, ...)Exception - the exceptionpublic static String tryGetElseCreateToken(String username, String context)
username - the usernamecontext - the contextpublic static String getScopeFromClientUrl(javax.servlet.http.HttpServletRequest httpServletRequest)
httpServletRequest - the http servlet requestpublic static String getCurrentClientUrl(javax.servlet.http.HttpServletRequest httpServletRequest)
httpServletRequest - the httpServletRequest objecturl at client sidepublic static String getGatewayClientHostname(javax.servlet.http.HttpServletRequest httpServletRequest)
httpServletRequest - the http servlet requestpublic static org.gcube.vomanagement.usermanagement.model.GCubeUser getCurrentUser(javax.servlet.http.HttpServletRequest request)
request - the requestpublic static String getCurrentContext(javax.servlet.http.HttpServletRequest request, boolean setInThread)
request - the requestsetInThread - the set in threadpublic static String getCurrentToken(javax.servlet.http.HttpServletRequest request, boolean setInThread)
request - the requestsetInThread - the set in threadpublic static org.gcube.vomanagement.usermanagement.model.GCubeGroup getGroupFromScope(String scope) throws org.gcube.vomanagement.usermanagement.exception.UserManagementSystemException, org.gcube.vomanagement.usermanagement.exception.GroupRetrievalFault
scope - the scopeorg.gcube.vomanagement.usermanagement.exception.UserManagementSystemException - the user management system exceptionorg.gcube.vomanagement.usermanagement.exception.GroupRetrievalFault - the group retrieval faultCopyright © 2021. All Rights Reserved.