org.inria.ns.reflex.modules.web
Class ClearAction

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

public class ClearAction
extends AbstractAction

The <web:clear> element clears any data that exists in the buffer and eventually the status code and headers.

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.AbstractAction
actions, parent, processorInstance
 
Constructor Summary
ClearAction(boolean clearAll, Node node, AbstractAction parent)
          Creates a new instance of ClearAction.
 
Method Summary
 void runAction(DataSet dataSet)
          Execute the action by clearing the buffers and eventually the status code and headers.
static AbstractAction unmarshal(AbstractAction parent, Element element)
          XML unmarshaller for ClearAction.
 
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

ClearAction

public ClearAction(boolean clearAll,
                   Node node,
                   AbstractAction parent)
Creates a new instance of ClearAction.

Parameters:
clearAll - true if the status code and headers have to be clear, false if they have to be preserved.
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 ClearAction.

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

runAction

public void runAction(DataSet dataSet)
               throws ExecutionException,
                      XPathException
Execute the action by clearing the buffers and eventually the status code and headers.

Overrides:
runAction in class AbstractAction
Parameters:
dataSet - The set of datas used when the action is running.
Throws:
ExecutionException - If the action can't be performed.
XPathException
See Also:
AbstractAction.runAction(org.inria.ns.reflex.processor.DataSet)