|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.portaluiinfrastructure.condition.AConditionType com.plumtree.portaluiinfrastructure.condition.AGuestConditionType com.plumtree.portalpages.condition.conditiontypes.ConditionTypeUserAgent
public class ConditionTypeUserAgent
This basic implementation of AGuestConditionType defines how to retrieve and evaluate a current user's browser type. It also defines methods to display conditions that have been defined
Field Summary |
---|
Fields inherited from class com.plumtree.portaluiinfrastructure.condition.AConditionType |
---|
CONDITION_LIST_CONSTANT, log, PHASE_TYPE_GUEST, PHASE_TYPE_REGULAR, ruleDebugger |
Constructor Summary | |
---|---|
ConditionTypeUserAgent()
|
Method Summary | |
---|---|
void |
AddItemToMyConditionsList(java.lang.Object objItem,
ExpListModel myListModel,
IPTSession ptSession)
Adds objItem to the list of conditions of this condition type that is stored in myListModel |
boolean |
Compare(XPHashtable htUserEnvironment,
IValue conditionValue,
XPStringBuilder sbDebugText)
Returns the result of comparing the condition value specified by conditionValue to the current value of the condition type found in htUserEnvironment. |
java.lang.Object |
GetConditionValue(int nRow,
IPTGrowableSortedArrayWrapperRO saData)
Returns the condition value stored in the nRow row of saData. |
int |
GetConditionValueType()
Returns the value type of the codition expected by this condition type. |
void |
GetCurrentValue(XPLimitedRequest xpRequest,
IPTSession guestReadOnlySession,
XPHashtable htUserEnvironment)
Determines the condition type's current value, and adds it to the htUserEnvironment. |
java.lang.String |
GetDescriptionString(IValue ConditionValue,
IPTSession ptSession)
Constructs the string to be set in an expression's description. |
java.lang.String |
GetMyConditionsListAddLabel(XPResourceManager xpRM,
java.lang.String strLanguage)
Returns the String that will be displayed as the Add Label for this condition type in the Subportal Rules Editor. |
PTImageType |
GetMyConditionsListIcon()
Returns the Icon to be associated with this condition type. |
java.lang.String |
GetMyConditionsListSectionSubTitle(XPResourceManager xpRM,
java.lang.String strLanguage)
Returns the String that will be displayed as the Section SubTitle for this condition type in the Subportal Rules Editor. |
java.lang.String |
GetMyConditionsListSectionTitle(XPResourceManager xpRM,
java.lang.String strLanguage)
Returns the String that will be displayed as the Section Title for this condition type in the Subportal Rules Editor. |
int |
GetTypeID()
Returns the unique ID of this condition type, which is used to store the list of condition types implemented. |
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. |
Methods inherited from class com.plumtree.portaluiinfrastructure.condition.AGuestConditionType |
---|
GetPhaseType |
Methods inherited from class com.plumtree.portaluiinfrastructure.condition.AConditionType |
---|
GetConditionTypeIdentifier, InitializeMyConditionsList, RegisterMyConditionsList |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConditionTypeUserAgent()
Method Detail |
---|
public int GetTypeID()
com.plumtree.server.condition.IConditionServerType#GetTypeID()
public boolean Compare(XPHashtable htUserEnvironment, IValue conditionValue, XPStringBuilder sbDebugText)
com.plumtree.server.condition.IConditionServerType#Compare(com.plumtree.openfoundation.util.XPHashtable, com.plumtree.server.condition.IValue, com.plumtree.openfoundation.util.XPStringBuilder)
public void GetCurrentValue(XPLimitedRequest xpRequest, IPTSession guestReadOnlySession, XPHashtable htUserEnvironment)
GetCurrentValue
in class AGuestConditionType
xpRequest
- - http request's wrapper. This is actually another wrapper that conceals the real XPRequest object.
The reason is that at the Guest/Login Phase, the XPRequest's body cannot be parsed. Therefore, any attempt to get
the XPRequest's parameter names or values will result in an exception being thrown.htUserEnvironment
- - the user's environment of current values for condition typescom.plumtree.portaluiinfrastructure.condition.AGuestConditionType#GetCurrentValue(com.plumtree.portaluiinfrastructure.condition.XPLimitedRequest, com.plumtree.server.IPTSession, com.plumtree.openfoundation.util.XPHashtable)
public java.lang.String GetMyConditionsListSectionTitle(XPResourceManager xpRM, java.lang.String strLanguage)
GetMyConditionsListSectionTitle
in class AConditionType
xpRM
- - the resource manager which can be used to localize strings.strLanguage
- - current user's language localecom.plumtree.portaluiinfrastructure.condition.AConditionType#GetMyConditionsListSectionTitle(com.plumtree.openfoundation.internationalization.XPResourceManager, java.lang.String)
public java.lang.String GetMyConditionsListSectionSubTitle(XPResourceManager xpRM, java.lang.String strLanguage)
GetMyConditionsListSectionSubTitle
in class AConditionType
xpRM
- - the resource manager which can be used to localize strings.strLanguage
- - current user's language localecom.plumtree.portaluiinfrastructure.condition.AConditionType#GetMyConditionsListSectionSubTitle(com.plumtree.openfoundation.internationalization.XPResourceManager, java.lang.String)
public java.lang.String GetMyConditionsListAddLabel(XPResourceManager xpRM, java.lang.String strLanguage)
GetMyConditionsListAddLabel
in class AConditionType
xpRM
- - the resource manager which can be used to localize strings.strLanguage
- - current user's language localecom.plumtree.portaluiinfrastructure.condition.AConditionType#GetMyConditionsListAddLabel(com.plumtree.openfoundation.internationalization.XPResourceManager, java.lang.String)
public PTImageType GetMyConditionsListIcon()
GetMyConditionsListIcon
in class AConditionType
AConditionType.GetMyConditionsListIcon()
public int GetConditionValueType()
GetConditionValueType
in class AConditionType
AConditionType.GetConditionValueType()
public java.lang.Object GetConditionValue(int nRow, IPTGrowableSortedArrayWrapperRO saData)
GetConditionValue
in class AConditionType
nRow
- - the row index of the object wantedsaData
- - the list containing the object
AConditionType.GetConditionValue(int, com.plumtree.uiinfrastructure.arraywrapper.IPTGrowableSortedArrayWrapperRO)
public java.lang.String GetValidationFailedString(XPResourceManager xpRM, java.lang.String strLanguage)
AConditionType
GetValidationFailedString
in class AConditionType
xpRM
- - the resource manager which can be used to localize strings.strLanguage
- - current user's language locale
public void AddItemToMyConditionsList(java.lang.Object objItem, ExpListModel myListModel, IPTSession ptSession)
AddItemToMyConditionsList
in class AConditionType
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 neededcom.plumtree.portaluiinfrastructure.condition.AConditionType#AddItemToMyConditionsList(java.lang.Object, com.plumtree.uiinfrastructure.expandablelist.ExpListModel, com.plumtree.server.IPTSession)
public java.lang.String GetDescriptionString(IValue ConditionValue, IPTSession ptSession)
AConditionType
GetDescriptionString
in class AConditionType
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 |