org.apache.jsieve
Class Test

java.lang.Object
  extended by org.apache.jsieve.Test
All Implemented Interfaces:
Executable

public class Test
extends java.lang.Object
implements Executable

A parsed representation of an RFC3028 test argument...

test = identifier arguments


Constructor Summary
Test(java.lang.String name, Arguments arguments)
          Constructor for Test.
 
Method Summary
 java.lang.Object execute(MailAdapter mail, SieveContext context)
           
 Arguments getArguments()
          Returns the arguments.
 java.lang.String getName()
          Returns the name.
 boolean isTestPassed(MailAdapter mail, SieveContext context)
          Is this test passed for the given mail?
protected  void setArguments(Arguments arguments)
          Sets the arguments.
protected  void setName(java.lang.String name)
          Sets the name.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Test

public Test(java.lang.String name,
            Arguments arguments)
Constructor for Test.

Parameters:
name -
arguments -
Method Detail

execute

public java.lang.Object execute(MailAdapter mail,
                                SieveContext context)
                         throws SieveException
Specified by:
execute in interface Executable
Throws:
SieveException
See Also:
Executable.execute(MailAdapter, SieveContext)

isTestPassed

public boolean isTestPassed(MailAdapter mail,
                            SieveContext context)
                     throws LookupException,
                            SieveException
Is this test passed for the given mail?

Parameters:
mail - not null
context - not null
Returns:
true when the test passes, false otherwise
Throws:
LookupException
SieveException

getArguments

public Arguments getArguments()
Returns the arguments.

Returns:
Arguments

getName

public java.lang.String getName()
Returns the name.

Returns:
String

setArguments

protected void setArguments(Arguments arguments)
Sets the arguments.

Parameters:
arguments - The arguments to set

setName

protected void setName(java.lang.String name)
Sets the name.

Parameters:
name - The name to set

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


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