|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.apache.lenya.workflow.impl.WorkflowBuilder
public class WorkflowBuilder
Utility class to build a workflow schema from a file.
| Field Summary | |
|---|---|
protected static java.lang.String |
ACTION_ELEMENT
|
protected static java.lang.String |
ASSIGNMENT_ELEMENT
|
protected static java.lang.String |
CLASS_ATTRIBUTE
|
protected static java.lang.String |
CONDITION_ELEMENT
|
protected static java.lang.String |
DESTINATION_ATTRIBUTE
|
protected static java.lang.String |
EVENT_ELEMENT
|
protected static java.lang.String |
ID_ATTRIBUTE
|
protected static java.lang.String |
INITIAL_ATTRIBUTE
|
protected static java.lang.String |
NAME_ATTRIBUTE
|
protected static java.lang.String |
SOURCE_ATTRIBUTE
|
protected static java.lang.String |
STATE_ELEMENT
|
protected static java.lang.String |
SYNCHRONIZED_ATTRIBUTE
|
protected static java.lang.String |
TRANSITION_ELEMENT
|
protected static java.lang.String |
VALUE_ATTRIBUTE
|
protected static java.lang.String |
VARIABLE_ATTRIBUTE
|
protected static java.lang.String |
VARIABLE_ELEMENT
|
| Constructor Summary | |
|---|---|
protected |
WorkflowBuilder()
Ctor. |
| Method Summary | |
|---|---|
protected static Action |
buildAction(org.w3c.dom.Element element)
Builds an action from an XML element. |
protected static BooleanVariableAssignmentImpl |
buildAssignment(java.util.Map variables,
org.w3c.dom.Element element)
Builds an assignment object from an XML element. |
protected static Condition |
buildCondition(org.w3c.dom.Element element)
Builds a condition from an XML element. |
protected static EventImpl |
buildEvent(org.w3c.dom.Element element)
Builds an event from an XML element. |
protected static StateImpl |
buildState(org.w3c.dom.Element element)
Builds a state from an XML element. |
protected static TransitionImpl |
buildTransition(org.w3c.dom.Element element,
java.util.Map states,
java.util.Map events,
java.util.Map variables)
Builds a transition from an XML element. |
protected static BooleanVariableImpl |
buildVariable(org.w3c.dom.Element element)
Builds a boolean variable from an XML element. |
protected static WorkflowImpl |
buildWorkflow(org.w3c.dom.Document document)
Builds a workflow object from an XML document. |
static WorkflowImpl |
buildWorkflow(java.io.File file)
Builds a workflow schema from a file. |
protected static boolean |
isInitialStateElement(org.w3c.dom.Element element)
Checks if a state element contains the initial state. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String STATE_ELEMENT
protected static final java.lang.String TRANSITION_ELEMENT
protected static final java.lang.String EVENT_ELEMENT
protected static final java.lang.String CONDITION_ELEMENT
protected static final java.lang.String ACTION_ELEMENT
protected static final java.lang.String ID_ATTRIBUTE
protected static final java.lang.String INITIAL_ATTRIBUTE
protected static final java.lang.String SOURCE_ATTRIBUTE
protected static final java.lang.String DESTINATION_ATTRIBUTE
protected static final java.lang.String CLASS_ATTRIBUTE
protected static final java.lang.String VARIABLE_ELEMENT
protected static final java.lang.String ASSIGNMENT_ELEMENT
protected static final java.lang.String VARIABLE_ATTRIBUTE
protected static final java.lang.String VALUE_ATTRIBUTE
protected static final java.lang.String NAME_ATTRIBUTE
protected static final java.lang.String SYNCHRONIZED_ATTRIBUTE
| Constructor Detail |
|---|
protected WorkflowBuilder()
| Method Detail |
|---|
public static WorkflowImpl buildWorkflow(java.io.File file)
throws WorkflowException
file - The file.
WorkflowException - if the file does not represent a valid workflow schema.
protected static WorkflowImpl buildWorkflow(org.w3c.dom.Document document)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException,
WorkflowException
document - The XML document.
javax.xml.parsers.ParserConfigurationException - when something went wrong.
org.xml.sax.SAXException - when something went wrong.
java.io.IOException - when something went wrong.
WorkflowException - when something went wrong.protected static boolean isInitialStateElement(org.w3c.dom.Element element)
element - An XML element.
protected static StateImpl buildState(org.w3c.dom.Element element)
element - An XML element.
protected static TransitionImpl buildTransition(org.w3c.dom.Element element,
java.util.Map states,
java.util.Map events,
java.util.Map variables)
throws WorkflowException
element - An XML element.states - A map from state IDs to states.events - A map from event IDs to events.variables - A map from variable names to variables.
WorkflowException - when something went wrong.protected static EventImpl buildEvent(org.w3c.dom.Element element)
element - An XML element.
protected static Condition buildCondition(org.w3c.dom.Element element)
throws WorkflowException
element - An XML element.
WorkflowException - when something went wrong.protected static Action buildAction(org.w3c.dom.Element element)
element - An XML element.
protected static BooleanVariableImpl buildVariable(org.w3c.dom.Element element)
element - An XML element.
protected static BooleanVariableAssignmentImpl buildAssignment(java.util.Map variables,
org.w3c.dom.Element element)
throws WorkflowException
variables - A map from variable names to variables.element - An XML element.
WorkflowException - when something went wrong.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||