org.gcube.vremanagement.resourcemanager.impl.state
Class PublishedScopeResource

java.lang.Object
  extended by org.gcube.vremanagement.resourcemanager.impl.state.PublishedScopeResource

public class PublishedScopeResource
extends Object

The scope resource published in the IS

Author:
Manuele Simi (ISTI-CNR)

Nested Class Summary
static class PublishedScopeResource.UnknownScopeOptionException
          InvalidVREOption exception
 
Field Summary
protected  org.gcube.common.core.utils.logging.GCUBELog logger
           
 
Method Summary
 void addResource(ScopedResource resource)
          Adds a resource to PublishedScopeResource
 void dismiss()
          Dismisses the PublishedScopeResource from the IS and the scope
 String getDescription()
           
 String getDesigner()
           
 String getDisplayName()
           
 Date getEndTime()
           
 String getManager()
           
static PublishedScopeResource getResource(org.gcube.common.core.scope.GCUBEScope scope)
          Gets the current Scope Resource
 org.gcube.common.core.scope.GCUBEScope getScope()
           
 Date getStartTime()
           
 org.gcube.common.core.scope.GCUBEScope.Type getType()
          Returns the type of the scope.
 boolean isSecurityEnabled()
           
protected  boolean load()
          Loads the scope resource from the IS
 boolean loaded()
           
 void loadFromLocalState(ScopeState scopeState)
          Fills this PublishedResourceList with the content of the input ScopeState
 void publish()
          Publishes the PublishedScopeResource into the IS
 void reload()
           
 void removeResource(ScopedResource resource)
          Removes a resource from the PublishedScopeResource
 void setOption(String name, String value)
          Sets a scope option
 void synchWithLocalState(ScopeState scopeState)
          Synchronizes this PublishedResourceList with the content of the input ScopeState
 void to(ScopeState scopeState)
          Fills the input ScopeState with the actual content of the PublishedResourceList
 String toString()
          Returns a string representation of the PublishedScopeResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected org.gcube.common.core.utils.logging.GCUBELog logger
Method Detail

reload

public void reload()
            throws Exception
Throws:
Exception

getResource

public static PublishedScopeResource getResource(org.gcube.common.core.scope.GCUBEScope scope)
                                          throws Exception
Gets the current Scope Resource

Parameters:
scope - the scope of the resource to load
Returns:
the PublishedScopeResource
Throws:
Exception

addResource

public void addResource(ScopedResource resource)
                 throws Exception
Adds a resource to PublishedScopeResource

Parameters:
resource -
Throws:
PublishedScopeResource.UnknownScopeOptionException
Exception

removeResource

public void removeResource(ScopedResource resource)
                    throws Exception
Removes a resource from the PublishedScopeResource

Parameters:
resource -
Throws:
PublishedScopeResource.UnknownScopeOptionException
Exception

toString

public String toString()
Returns a string representation of the PublishedScopeResource

Overrides:
toString in class Object
Throws:
IOException

getScope

public org.gcube.common.core.scope.GCUBEScope getScope()
Returns:
the scope

getType

public org.gcube.common.core.scope.GCUBEScope.Type getType()
Returns the type of the scope.

Returns:
the type.

setOption

public void setOption(String name,
                      String value)
               throws Exception
Sets a scope option

Parameters:
name - the option name
value - the option value
Throws:
PublishedScopeResource.UnknownScopeOptionException
ParseException
Exception

publish

public void publish()
             throws Exception
Publishes the PublishedScopeResource into the IS

Throws:
Exception

dismiss

public void dismiss()
             throws Exception
Dismisses the PublishedScopeResource from the IS and the scope

Throws:
Exception

getManager

public String getManager()
Returns:
the creator

getDesigner

public String getDesigner()
Returns:
the designer

getDescription

public String getDescription()
Returns:
the description

getDisplayName

public String getDisplayName()
Returns:
the display name

getStartTime

public Date getStartTime()
Returns:
the startTime

getEndTime

public Date getEndTime()
Returns:
the endTime

isSecurityEnabled

public boolean isSecurityEnabled()
Returns:
the securityEnabled

load

protected boolean load()
Loads the scope resource from the IS

Parameters:
resource - the resource to load
Returns:
true if the resource is successfully loaded, false otherwise

loaded

public boolean loaded()

to

public void to(ScopeState scopeState)
Fills the input ScopeState with the actual content of the PublishedResourceList

Parameters:
scopeState - the list to fill

loadFromLocalState

public void loadFromLocalState(ScopeState scopeState)
                        throws Exception
Fills this PublishedResourceList with the content of the input ScopeState

Parameters:
scopeState - the list to load
Throws:
PublishedScopeResource.UnknownScopeOptionException - if the load fails
Exception

synchWithLocalState

public void synchWithLocalState(ScopeState scopeState)
                         throws Exception
Synchronizes this PublishedResourceList with the content of the input ScopeState

Parameters:
scopeState - the list to synchronize with
Throws:
PublishedScopeResource.UnknownScopeOptionException - if the synchronization fails
Exception


Copyright © 2013. All Rights Reserved.