|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jsieve.commands.AbstractCommand
Abstract class AbstractCommand defines a framework of common behavior for Sieve Commands.
Constructor Summary | |
AbstractCommand()
Constructor for AbstractCommand. |
Method Summary | |
java.lang.Object |
execute(MailAdapter mail,
Arguments arguments,
Block block,
SieveContext context)
Method execute executes a basic Sieve Command after first invoking framework methods to validate that Sieve is in a legal state to invoke the Command and that the Command arguments are legal. |
protected abstract java.lang.Object |
executeBasic(MailAdapter mail,
Arguments arguments,
Block block,
SieveContext context)
Abstract method executeBasic invokes a Sieve Command. |
protected void |
updateState()
Framework method updateState is invoked after a Sieve Command has executed to update the Sieve state. |
protected void |
validateArguments(Arguments arguments,
SieveContext context)
Framework method validateArguments is invoked before a Sieve Command is executed to validate its arguments. |
protected void |
validateBlock(Block block,
SieveContext context)
Framework method validateBlock is invoked before a Sieve Command is executed to validate its Block. |
protected void |
validateState(SieveContext context)
Framework method validateState is invoked before a Sieve Command is executed to validate its state. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractCommand()
Method Detail |
protected void validateState(SieveContext context) throws CommandException
context
- SieveContext
giving contextual information,
not null
CommandException
protected void updateState()
protected void validateArguments(Arguments arguments, SieveContext context) throws SieveException
arguments
- context
- SieveContext
giving contextual information,
not null
SieveException
protected void validateBlock(Block block, SieveContext context) throws SieveException
block
- context
- ScriptCoordinate
giving positional
information, not null
SieveException
public java.lang.Object execute(MailAdapter mail, Arguments arguments, Block block, SieveContext context) throws SieveException
Method execute executes a basic Sieve Command after first invoking framework methods to validate that Sieve is in a legal state to invoke the Command and that the Command arguments are legal. After invocation, a framework method is invoked to update the state.
Also,
execute
in interface ExecutableCommand
mail
- -
The mail against which the Command is executed.arguments
- -
The Command argumentsblock
- -
An optional Block to be evaluatedcontext
- SieveContext
containing contextual
information, not null
SieveException
Executable.execute(MailAdapter)
protected abstract java.lang.Object executeBasic(MailAdapter mail, Arguments arguments, Block block, SieveContext context) throws SieveException
mail
- arguments
- block
- context
- SieveContext
giving contextual information,
not null
SieveException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |