org.inria.ns.reflex.processor.exp
Class InvokeAction

java.lang.Object
  extended by org.inria.ns.reflex.processor.core.AbstractAction
      extended by org.inria.ns.reflex.processor.core.AbstractSetAction
          extended by org.inria.ns.reflex.processor.exp.InvokeAction
All Implemented Interfaces:
Computable, Executable, Presentable, NamespaceContextFactory
Direct Known Subclasses:
InvokeAction.Async

public class InvokeAction
extends AbstractSetAction

The <exp:invoke> element is used to invoke a processor instance with a data set.

Author:
Philippe Poulard

Nested Class Summary
static class InvokeAction.Async
          An asynchrone invoker.
 
Nested classes/interfaces inherited from class org.inria.ns.reflex.processor.core.AbstractAction
AbstractAction.ParameterAdapter, AbstractAction.UselessAction
 
Field Summary
 
Fields inherited from class org.inria.ns.reflex.processor.core.AbstractSetAction
NO_VALUE
 
Fields inherited from class org.inria.ns.reflex.processor.core.AbstractAction
actions, parent, processorInstance
 
Constructor Summary
InvokeAction(Expression processor, Element element, AbstractAction parent)
          Creates a new instance of InvokeAction.
 
Method Summary
 void addAction(AbstractAction action)
          Special registration of an ExportsAction encountered ; other actions are added as usual to the parent action.
 Object getComputedValue(DataSet dataSet)
          Return the computed value of the property.
static AbstractAction unmarshal(AbstractAction parent, Element element)
          XML unmarshaller for InvokeAction.
 
Methods inherited from class org.inria.ns.reflex.processor.core.AbstractSetAction
addProperty, getComputedName, getName, getValue, runAction, scope, unmarshalScope
 
Methods inherited from class org.inria.ns.reflex.processor.core.AbstractAction
addFallbackAction, createContext, getCanonicalPath, getFallbackAction, getLocalFallbackAction, getLogger, getNamespaceContext, getNode, getParent, recover, recover, removeFallbackAction, reorganize, run, runActions, toPrettyString, toPrettyString, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InvokeAction

public InvokeAction(Expression processor,
                    Element element,
                    AbstractAction parent)
             throws XMLException
Creates a new instance of InvokeAction.

Parameters:
processor - The processor to invoke, as an Expression.
sync - Indicates whether the processor to run must be synchronised or not with the caller.
node - The node from which the action has been unmarshalled. Used for namespace prefix resolution when performing XPath expressions.
parent - The action depending from.
Throws:
XMLException
Method Detail

unmarshal

public static AbstractAction unmarshal(AbstractAction parent,
                                       Element element)
                                throws XMLException
XML unmarshaller for InvokeAction.

Parameters:
parent - The action depending from
element - The XML element to unmarshall.
Returns:
The InvokeAction created.
Throws:
UnmarshalException - When the element and its content is not those expected.
XMLException

addAction

public void addAction(AbstractAction action)
Special registration of an ExportsAction encountered ; other actions are added as usual to the parent action.

Overrides:
addAction in class AbstractAction
Parameters:
action - The child action to add.
See Also:
AbstractAction.addAction(AbstractAction)

getComputedValue

public Object getComputedValue(DataSet dataSet)
                        throws ExecutionException,
                               XPathException
Return the computed value of the property.

Specified by:
getComputedValue in interface Computable
Specified by:
getComputedValue in class AbstractSetAction
Parameters:
dataSet - The set of datas used when the name is computed.
Returns:
The computed value of the property.
Throws:
ExecutionException - If the computation can't be performed.
XPathException