com.cyscape.browserhawk
Class RuleEngineResult

java.lang.Object
  extended bycom.cyscape.browserhawk.RuleEngineResult

public class RuleEngineResult
extends java.lang.Object

This class encapsulates the result of a RuleEngine execution. With it you you can examine the generated HTML table or redirect URL and determine which and how many tests were pass, fail, warn, info, or suppress.


Constructor Summary
RuleEngineResult()
           
 
Method Summary
 int getFailCount()
          Returns the number of tests in the execution that were Fail
 java.lang.String[] getFailIds()
          Returns the set of test ids in the execution that were Fail
 java.lang.String getHtmlTable()
          Returns the generated HTML table, or null if none.
 int getInfoCount()
          Returns the number of tests in the execution that were Info
 java.lang.String[] getInfoIds()
          Returns the set of test ids in the execution that were Info
 int getPassCount()
          Returns the number of tests in the execution that were Pass
 java.lang.String[] getPassIds()
          Returns the set of test ids in the execution that were Pass
 java.lang.String getRedirect()
          Returns the redirect URL, or null if none.
 int getSuppressCount()
          Returns the number of tests in the execution that were Suppress
 java.lang.String[] getSuppressIds()
          Returns the set of test ids in the execution that were Suppress
 int getTotalCount()
          Returns the total number of tests in the rule execution
 int getWarnCount()
          Returns the number of tests in the execution that were Warn
 java.lang.String[] getWarnIds()
          Returns the set of test ids in the execution that were Warn
 boolean isFail(java.lang.String id)
          Returns true if the given test id failed
 boolean isInfo(java.lang.String id)
          Returns true if the given test id was info
 boolean isPass(java.lang.String id)
          Returns true if the given test id passed
 boolean isSuppress(java.lang.String id)
          Returns true if the given test id was suppressed
 boolean isWarn(java.lang.String id)
          Returns true if the given test id warned
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuleEngineResult

public RuleEngineResult()
Method Detail

getRedirect

public java.lang.String getRedirect()
Returns the redirect URL, or null if none. The redirect URL is determined by the first redirect command in the rules file that matches.

Returns:
the redirect URL, or null if none

getHtmlTable

public java.lang.String getHtmlTable()
Returns the generated HTML table, or null if none. The HTML table is determined by the rules file and is present when there was not an overriding redirect.

Returns:
the HTML table, or null if none

getPassCount

public int getPassCount()
Returns the number of tests in the execution that were Pass

Returns:
the number of tests that passed

getPassIds

public java.lang.String[] getPassIds()
Returns the set of test ids in the execution that were Pass

Returns:
the set of test ids that passed

isPass

public boolean isPass(java.lang.String id)
Returns true if the given test id passed

Parameters:
id - the test id to examine
Returns:
true if the given test id passed

getFailCount

public int getFailCount()
Returns the number of tests in the execution that were Fail

Returns:
the number of tests that failed

getFailIds

public java.lang.String[] getFailIds()
Returns the set of test ids in the execution that were Fail

Returns:
the set of test ids that failed

isFail

public boolean isFail(java.lang.String id)
Returns true if the given test id failed

Parameters:
id - the test id to examine
Returns:
true if the given test id failed

getWarnCount

public int getWarnCount()
Returns the number of tests in the execution that were Warn

Returns:
the number of tests that warned

getWarnIds

public java.lang.String[] getWarnIds()
Returns the set of test ids in the execution that were Warn

Returns:
the set of test ids that warned

isWarn

public boolean isWarn(java.lang.String id)
Returns true if the given test id warned

Parameters:
id - the test id to examine
Returns:
true if the given test id warned

getInfoCount

public int getInfoCount()
Returns the number of tests in the execution that were Info

Returns:
the number of tests that were info

getInfoIds

public java.lang.String[] getInfoIds()
Returns the set of test ids in the execution that were Info

Returns:
the set of test ids that were info

isInfo

public boolean isInfo(java.lang.String id)
Returns true if the given test id was info

Parameters:
id - the test id to examine
Returns:
true if the given test id was info

getSuppressCount

public int getSuppressCount()
Returns the number of tests in the execution that were Suppress

Returns:
the number of tests that were suppressed

getSuppressIds

public java.lang.String[] getSuppressIds()
Returns the set of test ids in the execution that were Suppress

Returns:
the set of test ids that were suppressed

isSuppress

public boolean isSuppress(java.lang.String id)
Returns true if the given test id was suppressed

Parameters:
id - the test id to examine
Returns:
true if the given test id was suppressed

getTotalCount

public int getTotalCount()
Returns the total number of tests in the rule execution

Returns:
the total number of tests that were executed