public abstract class Action extends Object implements NamespacePrefixesHolder, Serializable
Constructor and Description |
---|
Action()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
execute(ActionExecutionContext exctx)
Execute this action instance.
|
Map<String,String> |
getNamespaces()
Get the XML namespaces at this action node in the SCXML document.
|
protected static String |
getNamespacesKey()
Return the key under which the current document namespaces are saved
in the parent state's context.
|
Executable |
getParent()
Get the Executable parent.
|
EnterableState |
getParentEnterableState()
Return the
EnterableState whose Context this action
executes in. |
protected Object |
getTextContentIfNodeResult(Object result)
Convenient method to convert a possible
Node result from an expression evaluation to a String
using its Node.getTextContent() method. |
void |
setNamespaces(Map<String,String> namespaces)
Set the XML namespaces at this action node in the SCXML document.
|
void |
setParent(Executable parent)
Set the Executable parent.
|
public Action()
public final Executable getParent()
public final void setParent(Executable parent)
parent
- The parent to set.public final Map<String,String> getNamespaces()
getNamespaces
in interface NamespacePrefixesHolder
public final void setNamespaces(Map<String,String> namespaces)
setNamespaces
in interface NamespacePrefixesHolder
namespaces
- The document namespaces.public EnterableState getParentEnterableState() throws ModelException
EnterableState
whose Context
this action
executes in.EnterableState
ModelException
- For an unknown EnterableState subclasspublic abstract void execute(ActionExecutionContext exctx) throws ModelException, SCXMLExpressionException
exctx
- The ActionExecutionContext for this execution instanceModelException
- If the execution causes the model to enter
a non-deterministic state.SCXMLExpressionException
- If the execution involves trying
to evaluate an expression which is malformed.protected static String getNamespacesKey()
protected Object getTextContentIfNodeResult(Object result)
Node
result from an expression evaluation to a String
using its Node.getTextContent()
method.result
- the result to convertNode
otherwise the unmodified result itselfCopyright © 2005–2015 The Apache Software Foundation. All rights reserved.