com.plumtree.server.condition
Interface IConditionServerType


public interface IConditionServerType

Condition Server Type interface. A condition Server Type compares a user-specified value against values held in the current user's environment represented as a hashtable of key-value pairs. This interface is implemented by AConditionType and it is that class that should be extended.

Author:
dustina
See Also:
com.plumtree.portaluiinfrastructure.condition.AConditionType

Method Summary
 boolean Compare(com.plumtree.openfoundation.util.XPHashtable htUserEnvironment, IValue conditionValue, com.plumtree.openfoundation.util.XPStringBuilder sbDebugText)
          Compares the value given to the one that is in the environmnent hashtable.
 int GetTypeID()
          Each condition type needs a unique identifier.
 

Method Detail

GetTypeID

int GetTypeID()
Each condition type needs a unique identifier. The Identifier is used as a key when storing information needed in the user's environment, and to be able to store and retrieve its list of conditions in the activityspace. The determination of whether a condition is met has two parts: find out the current value, then compare it to the condition's value. The unique identifier will be used to store the current value in the environment hashtable so that it can be easily retrieved later. The expression editor displays its conditions via having an expandable list per condition type. All the condition type lists are stored in the expression editor's activity space, and therefore the editor needs unique identifiers to be able to retrieve each list and display them.

Returns:
An int the uniquely identifies this condition type

Compare

boolean Compare(com.plumtree.openfoundation.util.XPHashtable htUserEnvironment,
                IValue conditionValue,
                com.plumtree.openfoundation.util.XPStringBuilder sbDebugText)
Compares the value given to the one that is in the environmnent hashtable. When the expression engine comes upon a condition, it retrieves the appropriate condition type and calls this method to compare the value of the condition with the current value in the user's environment. The result of the comparison determines whether the condition has been met. NOTE: Any exception thrown from this method will be caught and discarded. If an exception is caught, it will be considered a return value of FALSE.

Parameters:
htUserEnvironment - - hashtable of values describing the current user's environment
conditionValue - - the value to be compared against the current user's environment
sbDebugText - - StringBuilder that will keep track of the engine's execution path; will be null if debug mode is turned off
Returns:
true if the value is equal to the one found in the hashtable, false otherwise