public class WsUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
WsUtil() |
| Modifier and Type | Method and Description |
|---|---|
static PortalContextInfo |
getPortalContext(javax.servlet.http.HttpServletRequest httpServletRequest)
Gets the portal context.
|
static PortalContextInfo |
getPortalContext(javax.servlet.http.HttpServletRequest httpServletRequest,
String overrideScope)
Gets the portal context.
|
static String |
getUserId(javax.servlet.http.HttpServletRequest httpServletRequest)
Gets the user id.
|
static org.gcube.common.homelibrary.home.workspace.Workspace |
getWorkspace(javax.servlet.http.HttpServletRequest httpServletRequest)
Gets the workspace.
|
static org.gcube.common.homelibrary.home.workspace.Workspace |
getWorkspace(javax.servlet.http.HttpServletRequest httpServletRequest,
String contextID,
org.gcube.vomanagement.usermanagement.model.GCubeUser user)
Gets the workspace.
|
static boolean |
isSessionExpired(javax.servlet.http.HttpServletRequest httpServletRequest)
Checks if is session expired.
|
static boolean |
isVRE(String scope)
Checks if is vre.
|
static WorkspaceItemInfo |
toWorkspaceItemInfo(org.gcube.common.homelibrary.home.workspace.WorkspaceItem item)
To workspace item info.
|
public static PortalContextInfo getPortalContext(javax.servlet.http.HttpServletRequest httpServletRequest)
httpServletRequest - the http servlet requestpublic static PortalContextInfo getPortalContext(javax.servlet.http.HttpServletRequest httpServletRequest, String overrideScope)
httpServletRequest - the http servlet requestoverrideScope - the override scopepublic static boolean isSessionExpired(javax.servlet.http.HttpServletRequest httpServletRequest)
throws Exception
httpServletRequest - the http servlet requestException - the exceptionpublic static org.gcube.common.homelibrary.home.workspace.Workspace getWorkspace(javax.servlet.http.HttpServletRequest httpServletRequest)
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException,
org.gcube.common.homelibrary.home.exceptions.HomeNotFoundException,
org.gcube.common.homelibrary.home.workspace.exceptions.WorkspaceFolderNotFoundException
httpServletRequest - the http servlet requestorg.gcube.common.homelibrary.home.exceptions.InternalErrorException - the internal error exceptionorg.gcube.common.homelibrary.home.exceptions.HomeNotFoundException - the home not found exceptionorg.gcube.common.homelibrary.home.workspace.exceptions.WorkspaceFolderNotFoundException - the workspace folder not found exceptionpublic static org.gcube.common.homelibrary.home.workspace.Workspace getWorkspace(javax.servlet.http.HttpServletRequest httpServletRequest,
String contextID,
org.gcube.vomanagement.usermanagement.model.GCubeUser user)
throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException,
org.gcube.common.homelibrary.home.exceptions.HomeNotFoundException,
org.gcube.common.homelibrary.home.workspace.exceptions.WorkspaceFolderNotFoundException
httpServletRequest - the http servlet requestcontextID - the context iduser - the userorg.gcube.common.homelibrary.home.exceptions.InternalErrorException - the internal error exceptionorg.gcube.common.homelibrary.home.exceptions.HomeNotFoundException - the home not found exceptionorg.gcube.common.homelibrary.home.workspace.exceptions.WorkspaceFolderNotFoundException - the workspace folder not found exceptionpublic static String getUserId(javax.servlet.http.HttpServletRequest httpServletRequest)
httpServletRequest - the http servlet requestpublic static boolean isVRE(String scope)
scope - the scopepublic static WorkspaceItemInfo toWorkspaceItemInfo(org.gcube.common.homelibrary.home.workspace.WorkspaceItem item) throws org.gcube.common.homelibrary.home.exceptions.InternalErrorException
item - the itemorg.gcube.common.homelibrary.home.exceptions.InternalErrorException - the internal error exceptionCopyright © 2018. All Rights Reserved.