org.inria.ns.reflex.processor.core
Class LogicAction

java.lang.Object
  extended by org.inria.ns.reflex.processor.core.AbstractAction
      extended by org.inria.ns.reflex.processor.core.NoAction
          extended by org.inria.ns.reflex.processor.core.LogicAction
All Implemented Interfaces:
Executable, Presentable, NamespaceContextFactory

public class LogicAction
extends NoAction

This class defines a named logic procedure. If the name is missing, it is the default logic procedure. At runtime, this action does nothing. It must be invoked with another action that will execute the subactions with runActions(), or with call(DataSet) that takes care of exceptions.

Author:
Philippe Poulard

Nested Class Summary
 
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.NoAction
NO_ACTION
 
Fields inherited from class org.inria.ns.reflex.processor.core.AbstractAction
actions, parent, processorInstance
 
Constructor Summary
LogicAction(Node node, AbstractAction parent)
          Creates a new instance of LogicAction.
 
Method Summary
 void call(DataSet dataSet)
          As any logic action must not be executed when encountered, this logic action will be really run only with this method.
static AbstractAction unmarshal(AbstractAction parent, Element element)
          XML unmarshaller for LogicAction.
 
Methods inherited from class org.inria.ns.reflex.processor.core.NoAction
runAction
 
Methods inherited from class org.inria.ns.reflex.processor.core.AbstractAction
addAction, 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

LogicAction

public LogicAction(Node node,
                   AbstractAction parent)
Creates a new instance of LogicAction.

Parameters:
node - The node from which the action has been unmarshalled. Used for namespace prefix resolution when performing XPath expressions.
parent - The action depending from.
Method Detail

unmarshal

public static AbstractAction unmarshal(AbstractAction parent,
                                       Element element)
                                throws XMLException
XML unmarshaller for LogicAction. The action created is registered to the processor instance.

Parameters:
parent - The action depending from
element - The XML element to unmarshall.
Returns:
The LogicAction created.
Throws:
UnmarshalException - When the element and its content is not those expected.
XMLException
See Also:
ProcessorInstance.addNamedLogicProcedure(AbstractAction, Element, AbstractAction)

call

public void call(DataSet dataSet)
          throws ExecutionException,
                 XPathException
As any logic action must not be executed when encountered, this logic action will be really run only with this method.

Parameters:
dataSet - The set of datas used when the action is running.
Throws:
ExecutionException - If the action can't be performed.
XPathException