org.gcube.vremanagement.resourcemanager.impl.resources
Class ScopedAnyResource

java.lang.Object
  extended by org.gcube.vremanagement.resourcemanager.impl.resources.ScopedResource
      extended by org.gcube.vremanagement.resourcemanager.impl.resources.ScopedAnyResource

public final class ScopedAnyResource
extends ScopedResource

Models a generic scoped GCUBEResource

Author:
Manuele Simi (ISTI-CNR)

Nested Class Summary
 
Nested classes/interfaces inherited from class org.gcube.vremanagement.resourcemanager.impl.resources.ScopedResource
ScopedResource.ResourceNotFound, ScopedResource.STATUS
 
Field Summary
 
Fields inherited from class org.gcube.vremanagement.resourcemanager.impl.resources.ScopedResource
action, errorMessage, hostedOn, id, jointTime, lastModificationTime, logger, scope, status, success, type
 
Constructor Summary
protected ScopedAnyResource(String id, String type, org.gcube.common.core.scope.GCUBEScope scope)
           
 
Method Summary
protected  void addToScope()
          Adds the resource to the scope
protected  void find()
          Gets the profile of the Scoped Resource
protected  void removeFromScope()
          Removes the resource from the scope
 
Methods inherited from class org.gcube.vremanagement.resourcemanager.impl.resources.ScopedResource
doAction, equals, findResource, getAction, getErrorMessage, getHostedOn, getId, getJointTime, getLastModificationTime, getLogger, getMaxFindAttempts, getScope, getStatus, getType, hashCode, isSuccess, noHopeForMe, setErrorMessage, setHostedON, setJointTime, setScope, setStatus, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScopedAnyResource

protected ScopedAnyResource(String id,
                            String type,
                            org.gcube.common.core.scope.GCUBEScope scope)
Method Detail

find

protected void find()
             throws Exception
Gets the profile of the Scoped Resource

Specified by:
find in class ScopedResource
Throws:
Exception - if the resource was not found

addToScope

protected void addToScope()
                   throws ScopedResource.ResourceNotFound,
                          Exception
Description copied from class: ScopedResource
Adds the resource to the scope

Specified by:
addToScope in class ScopedResource
Throws:
ScopedResource.ResourceNotFound - if the resource does not exist in the infrastructure
Exception - if the operation fails

removeFromScope

protected void removeFromScope()
                        throws ScopedResource.ResourceNotFound,
                               Exception
Description copied from class: ScopedResource
Removes the resource from the scope

Specified by:
removeFromScope in class ScopedResource
Throws:
ScopedResource.ResourceNotFound - if the resource does not exist in the infrastructure
Exception - if the operation fails


Copyright © 2013. All Rights Reserved.