org.apache.jsieve.util.check
Class ScriptChecker.Results

java.lang.Object
  extended by org.apache.jsieve.util.check.ScriptChecker.Results
Enclosing class:
ScriptChecker

public static final class ScriptChecker.Results
extends java.lang.Object

Contains results of script execution.


Constructor Summary
ScriptChecker.Results(java.lang.Exception ex)
           
ScriptChecker.Results(java.util.List actions)
           
 
Method Summary
 java.util.List getActionsExecuted()
          Gets the actions executed by the script.
 java.lang.Exception getException()
          Gets the exception which was thrown during execution.
 boolean isActionFileInto(java.lang.String destination, int n)
          Is the n'th action a FileInto with given destination?
 boolean isActionKeep(int n)
          Is the n'th action a Keep?
 boolean isActionRedirect(java.lang.String address, int n)
          Is the n'th action a Redirect with given address?
 boolean isActionReject(java.lang.String message, int n)
          Is the n'th action a Reject with given message?
 boolean isPass()
          Is this a pass?
 java.lang.String toString()
          Prints out details of results.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScriptChecker.Results

public ScriptChecker.Results(java.lang.Exception ex)

ScriptChecker.Results

public ScriptChecker.Results(java.util.List actions)
Method Detail

isPass

public boolean isPass()
Is this a pass?

Returns:
true if the script executed without error, false if errors were encountered

getException

public java.lang.Exception getException()
Gets the exception which was thrown during execution.

Returns:
Exception or null if no exception was thrown

getActionsExecuted

public java.util.List getActionsExecuted()
Gets the actions executed by the script.

Returns:
List of actions or null if the script failed

isActionFileInto

public boolean isActionFileInto(java.lang.String destination,
                                int n)
Is the n'th action a FileInto with given destination?

Parameters:
destination - String destination for the file into
n - index to check
Returns:
true if the n'th action is a FileInto with given destination

isActionRedirect

public boolean isActionRedirect(java.lang.String address,
                                int n)
Is the n'th action a Redirect with given address?

Parameters:
address - String redirect address
n - index to check
Returns:
true if the n'th action is a Redirect with given redirect address

isActionReject

public boolean isActionReject(java.lang.String message,
                              int n)
Is the n'th action a Reject with given message?

Parameters:
message - String rejection message
n - index to check
Returns:
true if the n'th action is a Reject with given reject message

isActionKeep

public boolean isActionKeep(int n)
Is the n'th action a Keep?

Parameters:
n - index to check
Returns:
true if the n'th action is a Keep

toString

public java.lang.String toString()
Prints out details of results.

Overrides:
toString in class java.lang.Object


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