|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.activity.ActivityCreator
An ActivityCreator
knows how to create and initialise
one type of Activity
implementation.
When an ActivityCreator
creates an
Activity
, the following steps are performed:
Activity
that is created.
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
private static DAILogger |
LOG
Logger object for logging in this class |
private java.lang.String |
mClass
Implementation class for the Activity |
private org.w3c.dom.Document |
mConfigDoc
Activity configuration document, if applicable, otherwise null |
private ActivityConfiguration |
mConfiguration
Activity configuration object, if applicable, otherwise null |
private java.lang.String |
mName
Name of the activity that this ActivityCreator creates |
private java.util.Properties |
mProperties
The activity properties, if applicable, otherwise null . |
private org.w3c.dom.Document |
mSchemaDoc
Activity schema document. |
Constructor Summary | |
(package private) |
ActivityCreator(ActivityConfig activityConfig)
Constructs an ActivityCreator that can create the
Activity described by the specified
Element . |
Method Summary | |
Activity |
createActivity(org.w3c.dom.Element element)
Creates an Activity instance. |
java.lang.String |
getName()
Returns the name of the activity that this ActivityCreator can create. |
org.w3c.dom.Document |
getSchema()
Returns the schema Document for the activity. |
private void |
initialiseActivityConfiguration(Activity activity,
org.w3c.dom.Document configurationDoc)
Creates an activity configuration object, if it hasn't already been created, then passes it into the new activity. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private static final DAILogger LOG
private final java.lang.String mName
ActivityCreator
creates
private final java.lang.String mClass
Activity
private final org.w3c.dom.Document mSchemaDoc
private final org.w3c.dom.Document mConfigDoc
null
private ActivityConfiguration mConfiguration
null
private final java.util.Properties mProperties
null
.
Constructor Detail |
ActivityCreator(ActivityConfig activityConfig)
ActivityCreator
that can create the
Activity
described by the specified
Element
.
activityConfig
- Configuration details of an activity - its
name, implementation classe and configuration.
java.lang.IllegalArgumentException
- If activityConfig
is null
.Method Detail |
public Activity createActivity(org.w3c.dom.Element element) throws ActivitySpecificationException, ActivityCreationException
Activity
instance.
element
- Element from a perform document containing a specific
activity.
Activity
.
ActivitySpecificationException
- If a client mistake prevents the activity from
being constructed successfully. This may be raised in
either of the following circumstances:
ActivityCreationException
- If there is some problem that prevents an activity being
created. This is typically caused by a configuration or
programming error.private void initialiseActivityConfiguration(Activity activity, org.w3c.dom.Document configurationDoc) throws ActivityConfigurationException
activity
- activity to pass the configuration toconfigurationDoc
- XML document containing the activity configuration
ActivityConfigurationException
- If there is a problem initialising the
ActivityConfiguration
.
objectpublic final java.lang.String getName()
ActivityCreator
can create. This name corresponds
to the name of the element as used in a perform document for this
activity, not the name of the implementation class.
String
public org.w3c.dom.Document getSchema()
Document
for the activity.
Document
containing XML Schema.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |