com.plumtree.server.condition
Interface IPTExpression

All Superinterfaces:
IPTLocalizable, IPTObject, IPTServerContext, IPTStorable, IPTUnknown

public interface IPTExpression
extends IPTObject

Expression interface. An expression uses operators to evaluate the boolean aritnmetic expression condition [ operator ] condition such as: if ((community == 10) AND (browser == netscape)) Expressions can contain other expressions

Author:
dustina

Method Summary
 void AddSubExpressions(int[] arExpressionIDs)
          Adds the list of sub expressions inside the current expression.
 int GetActionType()
          Gets the type of action to be performed if the expression evaluates to true.
 int GetActionValue()
          Gets the action value to be performed if the expression evalutes to true.
 int GetConditionTypeID()
          Gets the type of condition that is inside the expression.
 IValue GetConditionValue()
          Gets the value of the condition for the current expression.
 int GetOperatorID()
          Gets the operator that will be used to combine the list of sub expressions.
 int GetTopicPos()
          Gets the priority of the expression categorized by action types.
 boolean IsCondition()
          This expression is just a single condition, with no operator or other moderator.
 int[] QuerySubExpressionIDs()
          Gets the list of sub expression IDs inside the current expression.
 void RemoveSubExpressions(int[] arExpressionIDs)
          Removes the list of sub expressions inside the current expression.
 void SetActionType(int nActionType)
          Sets the type of action to be performed if the expression evaluates to true.
 void SetActionValue(int nActionValue)
          Sets the action value to be performed if the expression evalutes to true.
 void SetConditionTypeID(int nCondTypeID)
          Sets the condition type ID of the expression.
 void SetConditionValue(int nValueType, java.lang.Object objValue)
          Sets the condition value of the condition for the expression.
 void SetOperatorID(int nOpID)
          Sets the operator ID to be associated with the expression.
 void SetTopicPos(int nTopicPos)
          Sets the priority of the expression categorized by action types.
 
Methods inherited from interface com.plumtree.server.IPTObject
GetAdminFolderID, GetClassID, GetCreated, GetImageUUID, GetLastModified, GetObjectProperties, SetAdminFolderID, SetImageUUID, SetLastModified
 
Methods inherited from interface com.plumtree.server.IPTLocalizable
GetDescription, GetIsLocalized, GetLocalizedDescription, GetLocalizedDescriptions, GetLocalizedName, GetLocalizedNames, GetName, GetPrimaryLang, GetSupportsLocalization, SetDescription, SetIsLocalized, SetLocalizedDescriptions, SetLocalizedNames, SetName, SetPrimaryLang
 
Methods inherited from interface com.plumtree.server.IPTUnknown
GetInterfaces
 
Methods inherited from interface com.plumtree.server.IPTServerContext
GetAccessLevel, GetACL, GetLastModifiedBy, GetLockState, GetObjectID, GetOwnerID, GetServerContextSettings, GetSession, GetSettings, LockObject, SetLastModifiedBy, SetObjectID, SetOwnerID, SetServerContextSettings, SetSettings, UnlockObject
 
Methods inherited from interface com.plumtree.server.IPTStorable
Store
 

Method Detail

IsCondition

boolean IsCondition()
This expression is just a single condition, with no operator or other moderator.

Returns:
true if the current expression contains only a condition instance, false otherwise

QuerySubExpressionIDs

int[] QuerySubExpressionIDs()
Gets the list of sub expression IDs inside the current expression. Returns null if expression is a condition.

Returns:
array of sub expression IDs

AddSubExpressions

void AddSubExpressions(int[] arExpressionIDs)
Adds the list of sub expressions inside the current expression.

Parameters:
arExpressionIDs - - the list of sub expression IDs to be added

RemoveSubExpressions

void RemoveSubExpressions(int[] arExpressionIDs)
Removes the list of sub expressions inside the current expression. NOTE: The subexpressions are not deleted.

Parameters:
arExpressionIDs - - the list of sub expression IDs to be removed

GetOperatorID

int GetOperatorID()
Gets the operator that will be used to combine the list of sub expressions. Returns -1 if expression is a condition.

Returns:
ID of the operator object

SetOperatorID

void SetOperatorID(int nOpID)
Sets the operator ID to be associated with the expression.

Parameters:
nOpID - - the operator ID to be assigned

GetConditionTypeID

int GetConditionTypeID()
Gets the type of condition that is inside the expression. Returns -1 if expression is not a condition.

Returns:
ID of the condition type object

SetConditionTypeID

void SetConditionTypeID(int nCondTypeID)
Sets the condition type ID of the expression.

Parameters:
nCondTypeID - - the ID to be assigned

GetConditionValue

IValue GetConditionValue()
Gets the value of the condition for the current expression. returns null if expression is not a condition.

Returns:
the value of the condition

SetConditionValue

void SetConditionValue(int nValueType,
                       java.lang.Object objValue)
Sets the condition value of the condition for the expression.

Parameters:
nValueType - - the type of the value: string, integer
objValue - - the actual value to be stored

GetActionType

int GetActionType()
Gets the type of action to be performed if the expression evaluates to true.

Returns:
the type of action to be performed

SetActionType

void SetActionType(int nActionType)
Sets the type of action to be performed if the expression evaluates to true.

Parameters:
nActionType - - the type of action to be set

GetActionValue

int GetActionValue()
Gets the action value to be performed if the expression evalutes to true.

Returns:
the action value

SetActionValue

void SetActionValue(int nActionValue)
Sets the action value to be performed if the expression evalutes to true.

Parameters:
nActionValue - - the action value to be set

GetTopicPos

int GetTopicPos()
Gets the priority of the expression categorized by action types. Returns 0 if expression has no priority.

Returns:
the priority of the expression

SetTopicPos

void SetTopicPos(int nTopicPos)
Sets the priority of the expression categorized by action types.

Parameters:
nTopicPos - - the priority to be set