org.gcube.common.core.state
Class GCUBEWSResourcePropertySet

java.lang.Object
  extended by org.globus.wsrf.impl.SimpleResourcePropertySet
      extended by org.gcube.common.core.state.GCUBEWSResourcePropertySet
All Implemented Interfaces:
org.globus.wsrf.ResourcePropertySet

public class GCUBEWSResourcePropertySet
extends org.globus.wsrf.impl.SimpleResourcePropertySet

Set of Resource Properties for GCUBEWSResources.

Author:
Fabio Simeoni (University of Strathclyde), Manuele Simi (CNR-ISTI)

Nested Class Summary
 class GCUBEWSResourcePropertySet.RPSetChange
          RPSet change event.
 
Field Summary
protected  GCUBEStatefulPortTypeContext context
          The port-type context of the WS-Resource.
protected  GCUBELog logger
          Class logger.
static String PROVIDER_NS
          Namespace of the gCube Provider
static String RP_GID_NAME
          The name of the GHN ID RP.
static String RP_RIID_NAME
          The name of the RI ID RP.
static String RP_SCLASS_NAME
          The name of the service class RP.
static String RP_SCOPES_NAME
          The name of the DLs RP.
static String RP_SID_NAME
          The name of the service ID RP.
static String RP_SNAME_NAME
          The name of the service name RP.
 
Constructor Summary
GCUBEWSResourcePropertySet(GCUBEWSResource resource)
          Creates an instance for a given resource.
 
Method Summary
 boolean add(org.globus.wsrf.ResourceProperty prop)
           
 void addObserver(Observer o)
          Adds an observer to the set of observers for this RPSet
 boolean addScope(GCUBEScope scope)
          Adds a given scope to the WS-Resource.
 void clear()
           
 void deleteObserver(Observer o)
          Deletes an observer from the set of observers of this object.
 org.globus.wsrf.ResourceProperty get(String name)
          Returns a resource property from its local name.
 Calendar getCurrentTime()
          Returns the current time.
 String getGHN()
          Returns the identifier of the GHN of the WS-Resource.
 String getRI()
          Returns the identifier of the Running Instance of the WS-Resource.
 List<String> getScope()
          Returns the scopes of the WS-Resource.
 String getServiceClass()
          Returns the class of the service of the WS-Resource.
 String getServiceID()
          Returns the identifier of the service of the WS-Resource.
 String getServiceName()
          Returns the name of the service of the WS-Resource.
 org.globus.wsrf.ResourceProperty getSystemRP(String name)
          Returns a system resource property from its local name.
static String[] getSystemRPNames()
          Returns the names of the system properties common to all WS-Resources.
 Calendar getTerminationTime()
          Returns the termination time of the WS-Resource.
protected  void notifyObservers(GCUBEWSResourcePropertySet.RPSetChange change)
          Notifies the registered observer about change on the RP
 boolean removeScope(GCUBEScope scope)
          Removes the WS-Resource from a given scope.
 void setGHN(String id)
          Sets the identifier of the GHN of the WS-Resource.
 void setRI(String id)
          Set the identifier of the Running Instance of the WS-Resource.
 void setScope(List<String> scopes)
          Sets the scopes of the WS-Resource.
 void setServiceClass(String serviceclass)
          Sets the class of the service of the WS-Resource.
 void setServiceID(String id)
          Set the identifier of the service of the WS-Resource.
 void setServiceName(String name)
          Sets the name of the service of the WS-Resource.
 void setTerminationTime(Calendar calendar)
          Sets the termination time of WS-Resource.
 
Methods inherited from class org.globus.wsrf.impl.SimpleResourcePropertySet
create, get, getName, isEmpty, isLocalNameMatching, isOpenContent, iterator, remove, setLocalNameMatching, setOpenContent, size, toElement, toElementGeneral, toElementSpecific, toSOAPElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROVIDER_NS

public static final String PROVIDER_NS
Namespace of the gCube Provider

See Also:
Constant Field Values

RP_SID_NAME

public static final String RP_SID_NAME
The name of the service ID RP.

See Also:
Constant Field Values

RP_SNAME_NAME

public static final String RP_SNAME_NAME
The name of the service name RP.

See Also:
Constant Field Values

RP_SCLASS_NAME

public static final String RP_SCLASS_NAME
The name of the service class RP.

See Also:
Constant Field Values

RP_RIID_NAME

public static final String RP_RIID_NAME
The name of the RI ID RP.

See Also:
Constant Field Values

RP_GID_NAME

public static final String RP_GID_NAME
The name of the GHN ID RP.

See Also:
Constant Field Values

RP_SCOPES_NAME

public static final String RP_SCOPES_NAME
The name of the DLs RP.

See Also:
Constant Field Values

context

protected volatile GCUBEStatefulPortTypeContext context
The port-type context of the WS-Resource.


logger

protected GCUBELog logger
Class logger.

Constructor Detail

GCUBEWSResourcePropertySet

public GCUBEWSResourcePropertySet(GCUBEWSResource resource)
                           throws Exception
Creates an instance for a given resource.

Parameters:
resource - the resource.
Throws:
Exception - if the set could not be initialised.
Method Detail

get

public org.globus.wsrf.ResourceProperty get(String name)
Returns a resource property from its local name.

Parameters:
name - the name.
Returns:
the property.

getSystemRP

public org.globus.wsrf.ResourceProperty getSystemRP(String name)
Returns a system resource property from its local name.

Parameters:
name - the name.
Returns:
the property.

getCurrentTime

public Calendar getCurrentTime()
Returns the current time.

Returns:
the time.

getTerminationTime

public Calendar getTerminationTime()
Returns the termination time of the WS-Resource.

Returns:
the termination time.

setTerminationTime

public void setTerminationTime(Calendar calendar)
Sets the termination time of WS-Resource.

Parameters:
calendar - the time.

getRI

public String getRI()
Returns the identifier of the Running Instance of the WS-Resource.

Returns:
the identifier.

setRI

public void setRI(String id)
Set the identifier of the Running Instance of the WS-Resource.

Parameters:
id - the identifier

getServiceID

public String getServiceID()
Returns the identifier of the service of the WS-Resource.

Returns:
the identifier

setServiceID

public void setServiceID(String id)
Set the identifier of the service of the WS-Resource.

Parameters:
id - the identifier.

getGHN

public String getGHN()
Returns the identifier of the GHN of the WS-Resource.

Returns:
the identifier.

setGHN

public void setGHN(String id)
Sets the identifier of the GHN of the WS-Resource.

Parameters:
id - the identifier.

setServiceName

public void setServiceName(String name)
Sets the name of the service of the WS-Resource.

Parameters:
name - the name.

getServiceName

public String getServiceName()
Returns the name of the service of the WS-Resource.

Returns:
the name.

setServiceClass

public void setServiceClass(String serviceclass)
Sets the class of the service of the WS-Resource.

Parameters:
serviceclass - the class.

getServiceClass

public String getServiceClass()
Returns the class of the service of the WS-Resource.

Returns:
the class.

setScope

public void setScope(List<String> scopes)
Sets the scopes of the WS-Resource.

Parameters:
scopes - the scopes.

getScope

public List<String> getScope()
Returns the scopes of the WS-Resource.

Returns:
the scopes.

addScope

public boolean addScope(GCUBEScope scope)
Adds a given scope to the WS-Resource.

Parameters:
scope - the scope.
Returns:
true if the scope did not exist and was successfully added, false otherwise.

removeScope

public boolean removeScope(GCUBEScope scope)
Removes the WS-Resource from a given scope.

Parameters:
scope - the scope.
Returns:
true if the scope existed and the binding removed, false otherwise.

getSystemRPNames

public static String[] getSystemRPNames()
Returns the names of the system properties common to all WS-Resources.

Returns:
the system property names;

add

public boolean add(org.globus.wsrf.ResourceProperty prop)
Specified by:
add in interface org.globus.wsrf.ResourcePropertySet
Overrides:
add in class org.globus.wsrf.impl.SimpleResourcePropertySet

deleteObserver

public void deleteObserver(Observer o)
Deletes an observer from the set of observers of this object. Passing null to this method will have no effect.

Parameters:
o - the observer to be deleted.

addObserver

public void addObserver(Observer o)
Adds an observer to the set of observers for this RPSet

Parameters:
o - an observer to be added.
Throws:
NullPointerException - if the parameter o is null.

notifyObservers

protected void notifyObservers(GCUBEWSResourcePropertySet.RPSetChange change)
Notifies the registered observer about change on the RP

Parameters:
change -

clear

public void clear()
Specified by:
clear in interface org.globus.wsrf.ResourcePropertySet
Overrides:
clear in class org.globus.wsrf.impl.SimpleResourcePropertySet


Copyright © 2012. All Rights Reserved.