Class ContextManager
- java.lang.Object
-
- org.gcube.resourcemanagement.support.server.managers.context.ContextManager
-
public class ContextManager extends Object
Context and their maps are persisted in this structure.- Author:
- Massimiliano Assante (ISTI-CNR)
-
-
Constructor Summary
Constructors Constructor Description ContextManager()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidclear()static Map<String,org.gcube.common.scope.impl.ScopeBean>getAvailableContexts()Refreshes the list of scopes and associated maps.static org.gcube.common.scope.impl.ScopeBeangetContext(String context)static DocumentgetDocumentGivenXML(String result)static StringgetMapXML(org.gcube.common.scope.impl.ScopeBean searchvo)Given a context, if it is a VO or an infrastructure, the corresponding map file is retrieved from the globus location and the contained xml representation is returned.protected static List<String>getVREFromVO(org.gcube.common.scope.impl.ScopeBean vo)query the IS to get the VRE list given a VOprotected static List<org.gcube.common.resources.gcore.GenericResource>getVREResourcesFromVO(org.gcube.common.scope.impl.ScopeBean vo)query the IS to get the VRE list given a VOstatic LinkedHashMap<String,org.gcube.common.scope.impl.ScopeBean>readContexts()static LinkedHashMap<String,D4SEnvironment>readContextsWithUUIDs()static voidupdate()
-
-
-
Method Detail
-
getContext
public static org.gcube.common.scope.impl.ScopeBean getContext(String context) throws Exception
- Throws:
Exception
-
getAvailableContexts
public static Map<String,org.gcube.common.scope.impl.ScopeBean> getAvailableContexts() throws Exception
Refreshes the list of scopes and associated maps.- Throws:
Exception
-
clear
public static void clear()
-
readContexts
public static LinkedHashMap<String,org.gcube.common.scope.impl.ScopeBean> readContexts() throws Exception
- Parameters:
confFile-- Returns:
- Throws:
Exception
-
readContextsWithUUIDs
public static LinkedHashMap<String,D4SEnvironment> readContextsWithUUIDs() throws Exception
- Parameters:
confFile-- Returns:
- Throws:
Exception
-
getVREFromVO
protected static List<String> getVREFromVO(org.gcube.common.scope.impl.ScopeBean vo) throws Exception
query the IS to get the VRE list given a VO- Parameters:
vo-- Returns:
- Throws:
Exception
-
getVREResourcesFromVO
protected static List<org.gcube.common.resources.gcore.GenericResource> getVREResourcesFromVO(org.gcube.common.scope.impl.ScopeBean vo) throws Exception
query the IS to get the VRE list given a VO- Parameters:
vo-- Returns:
- Throws:
Exception
-
getMapXML
public static String getMapXML(org.gcube.common.scope.impl.ScopeBean searchvo) throws Exception
Given a context, if it is a VO or an infrastructure, the corresponding map file is retrieved from the globus location and the contained xml representation is returned.- Parameters:
searchvo-- Returns:
- Throws:
Exception
-
-