com.plumtree.server.condition
Interface IExpressionEngine


public interface IExpressionEngine

Expression engine management class. Handles complex tree of nodes, and then uses binary decision diagram execution engine to reduce, apply, restrict, and satisfy the inferred boolean algebraic model down to individual action results by action type. There's a list of toplevel nodes. Only toplevel nodes have actions, for simplicity rather than as a requirement.

Author:
dustina

Method Summary
 int Execute(int nActionType, com.plumtree.openfoundation.util.XPHashtable objUserEnvironment, com.plumtree.openfoundation.util.XPStringBuilder sbDebugText)
          Executes tree of conditional expression nodes and returns a list of resulting actions, one expression of each unique action type, no more than one of each type.
 IConditionServerType GetConditionTypeObject(int nCondTypeID)
          Gets the condition type object specified by nCondTypeID
 com.plumtree.openfoundation.util.XPArrayList GetExpressionList(int nActionType)
          Gets all the expressions whose action matches that of the action type given.
 void LoadConditionTypes(com.plumtree.openfoundation.util.XPHashtable objConditionTypes)
          Dynamically discovered condition types need to be passed to the expression engine.
 void LoadExpressions()
          Loads the expressions from the database while constructing the expressions' order of execution for all action types.
 com.plumtree.openfoundation.util.XPArrayList LoadExpressionsLite(int nActionType)
          Loads the expressions from the database while constructing the expressions' order of execution for the specified action type.
 void ReorderExpressions(int nActionType, com.plumtree.openfoundation.util.XPArrayList xpExpressionsOrder)
          Re-order the espression list.
 

Method Detail

LoadConditionTypes

void LoadConditionTypes(com.plumtree.openfoundation.util.XPHashtable objConditionTypes)
Dynamically discovered condition types need to be passed to the expression engine.

Parameters:
objConditionTypes - - the list of dynamically discovered condition types

ReorderExpressions

void ReorderExpressions(int nActionType,
                        com.plumtree.openfoundation.util.XPArrayList xpExpressionsOrder)
Re-order the espression list.

Parameters:
nActionType - - action type of the expression list to be reordered
xpExpressionsOrder - - the new order of the expressions

GetExpressionList

com.plumtree.openfoundation.util.XPArrayList GetExpressionList(int nActionType)
Gets all the expressions whose action matches that of the action type given.

Parameters:
nActionType - - the action type of the list of expressions wanted
Returns:
An XPArrayList of all the expressions with the given action type

GetConditionTypeObject

IConditionServerType GetConditionTypeObject(int nCondTypeID)
Gets the condition type object specified by nCondTypeID

Parameters:
nCondTypeID - - ID of the condition type object wanted
Returns:
condition type object wanted

Execute

int Execute(int nActionType,
            com.plumtree.openfoundation.util.XPHashtable objUserEnvironment,
            com.plumtree.openfoundation.util.XPStringBuilder sbDebugText)
Executes tree of conditional expression nodes and returns a list of resulting actions, one expression of each unique action type, no more than one of each type.

Parameters:
nActionType - - the action type to be evaluated
ptInternalSession - - internalsession to use to create expression info objects
objUserEnvironment - - current environment of values to be compared against
sbDebugText - - StringBuilder that will keep track of the engine's execution path; will be null if debug mode is turned off
Returns:
the expression's action value that evaluated to true, or -1 if none were true.

LoadExpressions

void LoadExpressions()
Loads the expressions from the database while constructing the expressions' order of execution for all action types. This method queries for all the expression objects in the database and add them to the cache. It then determines the order of execution based on the topic position of each expression object.


LoadExpressionsLite

com.plumtree.openfoundation.util.XPArrayList LoadExpressionsLite(int nActionType)
Loads the expressions from the database while constructing the expressions' order of execution for the specified action type.

Parameters:
actionType - - the action type of the expressions to be loaded


Copyright © 2008 Plumtree Software Inc. All Rights Reserved.