org.apache.jsieve.tests
Class Header

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

public class Header
extends AbstractTest

Class Header implements the Header Test as defined in RFC 3028, section 5.7.


Constructor Summary
Header()
          Constructor for Header.
 
Method Summary
protected  boolean executeBasic(MailAdapter mail, Arguments arguments, SieveContext context)
           From RFC 3028, Section 5.7...
protected  boolean match(MailAdapter mail, java.lang.String comparator, java.lang.String matchType, java.util.List<java.lang.String> headerNames, java.util.List<java.lang.String> keys, SieveContext context)
          Method match.
protected  boolean match(java.lang.String comparator, java.lang.String matchType, java.util.List<java.lang.String> headerValues, java.util.List<java.lang.String> keys, SieveContext context)
          Method match.
protected  boolean match(java.lang.String comparator, java.lang.String matchType, java.lang.String headerValue, java.util.List<java.lang.String> keys, SieveContext context)
          Method match.
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

Header

public Header()
Constructor for Header.

Method Detail

executeBasic

protected boolean executeBasic(MailAdapter mail,
                               Arguments arguments,
                               SieveContext context)
                        throws SieveException

From RFC 3028, Section 5.7...

Syntax: header [COMPARATOR] [MATCH-TYPE] <header-names: string-list> <key-list: string-list>

Note that the spec. then goes on to give an example where the order of the optional parts is different, so I guess that the order is optional too!

Specified by:
executeBasic in class AbstractTest
context - SieveContext giving contextual information, not null
Returns:
boolean
Throws:
SieveException
See Also:
AbstractTest.executeBasic(MailAdapter, Arguments, SieveContext)

match

protected boolean match(MailAdapter mail,
                        java.lang.String comparator,
                        java.lang.String matchType,
                        java.util.List<java.lang.String> headerNames,
                        java.util.List<java.lang.String> keys,
                        SieveContext context)
                 throws SieveException
Method match.

Parameters:
mail -
comparator -
matchType -
headerNames -
keys -
context - not null
Returns:
boolean
Throws:
SieveException

match

protected boolean match(java.lang.String comparator,
                        java.lang.String matchType,
                        java.util.List<java.lang.String> headerValues,
                        java.util.List<java.lang.String> keys,
                        SieveContext context)
                 throws SieveException
Method match.

Parameters:
comparator -
matchType -
headerValues -
keys -
context - not null
Returns:
boolean
Throws:
SieveException

match

protected boolean match(java.lang.String comparator,
                        java.lang.String matchType,
                        java.lang.String headerValue,
                        java.util.List<java.lang.String> keys,
                        SieveContext context)
                 throws SieveException
Method match.

Parameters:
comparator -
matchType -
headerValue -
keys -
context - not null
Returns:
boolean
Throws:
SieveException

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.