|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gcube.resourcemanagement.support.server.managers.resources.AbstractResourceManager
public abstract class AbstractResourceManager
The minimal interface all the resource managers must implement. Here is implemented the greatest part of the operations exposed in the official wiki.
Constructor Summary | |
---|---|
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)
|
Method Summary | |
---|---|
String |
addToExistingScope(org.gcube.common.core.scope.GCUBEScope sourceScope,
org.gcube.common.core.scope.GCUBEScope targetScope)
Add a scope to a gHN and the related Service Map is already available on the gHN. |
protected abstract org.gcube.common.core.resources.GCUBEResource |
buildGCUBEResource(String xmlRepresentation)
Given the XML profile representation of a gcube resource, its GCUBEResource is built. |
String |
copyFromToVO(org.gcube.common.core.scope.GCUBEScope sourceScope,
org.gcube.common.core.scope.GCUBEScope targetScope)
Similar to the addToExistingScope(org.gcube.common.core.scope.GCUBEScope, org.gcube.common.core.scope.GCUBEScope) method but involves
two scopes of type VO. |
void |
delete(org.gcube.common.core.scope.GCUBEScope scope)
Removes a resource. |
void |
forceDelete(org.gcube.common.core.scope.GCUBEScope scope)
Deprecated. you must be sure before requiring this operation... take care |
org.gcube.common.core.resources.GCUBEResource |
getGCUBEResource(org.gcube.common.core.scope.GCUBEScope scope)
From a resource retrieves its GCUBEResource depending on the scope in which it is published. |
String |
getID()
All resources must be identifiable through an unique ID. |
protected org.gcube.common.core.informationsystem.client.ISClient |
getISClient()
The singleton ISClient instance is preferred. |
org.gcube.common.core.informationsystem.publisher.ISPublisher |
getISPublisher()
The singleton ISPublisher instance is preferred. |
String |
getName()
All resources must have a valid name. |
org.gcube.vremanagement.resourcemanager.stubs.reporting.ReportingPortType |
getReportResourceManager(org.gcube.common.core.scope.GCUBEScope scope)
The report resource manager needed to handle the resource in a given scope. |
org.gcube.vremanagement.resourcemanager.stubs.binder.ResourceBinderPortType |
getResourceManager(org.gcube.common.core.scope.GCUBEScope scope)
The resource manager needed to handle the resource in a given scope. |
List<org.gcube.vremanagement.resourcemanager.stubs.binder.ResourceBinderPortType> |
getResourceManagers(org.gcube.common.core.scope.GCUBEScope scope)
The the list of resource managers able to handle the resource in a given scope. |
List<org.gcube.vremanagement.resourcemanager.stubs.reporting.ReportingPortType> |
getResourceReportManagers(org.gcube.common.core.scope.GCUBEScope scope)
The the list of resource report managers able to handle the resource in a given scope. |
org.gcube.common.core.security.GCUBESecurityManagerImpl |
getSecurityManager()
The security manager is initially instantiated with empty permissions. |
String |
getSubType()
Resources can have a subtype (e.g. |
AllowedResourceTypes |
getType()
All resources have a type. |
protected String |
getXMLDescription(org.gcube.common.core.scope.GCUBEScope scope)
Returns the XML profile of a resource (given its ID that is encapsulated inside the resource manager). |
String |
removeFromScope(org.gcube.common.core.scope.GCUBEScope scope)
Removes the current resource from the scope. |
void |
setID(String id)
|
void |
setSecurityManager(org.gcube.common.core.security.GCUBESecurityManagerImpl securityManager)
|
protected List<org.gcube.common.core.scope.GCUBEScope> |
validateScopes(org.gcube.common.core.scope.GCUBEScope[] scopes)
Adds to scopes the required maps (if needed). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractResourceManager(AllowedResourceTypes type) throws ResourceParameterException, ResourceAccessException
ResourceParameterException
ResourceAccessException
public AbstractResourceManager(String id, AllowedResourceTypes type) throws ResourceParameterException, ResourceAccessException
id
- the identifier of the resource the managetype
- the type (GHN, RI, ...).
ResourceParameterException
ResourceAccessException
public AbstractResourceManager(String id, String name, AllowedResourceTypes type) throws ResourceParameterException, ResourceAccessException
ResourceParameterException
ResourceAccessException
public AbstractResourceManager(String id, String name, AllowedResourceTypes type, String subtype) throws ResourceParameterException, ResourceAccessException
ResourceParameterException
ResourceAccessException
Method Detail |
---|
protected final org.gcube.common.core.informationsystem.client.ISClient getISClient()
public final org.gcube.common.core.informationsystem.publisher.ISPublisher getISPublisher()
public final void setSecurityManager(org.gcube.common.core.security.GCUBESecurityManagerImpl securityManager)
public final org.gcube.common.core.security.GCUBESecurityManagerImpl getSecurityManager()
setSecurityManager(org.gcube.common.core.security.GCUBESecurityManagerImpl)
can be used to
change it.
public final String getID()
public final void setID(String id)
public final String getName()
public final AllowedResourceTypes getType()
public final String getSubType()
public final List<org.gcube.vremanagement.resourcemanager.stubs.binder.ResourceBinderPortType> getResourceManagers(org.gcube.common.core.scope.GCUBEScope scope) throws ResourceAccessException, ResourceParameterException
scope
- the scope in which to operate
ResourceAccessException
- if no manager can be instantiated
ResourceParameterException
- if the parameters are invalidpublic final List<org.gcube.vremanagement.resourcemanager.stubs.reporting.ReportingPortType> getResourceReportManagers(org.gcube.common.core.scope.GCUBEScope scope) throws ResourceAccessException, ResourceParameterException
scope
- the scope in which to operate
ResourceAccessException
- if no manager can be instantiated
ResourceParameterException
- if the parameters are invalidpublic final org.gcube.vremanagement.resourcemanager.stubs.binder.ResourceBinderPortType getResourceManager(org.gcube.common.core.scope.GCUBEScope scope) throws AbstractResourceException
scope
- the scope in which to operate
ResourceAccessException
- if no manager can be instantiated
ResourceParameterException
- if the parameters are invalid
AbstractResourceException
public final org.gcube.vremanagement.resourcemanager.stubs.reporting.ReportingPortType getReportResourceManager(org.gcube.common.core.scope.GCUBEScope scope) throws AbstractResourceException
scope
- the scope in which to operate
ResourceAccessException
- if no manager can be instantiated
ResourceParameterException
- if the parameters are invalid
AbstractResourceException
public final String addToExistingScope(org.gcube.common.core.scope.GCUBEScope sourceScope, org.gcube.common.core.scope.GCUBEScope targetScope) throws AbstractResourceException
nestingPublication
- true for resources different from gHN and RI.
AbstractResourceException
public final String copyFromToVO(org.gcube.common.core.scope.GCUBEScope sourceScope, org.gcube.common.core.scope.GCUBEScope targetScope) throws AbstractResourceException
addToExistingScope(org.gcube.common.core.scope.GCUBEScope, org.gcube.common.core.scope.GCUBEScope)
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
-
AbstractResourceException
protected abstract org.gcube.common.core.resources.GCUBEResource buildGCUBEResource(String xmlRepresentation) throws AbstractResourceException
xmlRepresentation
-
AbstractResourceException
public final org.gcube.common.core.resources.GCUBEResource getGCUBEResource(org.gcube.common.core.scope.GCUBEScope scope) throws AbstractResourceException
scope
-
AbstractResourceException
protected final String getXMLDescription(org.gcube.common.core.scope.GCUBEScope scope) throws AbstractResourceException
scope
-
AbstractResourceException
public final String removeFromScope(org.gcube.common.core.scope.GCUBEScope scope) throws AbstractResourceException
nestingRemoval
- true for resources different from gHN and RI
AbstractResourceException
protected List<org.gcube.common.core.scope.GCUBEScope> validateScopes(org.gcube.common.core.scope.GCUBEScope[] scopes)
scopes
-
public final void forceDelete(org.gcube.common.core.scope.GCUBEScope scope) throws AbstractResourceException
scope
- where the resource is bound
AbstractResourceException
public final void delete(org.gcube.common.core.scope.GCUBEScope scope) throws AbstractResourceException
scope
-
ResourceOperationException
AbstractResourceException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |