com.ibm.retail.AEF.automation
Class AbstractCondition

java.lang.Object
  |
  +--com.ibm.retail.AEF.automation.AbstractCondition
All Implemented Interfaces:
Condition
Direct Known Subclasses:
AbstractPropertyCondition, AndCondition, AndThenCondition, OrCondition

public abstract class AbstractCondition
extends java.lang.Object
implements Condition

AbstractCondition is a base class for objects which are used in conjuction with a ConditionLock to block a calling thread based on a set of conditions.


Field Summary
static java.lang.Object counterLock
           
protected  com.ibm.retail.AEF.data.POSDataProvider dataProvider
           
protected  boolean eligible
           
 int id
           
static int idCounter
           
protected  int index
           
protected  java.util.Collection listeners
           
protected  com.ibm.retail.AEF.thread.ConditionLock lock
           
 com.ibm.retail.AEF.thread.ConditionLockManager manager
           
 com.ibm.retail.AEF.session.AEFSession session
           
 
Constructor Summary
AbstractCondition()
           
 
Method Summary
 void addEvaluateListener(com.ibm.retail.AEF.automation.EvaluateConditionListener listener)
          Add a EvaluateConditionListener which will be notified whenever the condition is evaluated.
(package private) static java.lang.String copyright()
           
 int getID()
          Gets the unique id of this condition.
 int getIndex()
          Gets the vector index of this condition.
 int getNextID()
          Gets the next available id.
 com.ibm.retail.AEF.data.POSDataProvider getPOSDataProvider()
          Returns the POSDataProvider associated with this condition.
 com.ibm.retail.AEF.session.AEFSession getSession()
          Gets the AEFSession associated with this condition.
 java.lang.String getTerminalNumber()
          Gets the terminal number associated with the session for this condition.
 boolean isEligible()
          Indicates whether the condition is eligible for evaluation.
 void notifyEvaluateConditionListeners(com.ibm.retail.AEF.automation.Condition cond, boolean value)
          Notifies EvaluateConditionListeners
 void removeEvaluateListener(com.ibm.retail.AEF.automation.EvaluateConditionListener listener)
          Remove a EvaluateConditionListener
 void setConditionLock(com.ibm.retail.AEF.thread.ConditionLock lock)
          Sets the condition lock associated with this condition.
 void setEligible(boolean flag)
          Sets the condition eligible for evaluation.
 void setID(int id)
          Sets the unique id of this condition (for use in trace &. debug).
 void setIndex(int index)
          Sets the index of this condition (for use within a vector).
 void setLockManager(com.ibm.retail.AEF.thread.ConditionLockManager manager)
          Sets the condition lock manager associated with this condition.
 void setPOSDataProvider(com.ibm.retail.AEF.data.POSDataProvider dataProvider)
          Sets the POSDataProvider associated with this condition.
 void setSession(com.ibm.retail.AEF.session.AEFSession session)
          Sets the AEFSession associated with this condition.
 
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
currentValues, evaluate, explain, makeOpposite
 

Field Detail

index

protected int index

lock

protected com.ibm.retail.AEF.thread.ConditionLock lock

eligible

protected boolean eligible

dataProvider

protected com.ibm.retail.AEF.data.POSDataProvider dataProvider

idCounter

public static int idCounter

counterLock

public static java.lang.Object counterLock

id

public int id

session

public com.ibm.retail.AEF.session.AEFSession session

manager

public com.ibm.retail.AEF.thread.ConditionLockManager manager

listeners

protected java.util.Collection listeners
Constructor Detail

AbstractCondition

public AbstractCondition()
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
Parameters:
flag - Set true to set the condition eligible for evaluation.

isEligible

public boolean isEligible()
Indicates whether the condition is eligible for evaluation.

Specified by:
isEligible in interface Condition
Returns:
boolean True if the condition is currently eligible for evaluation.

setConditionLock

public void setConditionLock(com.ibm.retail.AEF.thread.ConditionLock lock)
Sets the condition lock associated with this condition.

Specified by:
setConditionLock in interface Condition
Parameters:
lock - An optional condition lock which will be signalled when the condition evaluates to true.

setLockManager

public void setLockManager(com.ibm.retail.AEF.thread.ConditionLockManager manager)
Sets the condition lock manager associated with this condition.

Specified by:
setLockManager in interface Condition
Parameters:
manager - The condition lock manager which can notify the blocked thread.

setPOSDataProvider

public void setPOSDataProvider(com.ibm.retail.AEF.data.POSDataProvider dataProvider)
Sets the POSDataProvider associated with this condition.

Specified by:
setPOSDataProvider in interface Condition
Parameters:
dataProvider - The POSDataProvider which will provide property changes to this condition.

getPOSDataProvider

public com.ibm.retail.AEF.data.POSDataProvider getPOSDataProvider()
Returns the POSDataProvider associated with this condition.

Specified by:
getPOSDataProvider in interface Condition
Returns:
The POSDataProvider associated with this condition.

setIndex

public void setIndex(int index)
Sets the index of this condition (for use within a vector).

Specified by:
setIndex in interface Condition
Parameters:
index - This value is returned from a condition lock if this particular condition caused the condition lock to be signalled.

getIndex

public int getIndex()
Gets the vector index of this condition.

Specified by:
getIndex in interface Condition
Returns:
int This value is returned from a condition lock if this particular condition caused the condition lock to be signalled.

setSession

public void setSession(com.ibm.retail.AEF.session.AEFSession session)
Sets the AEFSession associated with this condition.

Specified by:
setSession in interface Condition
Parameters:
session -

getSession

public com.ibm.retail.AEF.session.AEFSession getSession()
Gets the AEFSession associated with this condition.

Specified by:
getSession in interface Condition
Returns:
AEFSession

setID

public void setID(int id)
Sets the unique id of this condition (for use in trace &. debug).

Specified by:
setID in interface Condition
Parameters:
id - A unique id which is used in debug trace.

getNextID

public int getNextID()
Gets the next available id.

Returns:
int The next available unique id.

getID

public int getID()
Gets the unique id of this condition.

Specified by:
getID in interface Condition
Returns:
int The unique id of this condition. Used in debug trace.

addEvaluateListener

public void addEvaluateListener(com.ibm.retail.AEF.automation.EvaluateConditionListener listener)
Add a EvaluateConditionListener which will be notified whenever the condition is evaluated.

Specified by:
addEvaluateListener in interface Condition

removeEvaluateListener

public void removeEvaluateListener(com.ibm.retail.AEF.automation.EvaluateConditionListener listener)
Remove a EvaluateConditionListener

Specified by:
removeEvaluateListener in interface Condition

notifyEvaluateConditionListeners

public void notifyEvaluateConditionListeners(com.ibm.retail.AEF.automation.Condition cond,
                                             boolean value)
Notifies EvaluateConditionListeners


getTerminalNumber

public java.lang.String getTerminalNumber()
Gets the terminal number associated with the session for this condition.

Specified by:
getTerminalNumber in interface Condition
Returns:
String terminal number


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