public abstract class AbstractResourceManager extends Object
| Constructor and Description |
|---|
AbstractResourceManager(AllowedResourceTypes type)
Deprecated.
discouraged use. With no ID some operations cannot be accessed. For internal use only.
|
AbstractResourceManager(String id,
AllowedResourceTypes type)
Instantiate the handler of a resource given its identifier and its type.
|
AbstractResourceManager(String id,
String name,
AllowedResourceTypes type) |
AbstractResourceManager(String id,
String name,
AllowedResourceTypes type,
String subtype) |
| Modifier and Type | Method and Description |
|---|---|
String |
addToExistingScope(org.gcube.common.scope.impl.ScopeBean sourceScope,
org.gcube.common.scope.impl.ScopeBean targetScope)
Add a scope to a Resource
|
protected abstract org.gcube.common.resources.gcore.Resource |
buildResource(String xmlRepresentation)
Given the XML profile representation of a gcube resource, its GCUBEResource is built.
|
String |
copyFromToVO(org.gcube.common.scope.impl.ScopeBean sourceScope,
org.gcube.common.scope.impl.ScopeBean targetScope)
Similar to the
addToExistingScope(org.gcube.common.scope.impl.ScopeBean, org.gcube.common.scope.impl.ScopeBean) method but involves
two scopes of type VO. |
String |
delete(org.gcube.common.scope.impl.ScopeBean scope)
Removes a resource.
|
void |
forceDelete(org.gcube.common.scope.impl.ScopeBean scope)
Deprecated.
you must be sure before requiring this operation... take care
|
String |
getID()
All resources must be identifiable through an unique ID.
|
String |
getName()
All resources must have a valid name.
|
org.gcube.informationsystem.publisher.RegistryPublisher |
getRegistryPublisher()
The singleton ISPublisher instance is preferred.
|
org.gcube.vremanagement.resourcemanager.client.RMReportingLibrary |
getReportResourceManager(String scope)
The report resource manager needed to handle the resource in a given scope.
|
org.gcube.common.resources.gcore.Resource |
getResource(org.gcube.common.scope.impl.ScopeBean scope)
From a resource retrieves its GCUBEResource depending on the scope in which it is
published.
|
org.gcube.vremanagement.resourcemanager.client.RMBinderLibrary |
getResourceManager(String scope)
The resource manager needed to handle the resource in a given scope.
|
String |
getSubType()
Resources can have a subtype (e.g.
|
AllowedResourceTypes |
getType()
All resources have a type.
|
protected String |
getXMLDescription(org.gcube.common.scope.impl.ScopeBean scope)
Returns the XML profile of a resource (given its ID that is encapsulated inside the resource
manager).
|
String |
removeFromScope(org.gcube.common.scope.impl.ScopeBean scope)
Removes the current resource from the scope.
|
void |
setID(String id) |
protected List<org.gcube.common.scope.impl.ScopeBean> |
validateScopes(String[] scopes)
Adds to scopes the required maps (if needed).
|
public AbstractResourceManager(AllowedResourceTypes type) throws ResourceParameterException, ResourceAccessException
public AbstractResourceManager(String id, AllowedResourceTypes type) throws ResourceParameterException, ResourceAccessException
id - the identifier of the resource the managetype - the type (GHN, RI, ...).ResourceParameterExceptionResourceAccessExceptionpublic AbstractResourceManager(String id, String name, AllowedResourceTypes type) throws ResourceParameterException, ResourceAccessException
public AbstractResourceManager(String id, String name, AllowedResourceTypes type, String subtype) throws ResourceParameterException, ResourceAccessException
public final org.gcube.informationsystem.publisher.RegistryPublisher getRegistryPublisher()
public final String getID()
public final void setID(String id)
public final String getName()
public final AllowedResourceTypes getType()
public final String getSubType()
public final org.gcube.vremanagement.resourcemanager.client.RMBinderLibrary getResourceManager(String scope) throws AbstractResourceException
scope - the scope in which to operateResourceAccessException - if no manager can be instantiatedResourceParameterException - if the parameters are invalidAbstractResourceExceptionpublic final org.gcube.vremanagement.resourcemanager.client.RMReportingLibrary getReportResourceManager(String scope) throws AbstractResourceException
scope - the scope in which to operateResourceAccessException - if no manager can be instantiatedResourceParameterException - if the parameters are invalidAbstractResourceExceptionpublic final String addToExistingScope(org.gcube.common.scope.impl.ScopeBean sourceScope, org.gcube.common.scope.impl.ScopeBean targetScope) throws AbstractResourceException
nestingPublication - true for resources different from gHN and RI.AbstractResourceExceptionpublic final String copyFromToVO(org.gcube.common.scope.impl.ScopeBean sourceScope, org.gcube.common.scope.impl.ScopeBean targetScope) throws AbstractResourceException
addToExistingScope(org.gcube.common.scope.impl.ScopeBean, org.gcube.common.scope.impl.ScopeBean) method but involves
two scopes of type VO.
Notice that this operation in reserved for resources different from gHN and RI.
See
here for further details.sourceScope - targetScope - AbstractResourceExceptionprotected abstract org.gcube.common.resources.gcore.Resource buildResource(String xmlRepresentation) throws AbstractResourceException
xmlRepresentation - AbstractResourceExceptionpublic final org.gcube.common.resources.gcore.Resource getResource(org.gcube.common.scope.impl.ScopeBean scope)
throws AbstractResourceException
scope - AbstractResourceExceptionprotected final String getXMLDescription(org.gcube.common.scope.impl.ScopeBean scope) throws AbstractResourceException
scope - AbstractResourceExceptionpublic final String removeFromScope(org.gcube.common.scope.impl.ScopeBean scope) throws AbstractResourceException
nestingRemoval - true for resources different from gHN and RIAbstractResourceExceptionprotected List<org.gcube.common.scope.impl.ScopeBean> validateScopes(String[] scopes)
scopes - public final void forceDelete(org.gcube.common.scope.impl.ScopeBean scope)
throws AbstractResourceException
scope - where the resource is boundAbstractResourceExceptionpublic final String delete(org.gcube.common.scope.impl.ScopeBean scope) throws AbstractResourceException
scope - ResourceOperationExceptionAbstractResourceExceptionCopyright © 2017. All Rights Reserved.