org.apache.jsieve.commands
Class Require

java.lang.Object
  extended by org.apache.jsieve.commands.AbstractCommand
      extended by org.apache.jsieve.commands.AbstractPrologCommand
          extended by org.apache.jsieve.commands.Require
All Implemented Interfaces:
ExecutableCommand

public class Require
extends AbstractPrologCommand

Class Require implements the Require Command as defined in RFC 3028, section 3.2.


Constructor Summary
Require()
          Constructor for Require.
 
Method Summary
protected  java.lang.Object executeBasic(MailAdapter mail, Arguments arguments, Block block, SieveContext context)
           Ensure the required feature is configured.
protected  void validateArguments(Arguments arguments, SieveContext context)
          Framework method validateArguments is invoked before a Sieve Command is executed to validate its arguments.
protected  void validateCommand(java.lang.String name, SieveContext context)
          Method validateCommand.
protected  void validateFeature(java.lang.String name, MailAdapter mail, SieveContext context)
          Method validateFeature validates the required feature is configured as either a Command or a Test.
protected  void validateTest(java.lang.String name, SieveContext context)
          Method validateTest.
 
Methods inherited from class org.apache.jsieve.commands.AbstractPrologCommand
validateState
 
Methods inherited from class org.apache.jsieve.commands.AbstractCommand
execute, updateState, validateBlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Require

public Require()
Constructor for Require.

Method Detail

executeBasic

protected java.lang.Object executeBasic(MailAdapter mail,
                                        Arguments arguments,
                                        Block block,
                                        SieveContext context)
                                 throws SieveException

Ensure the required feature is configured.

Also,

Specified by:
executeBasic in class AbstractCommand
context - SieveContext giving contextual information, not null
Returns:
Object
Throws:
SieveException
See Also:


validateFeature

protected void validateFeature(java.lang.String name,
                               MailAdapter mail,
                               SieveContext context)
                        throws FeatureException
Method validateFeature validates the required feature is configured as either a Command or a Test.

Parameters:
name -
mail -
context - not nul
Throws:
FeatureException

validateCommand

protected void validateCommand(java.lang.String name,
                               SieveContext context)
                        throws LookupException
Method validateCommand.

Parameters:
name -
Throws:
LookupException

validateTest

protected void validateTest(java.lang.String name,
                            SieveContext context)
                     throws LookupException
Method validateTest.

Parameters:
name - not null
context - not null
Throws:
LookupException

validateArguments

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

Overrides:
validateArguments in class AbstractCommand
context - SieveContext giving contextual information, not null
Throws:
SieveException
See Also:
AbstractCommand.validateArguments(Arguments, SieveContext)


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