org.apache.jsieve.commands
Class AbstractConditionalCommand

java.lang.Object
  extended byorg.apache.jsieve.commands.AbstractCommand
      extended byorg.apache.jsieve.commands.AbstractBodyCommand
          extended byorg.apache.jsieve.commands.AbstractControlCommand
              extended byorg.apache.jsieve.commands.AbstractConditionalCommand
All Implemented Interfaces:
ExecutableCommand
Direct Known Subclasses:
Else, Elsif, If

public abstract class AbstractConditionalCommand
extends AbstractControlCommand

Abstract class AbstractConditionalCommand defines a framework of common behavior for conditional Commands (if, elsif, else). Conditional commands use a ConditionManager to relate and validate Commands within their Blocks.


Constructor Summary
AbstractConditionalCommand()
          Constructor for AbstractConditionalCommand.
 
Method Summary
protected  java.lang.Object execute(MailAdapter mail, Block block)
          Method execute executes a Block within the context of a new ConditionManager.
protected  void validateBlock(Block block, SieveContext context)
          Framework method validateBlock is invoked before a Sieve Command is executed to validate its Block.
 
Methods inherited from class org.apache.jsieve.commands.AbstractBodyCommand
updateState
 
Methods inherited from class org.apache.jsieve.commands.AbstractCommand
execute, executeBasic, validateArguments, validateState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractConditionalCommand

public AbstractConditionalCommand()
Constructor for AbstractConditionalCommand.

Method Detail

execute

protected java.lang.Object execute(MailAdapter mail,
                                   Block block)
                            throws SieveException
Method execute executes a Block within the context of a new ConditionManager.

Parameters:
mail -
block -
Returns:
Object
Throws:
SieveException

validateBlock

protected void validateBlock(Block block,
                             SieveContext context)
                      throws SieveException
Description copied from class: AbstractCommand
Framework method validateBlock is invoked before a Sieve Command is executed to validate its Block. Subclass methods are expected to override or extend this method to perform their own validation as appropriate.

Overrides:
validateBlock in class AbstractCommand
Parameters:
block -
context - ScriptCoordinate giving positional information, not null
Throws:
SieveException
See Also:
AbstractCommand.validateBlock(Block, SieveContext)


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