uk.org.ogsadai.engine.controlflow
Class RequestComponentFactoryImpl

java.lang.Object
  |
  +--uk.org.ogsadai.engine.controlflow.RequestComponentFactoryImpl
All Implemented Interfaces:
RequestComponentFactory

public class RequestComponentFactoryImpl
extends java.lang.Object
implements RequestComponentFactory

The RequestComponentFactory creates a composite RequestComponent from OGSA-DAI perform documents that conform to the OGSA-DAI perform document schema (in the http://ogsadai.org.uk/2005/03/types namespace).

Author:
The OGSA-DAI Project Team

Constructor Summary
RequestComponentFactoryImpl(ActivityFactory activityFactory)
          Creates an instance that will use the specified ActivityFactory to create activities.
 
Method Summary
 void addChildren(org.w3c.dom.Element parentElement, RequestComponent parentComponent, java.util.Collection pipelines)
          Adds the child request components described by a parent element to a parent request component.
 RequestComponent createRequestComponent(org.w3c.dom.Document requestDocument)
          Creates a composite RequestComponent structure for the specified request document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestComponentFactoryImpl

public RequestComponentFactoryImpl(ActivityFactory activityFactory)
Creates an instance that will use the specified ActivityFactory to create activities.

Parameters:
activityFactory - an ActivityFactory
Method Detail

createRequestComponent

public RequestComponent createRequestComponent(org.w3c.dom.Document requestDocument)
                                        throws RequestUserException,
                                               RequestSystemException
Description copied from interface: RequestComponentFactory
Creates a composite RequestComponent structure for the specified request document.

Specified by:
createRequestComponent in interface RequestComponentFactory
Parameters:
requestDocument - the request Document also known as the perform document
Returns:
a RequestComponent for the whole request
Throws:
RequestSystemException - If there is a system problem that prevents the creation of the composite request.
RequestUserException - If there is a problem creating the composite request component. This may be caused by an invalid request document.

addChildren

public void addChildren(org.w3c.dom.Element parentElement,
                        RequestComponent parentComponent,
                        java.util.Collection pipelines)
Adds the child request components described by a parent element to a parent request component. This method is invoked recursively to build a composite request component for the whole request.

Parameters:
parentElement - element within the perform document that may describe child elements corresponding to child request components
parentComponent - the component to add child components to
pipelines - a Collection of the activity pipelines contained in the request that have not yet been turned into request components