|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.portaluiinfrastructure.condition.AConditionType
public abstract class AConditionType
Condition Type interface. Condition Types are needed for two reasons: 1) To determine whether whether a condition of its type is met. This involves finding the current value and comparing it to the condition's value. For example: Checking to see whether a condition the user's IP address involves getting the current user's IP Address from the http request and checking to see if it matches the IP Address stored in the expression. 2) Display the conditions of its type that have been created. Each expression contains a list of conditions, one for each condition type. The list for conditions of a certain type could have a display as simple as a textbox with the condition value inside, or more elaborate involving a tree picker and row icons.
Field Summary | |
---|---|
static java.lang.String |
CONDITION_LIST_CONSTANT
|
protected static OpenLogger |
log
|
static int |
PHASE_TYPE_GUEST
|
static int |
PHASE_TYPE_REGULAR
|
protected static OpenLogger |
ruleDebugger
|
Constructor Summary | |
---|---|
AConditionType()
|
Method Summary | |
---|---|
abstract void |
AddItemToMyConditionsList(java.lang.Object objItem,
ExpListModel myListModel,
IPTSession ptSession)
This method is almost like the opposite of the GetConditionValue() method. |
java.lang.String |
GetConditionTypeIdentifier()
This method combines the CONDITION_LIST_CONSTANT variable with it's type ID to come up with a unique string that can be used to store this condition type's list of conditions in the activityspace. |
abstract java.lang.Object |
GetConditionValue(int nRow,
IPTGrowableSortedArrayWrapperRO saData)
To return the condition value, we have to retrieve the data from the list using the nRow and saData variables. |
abstract int |
GetConditionValueType()
Each condition type has an expectation of what type of value they are to receive. |
abstract java.lang.String |
GetDescriptionString(IValue ConditionValue,
IPTSession ptSession)
Constructs the string to be set in an expression's description. |
abstract java.lang.String |
GetMyConditionsListAddLabel(XPResourceManager xpRM,
java.lang.String strLanguage)
The Add label specifies what text will be displayed on the Add button. |
abstract PTImageType |
GetMyConditionsListIcon()
This method specifies what icon will be displayed on the add button. |
abstract java.lang.String |
GetMyConditionsListSectionSubTitle(XPResourceManager xpRM,
java.lang.String strLanguage)
This method specifies what text will be displayed on the section sub title. |
abstract java.lang.String |
GetMyConditionsListSectionTitle(XPResourceManager xpRM,
java.lang.String strLanguage)
This method specifies what text will be displayed on the section title. |
abstract int |
GetPhaseType()
Method to retrieve the phase type of this condition type. |
abstract java.lang.String |
GetValidationFailedString(XPResourceManager xpRM,
java.lang.String strLanguage)
If a ValidationFailedException occurs, the RulesEditorModel will call this method to retrieve the appropriete error message. |
void |
InitializeMyConditionsList(ExpListModel myListModel,
java.lang.String strLanguage)
This method initializes the expandable list registered by the RegisterMyConditionsList method. |
void |
RegisterMyConditionsList(AActivitySpace asCurrentSpace)
This method will register the type of Expandable List that this condition type will use to display its list of conditions. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static OpenLogger log
protected static final OpenLogger ruleDebugger
public static final java.lang.String CONDITION_LIST_CONSTANT
public static final int PHASE_TYPE_GUEST
public static final int PHASE_TYPE_REGULAR
Constructor Detail |
---|
public AConditionType()
Method Detail |
---|
public abstract int GetPhaseType()
AGuestConditionType
,
ARegularConditionType
public java.lang.String GetConditionTypeIdentifier()
public void RegisterMyConditionsList(AActivitySpace asCurrentSpace)
asCurrentSpace
- - the activityspace the expandable list will be registered topublic abstract java.lang.String GetMyConditionsListSectionTitle(XPResourceManager xpRM, java.lang.String strLanguage)
xpRM
- - the resource manager which can be used to localize strings.strLanguage
- - current user's language locale"The base URL is ANY of the following URLs:"
,
"The user's IP is ANY of the following IPs:"
,
"The user is in ANY of the following Communities:"
,
"The user is in ANY of the following Groups:"
public abstract java.lang.String GetMyConditionsListSectionSubTitle(XPResourceManager xpRM, java.lang.String strLanguage)
xpRM
- - the resource manager which can be used to localize strings.strLanguage
- - current user's language locale"URL Domains"
,
"Client IP Addresses"
,
"Community Name"
,
"Group Name"
public abstract java.lang.String GetMyConditionsListAddLabel(XPResourceManager xpRM, java.lang.String strLanguage)
xpRM
- - the resource manager which can be used to localize strings.strLanguage
- - current user's language locale"Add URL"
,
"Add an IP Address"
,
"Add Communities"
,
"Add Groups"
public abstract PTImageType GetMyConditionsListIcon()
public void InitializeMyConditionsList(ExpListModel myListModel, java.lang.String strLanguage)
myListModel
- - the model of the expandable list registered with this condition type.
The list's initialization method resides in the model. To be able to call the correct
initialization method, casting the ExpListModel to the correct type may be needed.strLanguage
- - this is the laguange of the current user that is trying to create
or edit an expression.public abstract int GetConditionValueType()
public abstract java.lang.Object GetConditionValue(int nRow, IPTGrowableSortedArrayWrapperRO saData)
nRow
- - the row index of the object wantedsaData
- - the list containing the object
ConditionTypeURLDomain
public abstract java.lang.String GetValidationFailedString(XPResourceManager xpRM, java.lang.String strLanguage)
xpRM
- - the resource manager which can be used to localize strings.strLanguage
- - current user's language locale
public abstract void AddItemToMyConditionsList(java.lang.Object objItem, ExpListModel myListModel, IPTSession ptSession)
objItem
- - the condition value that needs to be added to the list.myListModel
- - the list model which holds the data of items in the
listptSession
- - the current user's session is provided in case it is neededConditionTypeURLDomain
public abstract java.lang.String GetDescriptionString(IValue ConditionValue, IPTSession ptSession)
ConditionValue
- - the condition value for this condition typeptSession
- - the current user's session is provided in case it is needed
"URL Domain contains xxx"
,
"Client IP Address matches xxx.xxx.xxx.xxx"
,
"User is in Community: xxx"
,
"User part of Group: xxx"
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |