org.apache.jsieve.commands
Class AbstractActionCommand

java.lang.Object
  extended by org.apache.jsieve.commands.AbstractCommand
      extended by org.apache.jsieve.commands.AbstractBodyCommand
          extended by org.apache.jsieve.commands.AbstractActionCommand
All Implemented Interfaces:
ExecutableCommand
Direct Known Subclasses:
Discard, FileInto, Keep, Redirect, Reject

public abstract class AbstractActionCommand
extends AbstractBodyCommand

Abstract class AbstractActionCommand defines the common state validation and state update behavior for Action Commands as per RFC 3028, section 8.


Constructor Summary
AbstractActionCommand()
          Constructor for AbstractActionCommand.
 
Method Summary
protected  void updateState(SieveContext context)
           Method updateState() updates the CommandStateManager to indicate an Action Command has been processed and to cancel implicit keep.
protected  void validateSingleStringArguments(Arguments arguments, SieveContext context)
          This is an utility method for subclasses
protected  void validateState(SieveContext context)
           Method validateState() validates via the CommandStateManager that an Action Command is legal at this time.
 
Methods inherited from class org.apache.jsieve.commands.AbstractCommand
execute, executeBasic, validateArguments, validateBlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractActionCommand

public AbstractActionCommand()
Constructor for AbstractActionCommand.

Method Detail

updateState

protected void updateState(SieveContext context)

Method updateState() updates the CommandStateManager to indicate an Action Command has been processed and to cancel implicit keep.

And also

Overrides:
updateState in class AbstractBodyCommand
Parameters:
context - not null
See Also:
AbstractCommand.updateState(SieveContext)

validateState

protected void validateState(SieveContext context)
                      throws CommandException

Method validateState() validates via the CommandStateManager that an Action Command is legal at this time.

Also,

Overrides:
validateState in class AbstractCommand
Parameters:
context - SieveContext giving contextual information, not null
Throws:
CommandException
See Also:
AbstractCommand.validateState(SieveContext)

validateSingleStringArguments

protected void validateSingleStringArguments(Arguments arguments,
                                             SieveContext context)
                                      throws SieveException
This is an utility method for subclasses

Throws:
SieveException
See Also:
Redirect, FileInto, Reject


Copyright © 2008-2009 The Apache Software Foundation. All Rights Reserved.