org.apache.jsieve.tests
Class Size

java.lang.Object
  extended by org.apache.jsieve.tests.AbstractTest
      extended by org.apache.jsieve.tests.Size
All Implemented Interfaces:
ExecutableTest

public class Size
extends AbstractTest

Class Size implements the Size Test as defined in RFC 3028, section 5.9.


Constructor Summary
Size()
          Constructor for Size.
 
Method Summary
protected  boolean executeBasic(MailAdapter mail, Arguments arguments, SieveContext context)
          Abstract method executeBasic invokes a Sieve Test.
protected  boolean test(MailAdapter mail, java.lang.String comparator, int size)
          Method test.
protected  boolean testOver(MailAdapter mail, int size)
          Method testOver.
protected  boolean testUnder(MailAdapter mail, int size)
          Method testUnder.
protected  void validateArguments(Arguments arguments, SieveContext context)
          Framework method validateArguments is invoked before a Sieve Test is executed to validate its arguments.
 
Methods inherited from class org.apache.jsieve.tests.AbstractTest
execute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Size

public Size()
Constructor for Size.

Method Detail

executeBasic

protected boolean executeBasic(MailAdapter mail,
                               Arguments arguments,
                               SieveContext context)
                        throws SyntaxException,
                               SieveMailException
Description copied from class: AbstractTest
Abstract method executeBasic invokes a Sieve Test.

Specified by:
executeBasic in class AbstractTest
context - SieveContext giving contextual information, not null
Returns:
boolean
Throws:
SyntaxException
SieveMailException
See Also:

From RFC 3028, Section 5.9...

Syntax: size <"e;:over""e; / "e;:under"e;> <limit: number>

test

protected boolean test(MailAdapter mail,
                       java.lang.String comparator,
                       int size)
                throws SieveMailException
Method test.

Parameters:
mail -
comparator -
size -
Returns:
boolean
Throws:
SieveMailException

testUnder

protected boolean testUnder(MailAdapter mail,
                            int size)
                     throws SieveMailException
Method testUnder.

Parameters:
mail -
size -
Returns:
boolean
Throws:
SieveMailException

testOver

protected boolean testOver(MailAdapter mail,
                           int size)
                    throws SieveMailException
Method testOver.

Parameters:
mail -
size -
Returns:
boolean
Throws:
SieveMailException

validateArguments

protected void validateArguments(Arguments arguments,
                                 SieveContext context)
                          throws SieveException
Description copied from class: AbstractTest
Framework method validateArguments is invoked before a Sieve Test 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 AbstractTest
context - SieveContext giving comntextual information, not null
Throws:
SieveException
See Also:
AbstractTest.validateArguments(Arguments, SieveContext)


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