uk.org.ogsadai.service.resource.config
Class BasicActivityConfig

java.lang.Object
  |
  +--uk.org.ogsadai.service.resource.config.BasicActivityConfig
All Implemented Interfaces:
ActivityConfig

public class BasicActivityConfig
extends java.lang.Object
implements ActivityConfig

Basic class for storing configuration details of an activity.

Author:
OGSA-DAI team

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
          Copyright statement
private  org.w3c.dom.Document mConfigDocument
           
private  java.lang.String mDescription
           
private  java.lang.String mImplementationClassName
           
private  java.lang.String mName
           
private  java.util.Properties mProperties
           
private  org.w3c.dom.Document mSchema
           
 
Constructor Summary
BasicActivityConfig(java.lang.String name, java.lang.String implementationClassName, org.w3c.dom.Document schema)
          Constructs a activity configuration with a name, schema and implementation class.
 
Method Summary
 org.w3c.dom.Document getConfigDocument()
          Gets the configuration document associated with the activity.
 java.lang.String getDescription()
          Gets a human readable description of the activity.
 java.lang.String getImplementationClassName()
          Gets the name of the class which implements the activity.
 java.lang.String getName()
          Gets the name of the activity.
 java.util.Properties getProperties()
          Gets the key/value pair properties associated with the activity.
 org.w3c.dom.Document getSchema()
          Gets the schema that defines the XML specifying the activity's parameters.
 void setConfigDocument(org.w3c.dom.Document configDocument)
          Sets the optional configuration document associated with the activity.
 void setDescription(java.lang.String description)
          Sets the optional desciption of the activity.
 void setProperties(java.util.Properties properties)
          Sets the optional properties associated with the activity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
Copyright statement

See Also:
Constant Field Values

mName

private java.lang.String mName

mImplementationClassName

private java.lang.String mImplementationClassName

mSchema

private org.w3c.dom.Document mSchema

mDescription

private java.lang.String mDescription

mProperties

private java.util.Properties mProperties

mConfigDocument

private org.w3c.dom.Document mConfigDocument
Constructor Detail

BasicActivityConfig

public BasicActivityConfig(java.lang.String name,
                           java.lang.String implementationClassName,
                           org.w3c.dom.Document schema)
Constructs a activity configuration with a name, schema and implementation class. All other elements of the configuration will be unspecified

Parameters:
name - Name of the activity.
implementationClassName - Name of the class which implements the activity.
schema - XSD schema of the activity's parameters.
Method Detail

setDescription

public void setDescription(java.lang.String description)
Sets the optional desciption of the activity. This is a humam readable description of the activity.

Parameters:
description - Activity description.

setProperties

public void setProperties(java.util.Properties properties)
Sets the optional properties associated with the activity. These properties are key/value pairs which to used to configure the activity instances.

Parameters:
properties - The activity's configuation properties.

setConfigDocument

public void setConfigDocument(org.w3c.dom.Document configDocument)
Sets the optional configuration document associated with the activity. This configuration document can be used to further configure the activity instances.

Parameters:
configDocument - Document containing the activity's configuration.

getName

public java.lang.String getName()
Gets the name of the activity.

Specified by:
getName in interface ActivityConfig
Returns:
Activity name.

getImplementationClassName

public java.lang.String getImplementationClassName()
Gets the name of the class which implements the activity.

Specified by:
getImplementationClassName in interface ActivityConfig
Returns:
Activity implementation class name.

getSchema

public org.w3c.dom.Document getSchema()
Gets the schema that defines the XML specifying the activity's parameters.

Specified by:
getSchema in interface ActivityConfig
Returns:
Document that describes the schema (in XSD) of the activity's parameters.

getDescription

public java.lang.String getDescription()
Gets a human readable description of the activity.

Specified by:
getDescription in interface ActivityConfig
Returns:
The activity description or null if none is specified.

getProperties

public java.util.Properties getProperties()
Gets the key/value pair properties associated with the activity. These properties are used to further configure the activity instance.

Specified by:
getProperties in interface ActivityConfig
Returns:
The properties associated with the activity or null is none are specified.

getConfigDocument

public org.w3c.dom.Document getConfigDocument()
Gets the configuration document associated with the activity. If it exists this document will contain further configuration specific to the activity.

Specified by:
getConfigDocument in interface ActivityConfig
Returns:
The activity specific configuration document or null if none is specified.