com.ibm.retail.AEF.automation
Class PropertyRegexNotMatchCondition

java.lang.Object
  |
  +--com.ibm.retail.AEF.automation.AbstractCondition
        |
        +--com.ibm.retail.AEF.automation.AbstractPropertyCondition
              |
              +--com.ibm.retail.AEF.automation.PropertyRegexNotMatchCondition
All Implemented Interfaces:
AEFPropertyChangeListener, Condition, com.ibm.retail.AEF.automation.PropertyCondition, java.rmi.Remote

public class PropertyRegexNotMatchCondition
extends AbstractPropertyCondition

PropertyRegexNotMatchCondition listens to a POSDataProvider property and indicates whether the property value does not match a regular expression. The property being monitored is first converted to a String if it is not already a string data type. If the property is detected to not match the regular expression, the lock associated with this condition is notified, which will free a thread blocking on the lock.


Field Summary
protected  java.lang.String regex
           
 
Fields inherited from class com.ibm.retail.AEF.automation.AbstractPropertyCondition
category, name, nextOnly, value
 
Fields inherited from class com.ibm.retail.AEF.automation.AbstractCondition
counterLock, dataProvider, eligible, id, idCounter, index, listeners, lock, manager, session
 
Constructor Summary
PropertyRegexNotMatchCondition(com.ibm.retail.AEF.automation.PropertyRegexMatchCondition condition)
          Constructs the opposite of a PropertyRegexMatchCondition
PropertyRegexNotMatchCondition(java.lang.String cat, java.lang.String name, java.lang.String regex, boolean nextValueOnly)
          Constructs the condition
PropertyRegexNotMatchCondition(java.lang.String cat, java.lang.String name, java.lang.String value, java.lang.String regex)
          Constructs the condition
 
Method Summary
(package private) static java.lang.String copyright()
           
 boolean evaluate(java.lang.Object newVal)
          Evaluates the condition given a value object.
 java.lang.String explain()
          Returns a string explaining this condition.
 java.lang.String getRegex()
          Returns the regular expression for this condition.
 com.ibm.retail.AEF.automation.Condition makeOpposite()
          Makes a new condition which is the logical opposite of this condition.
 void propertyChanged(com.ibm.retail.AEF.event.AEFPropertyChangeEvent evt)
          A AEF POSDataProvider property was updated
 
Methods inherited from class com.ibm.retail.AEF.automation.AbstractPropertyCondition
currentValues, evaluate, getCategory, getNextOnly, getPropertyName, parseDouble, setEligible
 
Methods inherited from class com.ibm.retail.AEF.automation.AbstractCondition
addEvaluateListener, getID, getIndex, getNextID, getPOSDataProvider, getSession, getTerminalNumber, isEligible, notifyEvaluateConditionListeners, removeEvaluateListener, setConditionLock, setID, setIndex, setLockManager, setPOSDataProvider, setSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.retail.AEF.automation.Condition
addEvaluateListener, getID, getIndex, getPOSDataProvider, getSession, getTerminalNumber, isEligible, removeEvaluateListener, setConditionLock, setID, setIndex, setLockManager, setPOSDataProvider, setSession
 

Field Detail

regex

protected java.lang.String regex
Constructor Detail

PropertyRegexNotMatchCondition

public PropertyRegexNotMatchCondition(java.lang.String cat,
                                      java.lang.String name,
                                      java.lang.String regex,
                                      boolean nextValueOnly)
Constructs the condition

Parameters:
cat - The category name of the property to be monitored.
name - The property name to be monitored.
regex - The regular expression which will be used to compare the value of the property.
nextValueOnly - Set to true to compare only the next value of the property. If false, all values of the property change will be compared.

PropertyRegexNotMatchCondition

public PropertyRegexNotMatchCondition(com.ibm.retail.AEF.automation.PropertyRegexMatchCondition condition)
Constructs the opposite of a PropertyRegexMatchCondition

Parameters:
condition - The PropertyRegexMatchCondition to construct the opposite of.

PropertyRegexNotMatchCondition

public PropertyRegexNotMatchCondition(java.lang.String cat,
                                      java.lang.String name,
                                      java.lang.String value,
                                      java.lang.String regex)
Constructs the condition

Parameters:
cat - The category name of the property to be monitored.
name - The property name to be monitored.
value - The property value is compared to see if it contains this string.
regex - The regular expression which will be used to compare the value of the property.
Method Detail

copyright

static java.lang.String copyright()

makeOpposite

public com.ibm.retail.AEF.automation.Condition makeOpposite()
Makes a new condition which is the logical opposite of this condition.

Returns:
Condition

propertyChanged

public void propertyChanged(com.ibm.retail.AEF.event.AEFPropertyChangeEvent evt)
                     throws java.rmi.RemoteException
A AEF POSDataProvider property was updated

Parameters:
evt - contains details of the event
Throws:
java.rmi.RemoteException - if remote access fails

evaluate

public boolean evaluate(java.lang.Object newVal)
Evaluates the condition given a value object.

Overrides:
evaluate in class AbstractPropertyCondition
Parameters:
newVal - The Object value.
Returns:
boolean True if the condition evaluates to true.

getRegex

public java.lang.String getRegex()
Returns the regular expression for this condition.

Returns:
String The regular expression.

explain

public java.lang.String explain()
Returns a string explaining this condition.

Returns:
String


Copyright © 2004 IBM. All Rights Reserved.
Generated: July 19 2004