public class WorkspaceUtils extends Object
| Constructor and Description |
|---|
WorkspaceUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Map<String,String> |
getGcubeItemProperties(org.gcube.common.storagehubwrapper.shared.tohl.WorkspaceItem item)
Gets the gcube item properties.
|
static org.gcube.common.storagehubwrapper.server.StorageHubWrapper |
getStorageHubWrapper(javax.servlet.http.HttpServletRequest request,
String scopeGroupId,
org.gcube.vomanagement.usermanagement.model.GCubeUser user)
Gets the storage hub wrapper.
|
static boolean |
isWithinPortal()
Checks if is within portal.
|
static List<org.gcube.datacatalogue.utillibrary.shared.ResourceBean> |
toResources(DatasetBean bean,
org.gcube.common.storagehubwrapper.server.tohl.Workspace workspace,
String username)
Copy into the .catalogue area folder the checked resources.
|
static Map<String,String> |
toSimpleMap(org.gcube.common.storagehubwrapper.shared.tohl.items.PropertyMap propertyMap)
To simple map.
|
static void |
toWorkspaceResource(String wsItemId,
String userName,
DatasetBean bean,
org.gcube.common.storagehubwrapper.server.tohl.Workspace workspace)
This method receives an item-id within the user's workspace and setit in the dataset bean to be returned.
|
public static boolean isWithinPortal()
public static org.gcube.common.storagehubwrapper.server.StorageHubWrapper getStorageHubWrapper(javax.servlet.http.HttpServletRequest request,
String scopeGroupId,
org.gcube.vomanagement.usermanagement.model.GCubeUser user)
throws Exception
request - the requestscopeGroupId - the scope group id. If scopeGroupId is null the scope is read
by using the request else by using the scopeGroupIduser - the userException - the exceptionpublic static void toWorkspaceResource(String wsItemId, String userName, DatasetBean bean, org.gcube.common.storagehubwrapper.server.tohl.Workspace workspace) throws Exception
wsItemId - the ws item iduserName - the user namebean - the beanworkspace - the workspaceException - the exceptionpublic static Map<String,String> getGcubeItemProperties(org.gcube.common.storagehubwrapper.shared.tohl.WorkspaceItem item)
item - the itempublic static Map<String,String> toSimpleMap(org.gcube.common.storagehubwrapper.shared.tohl.items.PropertyMap propertyMap)
propertyMap - the property mappublic static List<org.gcube.datacatalogue.utillibrary.shared.ResourceBean> toResources(DatasetBean bean, org.gcube.common.storagehubwrapper.server.tohl.Workspace workspace, String username) throws Exception
bean - the beanworkspace - the workspaceusername - the usernameException - the exceptionCopyright © 2021. All Rights Reserved.