org.apache.jsieve.commands
Class Require

java.lang.Object
  extended byorg.apache.jsieve.commands.AbstractCommand
      extended byorg.apache.jsieve.commands.AbstractPrologCommand
          extended byorg.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)
          Method validateCommand.
protected  void validateFeature(java.lang.String name, MailAdapter mail)
          Method validateFeature validates the required feature is configured as either a Command or a Test.
protected  void validateTest(java.lang.String name)
          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
Parameters:
mail -
arguments -
block -
context - SieveContext giving contextual information, not null
Returns:
Object
Throws:
SieveException
See Also:


validateFeature

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

Parameters:
name -
mail -
Throws:
FeatureException

validateCommand

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

Parameters:
name -
Throws:
LookupException

validateTest

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

Parameters:
name -
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
Parameters:
arguments -
context - SieveContext giving contextual information, not null
Throws:
SieveException
See Also:
AbstractCommand.validateArguments(Arguments, SieveContext)


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