COM.TIBCO.hawk.config.rbengine.rulebase
Class Test

java.lang.Object
  extended by COM.TIBCO.hawk.config.rbengine.rulebase.RulebaseElement
      extended by COM.TIBCO.hawk.config.rbengine.rulebase.Test
All Implemented Interfaces:
java.lang.Cloneable

public class Test
extends RulebaseElement

Test objects define the tests which are performed on the rule's data and what actions to take. A Test object consists primarilly of a test expresssion and a list of actions.


Field Summary
static java.lang.String CNAME
           
 
Constructor Summary
Test(ConsequenceAction[] actions, Operator Op)
          Constructs a Test object
Test(COM.TIBCO.hawk.util.xml.XmlElementNode xmlNode)
          Constructs a Test
 
Method Summary
 java.lang.Object clone()
          Returns a copy of this object
 java.lang.Object[] convertEventLogMABasedOperator(java.lang.Object[] items)
           
 boolean equals(java.lang.Object obj)
          Compares two Tests for equality.
 ClearAction[] getClearActions()
          Returns the clear actions.
 ClearConditionPolicy getClearConditionPolicy()
          Returns the clear condition policy
 ConsequenceAction[] getConsequenceActions()
          Returns the consequence actions.
 java.lang.String getConvertedString(java.lang.String str)
           
 Operator getTestExpressionOperator()
          Returns the test expression operator.
 TrueConditionPolicy getTrueConditionPolicy()
          Returns the true condition policy
 boolean isConverted()
           
 COM.TIBCO.hawk.talon.MethodInvocation performEventLogMAConversion(COM.TIBCO.hawk.talon.MethodInvocation mi)
           
 void setClearActions(ClearAction[] clearActions)
          Sets the clear actions.
 void setClearConditionPolicy(ClearConditionPolicy policy)
          Sets the clear condition policy The only supported ClearConditionPolicy types are ClearOnFirstFalse, ClearTimer, and ClearTest
 void setConsequenceActions(ConsequenceAction[] actions)
          Sets the consequence actions.
 void setTestExpressionOperator(Operator op)
          Sets the test expression operator.
 void setTrueConditionPolicy(TrueConditionPolicy policy)
          Sets the true condition policy.
 java.lang.String toString()
          Returns string representation of this test.
 
Methods inherited from class COM.TIBCO.hawk.config.rbengine.rulebase.RulebaseElement
getName, getSchedule, setName, setSchedule
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CNAME

public static java.lang.String CNAME
Constructor Detail

Test

public Test(ConsequenceAction[] actions,
            Operator Op)
     throws java.lang.IllegalArgumentException
Constructs a Test object

Parameters:
actions - the test's consequence actions
op - the Operator object forming the test expression, must be an Operator object that returns a Boolean value.
Throws:
java.lang.IllegalArgumentException - if either argument is null
java.lang.IllegalArgumentException - if the test expression operator doesn't return a Boolean value;

Test

public Test(COM.TIBCO.hawk.util.xml.XmlElementNode xmlNode)
     throws RulebaseException
Constructs a Test

Parameters:
xmlNode - XML node that contain the DataSource
Throws:
RulebaseException
Please refer
XmlElementNode
Method Detail

getTestExpressionOperator

public Operator getTestExpressionOperator()
Returns the test expression operator.


isConverted

public boolean isConverted()

setTestExpressionOperator

public void setTestExpressionOperator(Operator op)
                               throws java.lang.IllegalArgumentException
Sets the test expression operator.

Parameters:
op - the Operator object forming the test expression, must be an Operator object that returns a Boolean value.
Throws:
java.lang.IllegalArgumentException - if op is null
java.lang.IllegalArgumentException - if the test expression operator doesn't return a Boolean value;

getConsequenceActions

public ConsequenceAction[] getConsequenceActions()
Returns the consequence actions.


getClearActions

public ClearAction[] getClearActions()
Returns the clear actions.


getTrueConditionPolicy

public TrueConditionPolicy getTrueConditionPolicy()
Returns the true condition policy


getClearConditionPolicy

public ClearConditionPolicy getClearConditionPolicy()
Returns the clear condition policy


setClearActions

public void setClearActions(ClearAction[] clearActions)
Sets the clear actions.

Parameters:
actions - the array of conequence actions, all actions must have unique names
Throws:
java.lang.IllegalArgumentException - if the actions do not have unique names

setConsequenceActions

public void setConsequenceActions(ConsequenceAction[] actions)
                           throws java.lang.IllegalArgumentException
Sets the consequence actions.

Parameters:
actions - the array of conequence actions, all actions must have unique names
Throws:
java.lang.IllegalArgumentException - if actions is null
java.lang.IllegalArgumentException - if the actions do not have unique names

setTrueConditionPolicy

public void setTrueConditionPolicy(TrueConditionPolicy policy)
                            throws java.lang.IllegalArgumentException
Sets the true condition policy. The only supported TrueConditionPolicy type is TrueCountThreshold.

Parameters:
policy - the true condition policy
Throws:
java.lang.IllegalArgumentException - if policy is null
java.lang.IllegalArgumentException - if policy is not supported.

setClearConditionPolicy

public void setClearConditionPolicy(ClearConditionPolicy policy)
                             throws java.lang.IllegalArgumentException
Sets the clear condition policy The only supported ClearConditionPolicy types are ClearOnFirstFalse, ClearTimer, and ClearTest

Parameters:
policy - the clear condition policy
Throws:
java.lang.IllegalArgumentException - if policy is null
java.lang.IllegalArgumentException - if policy is not supported.

toString

public java.lang.String toString()
Returns string representation of this test.

Overrides:
toString in class java.lang.Object
Returns:
the name of the test

equals

public boolean equals(java.lang.Object obj)
Compares two Tests for equality.

Overrides:
equals in class RulebaseElement
Returns:
true if the objects are the same; false otherwise

clone

public java.lang.Object clone()
Returns a copy of this object

Specified by:
clone in class RulebaseElement

performEventLogMAConversion

public COM.TIBCO.hawk.talon.MethodInvocation performEventLogMAConversion(COM.TIBCO.hawk.talon.MethodInvocation mi)

getConvertedString

public java.lang.String getConvertedString(java.lang.String str)

convertEventLogMABasedOperator

public java.lang.Object[] convertEventLogMABasedOperator(java.lang.Object[] items)


Copyright © 2000-2014 TIBCO Inc. All Rights Reserved.