uk.org.ogsadai.engine
Class ActivityFactoryImpl

java.lang.Object
  |
  +--uk.org.ogsadai.engine.ActivityFactoryImpl
All Implemented Interfaces:
ActivityFactory, PropertyCallback

public class ActivityFactoryImpl
extends java.lang.Object
implements ActivityFactory, PropertyCallback

The ActivityFactoryImpl is configured using an activity configuration document conforming to the <OGSADAI>/schema/ogsadai/xsd/activity_config.xsd schema. This document describes the activities that are supported by a data service. It specifies their implementation classes and references their schemas. In some cases it also contains activity properties and references individual configuration files corresponding to activities. Please refer to the OGSA-DAI documentation for more details and example activity configuration files.

Author:
The OGSA-DAI Project Team

Constructor Summary
ActivityFactoryImpl(java.lang.String configurationPath)
          Constructs an OGSADAIActivityFactory.
 
Method Summary
 Activity[] createActivities(org.w3c.dom.Document document)
          Constructs the activity implementations for each of the activity elements contained in the specified perform document.
 java.lang.Object getValue(javax.xml.namespace.QName name)
           
 void setSecurityContext(SecurityContext sec)
           
 void setValue(javax.xml.namespace.QName name, java.lang.Object value)
          This method of the PropertyCallback interface is not needed so is a nullop.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActivityFactoryImpl

public ActivityFactoryImpl(java.lang.String configurationPath)
                    throws ConfigurationException
Constructs an OGSADAIActivityFactory.

Parameters:
configurationPath - Path String to the activity configuration file.
Throws:
ConfigurationException - If there is a problem with the activity configuration document. This may occur if:
java.lang.IllegalArgumentException - If the config parameter is null
Method Detail

createActivities

public Activity[] createActivities(org.w3c.dom.Document document)
                            throws DocumentValidationException,
                                   ActivityUserException,
                                   ActivitySystemException
Description copied from interface: ActivityFactory
Constructs the activity implementations for each of the activity elements contained in the specified perform document.

Specified by:
createActivities in interface ActivityFactory
Parameters:
document - The perform document containing the element to use to create the activities.
Returns:
An array of Activity objects.
Throws:
ActivitySystemException - If there is a system fault that prevents an Activity from being constructed successfully. This indicates an activity programming or configuration error.
DocumentValidationException - If the document is in some way invalid.
ActivityUserException - If a user mistake prevents one or more activities from being constructed successfully. This may be raised in either of the following circumstances:
  • one or more of the activities described in the perform document are unsupported by this factory
  • a required element or attribute has been omitted from an activity element in a perform document

getValue

public java.lang.Object getValue(javax.xml.namespace.QName name)
Specified by:
getValue in interface PropertyCallback

setValue

public void setValue(javax.xml.namespace.QName name,
                     java.lang.Object value)
This method of the PropertyCallback interface is not needed so is a nullop.

Specified by:
setValue in interface PropertyCallback

setSecurityContext

public void setSecurityContext(SecurityContext sec)
Specified by:
setSecurityContext in interface PropertyCallback