com.ibm.retail.AEF.automation
Class AbstractPropertyCondition

java.lang.Object
  |
  +--com.ibm.retail.AEF.automation.AbstractCondition
        |
        +--com.ibm.retail.AEF.automation.AbstractPropertyCondition
All Implemented Interfaces:
AEFPropertyChangeListener, Condition, com.ibm.retail.AEF.automation.PropertyCondition, java.rmi.Remote
Direct Known Subclasses:
PropertyContainsAtIndexCondition, PropertyContainsCondition, PropertyEqualsCondition, PropertyGreaterOrEqualCondition, PropertyGreaterThanCondition, PropertyLessOrEqualCondition, PropertyLessThanCondition, PropertyNotContainsAtIndexCondition, PropertyNotContainsCondition, PropertyNotEqualsCondition, PropertyRegexMatchCondition, PropertyRegexNotMatchCondition

public abstract class AbstractPropertyCondition
extends AbstractCondition
implements com.ibm.retail.AEF.automation.PropertyCondition, AEFPropertyChangeListener

AbstractPropertyCondition is a base class for objects which detect conditions within POSDataProvider properties.


Field Summary
protected  java.lang.String category
           
protected  java.lang.String name
           
protected  boolean nextOnly
           
protected  java.lang.String value
           
 
Fields inherited from class com.ibm.retail.AEF.automation.AbstractCondition
counterLock, dataProvider, eligible, id, idCounter, index, listeners, lock, manager, session
 
Constructor Summary
AbstractPropertyCondition()
           
 
Method Summary
(package private) static java.lang.String copyright()
           
 void currentValues(java.util.HashMap values)
          Populate the HashMap with property name/current value pairs included in the condition.
 boolean evaluate()
          Evaluates the condition given the current value of the property.
 boolean evaluate(java.lang.Object newVal)
          Evaluates the condition given a value object.
 java.lang.String getCategory()
          Gets the category of the property this condition is monitoring.
 boolean getNextOnly()
          Indicates whether only the next property change will be considered, or all future propety changes will be considered until the condition is true or deactivated.
 java.lang.String getPropertyName()
          Gets the name of the property this condition is monitoring.
 java.lang.Double parseDouble(java.lang.String doubleStr)
          Takes a string as input, and returns a Double representing the value of the string.
 void setEligible(boolean flag)
          Sets the condition eligible for evaluation.
 
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, explain, getID, getIndex, getPOSDataProvider, getSession, getTerminalNumber, isEligible, makeOpposite, removeEvaluateListener, setConditionLock, setID, setIndex, setLockManager, setPOSDataProvider, setSession
 
Methods inherited from interface com.ibm.retail.AEF.event.AEFPropertyChangeListener
propertyChanged
 

Field Detail

category

protected java.lang.String category

name

protected java.lang.String name

value

protected java.lang.String value

nextOnly

protected boolean nextOnly
Constructor Detail

AbstractPropertyCondition

public AbstractPropertyCondition()
Method Detail

copyright

static java.lang.String copyright()

setEligible

public void setEligible(boolean flag)
Sets the condition eligible for evaluation.

Specified by:
setEligible in interface Condition
Overrides:
setEligible in class AbstractCondition
Parameters:
flag - Set to true to make this condition eligible for evaluation.

evaluate

public boolean evaluate()
Evaluates the condition given the current value of the property.

Specified by:
evaluate in interface Condition
Returns:
boolean True if the condition evaluates to true.

evaluate

public boolean evaluate(java.lang.Object newVal)
Evaluates the condition given a value object. This version always returns false. Concrete subclasses must override this method to return a meaninful value.

Parameters:
newVal - The Object value.
Returns:
boolean True if the condition evaluates to true.

getCategory

public java.lang.String getCategory()
Gets the category of the property this condition is monitoring.

Specified by:
getCategory in interface com.ibm.retail.AEF.automation.PropertyCondition

getPropertyName

public java.lang.String getPropertyName()
Gets the name of the property this condition is monitoring.

Specified by:
getPropertyName in interface com.ibm.retail.AEF.automation.PropertyCondition

currentValues

public void currentValues(java.util.HashMap values)
Populate the HashMap with property name/current value pairs included in the condition. If a key is already in the HashMap, the new value will not override the value already in the map for the key.

Specified by:
currentValues in interface Condition
Parameters:
values -

getNextOnly

public boolean getNextOnly()
Indicates whether only the next property change will be considered, or all future propety changes will be considered until the condition is true or deactivated.

Specified by:
getNextOnly in interface com.ibm.retail.AEF.automation.PropertyCondition

parseDouble

public java.lang.Double parseDouble(java.lang.String doubleStr)
                             throws java.lang.NumberFormatException
Takes a string as input, and returns a Double representing the value of the string.

Parameters:
doubleStr - The string to convert to a double.
Returns:
Double The new double representation of the string.
Throws:
java.lang.NumberFormatException


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