uk.org.ogsadai.activity
Class ActivityTypesDocumentCreator

java.lang.Object
  extended byuk.org.ogsadai.activity.ActivityTypesDocumentCreator

public class ActivityTypesDocumentCreator
extends java.lang.Object

Creates an XML document describing the activities supported by an ActivityFactory. Note that this document is created anew using the activity configuration information each time the create method is called. This is so that the document does not need to be stored in memory. The performance consequence of this design decision is acceptable because it is anticipated that this document will be requested infrequently.

Author:
The OGSA-DAI Project Team

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
          Copyright statement.
private static DAILogger LOG
          Logger object for logging in this class.
private  ActivityConfig[] mActivityConfigs
          Configuration details of the activities.
 
Constructor Summary
ActivityTypesDocumentCreator(ActivityConfig[] activityConfigs)
          Creates an instance that will use the given activity configuration details.
 
Method Summary
private  org.w3c.dom.Document buildDocument(ActivityConfig[] activityConfigs)
          Builds the document describing the activity types that are supported.
 java.lang.Object create()
          Create the XML document
 
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

LOG

private static final DAILogger LOG
Logger object for logging in this class.


mActivityConfigs

private final ActivityConfig[] mActivityConfigs
Configuration details of the activities.

Constructor Detail

ActivityTypesDocumentCreator

public ActivityTypesDocumentCreator(ActivityConfig[] activityConfigs)
Creates an instance that will use the given activity configuration details.

Parameters:
activityConfigs - Details of the supported activities
Method Detail

create

public java.lang.Object create()
                        throws ActivityTypesCreationException
Create the XML document

Returns:
XML document describing the activities supported.
Throws:
ActivityTypesCreationException - If a problem is encountered during the creation.

buildDocument

private org.w3c.dom.Document buildDocument(ActivityConfig[] activityConfigs)
                                    throws ActivityTypesCreationException
Builds the document describing the activity types that are supported.

Parameters:
activityConfigs - Array of configuration details for each activity.
Returns:
XML document describing the activities supported.
Throws:
ActivityTypesCreationException - If a problem is encountered during the creation.