com.plumtree.portaluiinfrastructure.condition
Class AGuestConditionType

java.lang.Object
  extended by com.plumtree.portaluiinfrastructure.condition.AConditionType
      extended by com.plumtree.portaluiinfrastructure.condition.AGuestConditionType
Direct Known Subclasses:
ConditionTypeClientIPAddress, ConditionTypeURLDomain, ConditionTypeUserAgent

public abstract class AGuestConditionType
extends AConditionType

There are two things to consider before deciding whether to extend the AGuestConditionType or the ARegularConditionType: 1) Will conditions of this type be used to determine which subportal with a particular guest to use when there is no valid session available? The reason is that certain condition types does not make sense during the Guest/Login Phase. For example, a condition on the user's group has no meaning during the Guest/Login Phase since no user is logged in yet. A condition on the client's IP address would be valid since this has meaning on bothe the Guest/Login and the Regular Phase. 2) Is the Activity Space NOT needed to get the current value of the condition type? A condition the current community a user is on needs the activity space to determine the current value. However, during the Guest/Login Phase, the activity space has not been initialized. Therefore, there is no way to determine what community the user is in. Since the current value cannot be determined during the Guest/Login Phase, a condition on community is only valid during the regular Phase. A condition on the URL Domain, on the other hand, only needs the XPRequest to figure out its current value. Therefore, it is safe to have a condition on the user's URL domain during the Guest/Login Phase.

Author:
DustinA

Field Summary
 
Fields inherited from class com.plumtree.portaluiinfrastructure.condition.AConditionType
CONDITION_LIST_CONSTANT, log, PHASE_TYPE_GUEST, PHASE_TYPE_REGULAR, ruleDebugger
 
Constructor Summary
AGuestConditionType()
           
 
Method Summary
abstract  void GetCurrentValue(XPLimitedRequest xpRequest, IPTSession guestReadOnlySession, XPHashtable htUserEnvironment)
          GetCurrentValue determines the condition type's current value, and adds it to the htUserEnvironment.
 int GetPhaseType()
          Method to retrieve the phase type of this condition type.
 
Methods inherited from class com.plumtree.portaluiinfrastructure.condition.AConditionType
AddItemToMyConditionsList, GetConditionTypeIdentifier, GetConditionValue, GetConditionValueType, GetDescriptionString, GetMyConditionsListAddLabel, GetMyConditionsListIcon, GetMyConditionsListSectionSubTitle, GetMyConditionsListSectionTitle, GetValidationFailedString, InitializeMyConditionsList, RegisterMyConditionsList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AGuestConditionType

public AGuestConditionType()
Method Detail

GetPhaseType

public int GetPhaseType()
Description copied from class: AConditionType
Method to retrieve the phase type of this condition type. There are currently two phases: guest phase and regular phase.

Specified by:
GetPhaseType in class AConditionType
See Also:
AGuestConditionType, ARegularConditionType

GetCurrentValue

public abstract void GetCurrentValue(XPLimitedRequest xpRequest,
                                     IPTSession guestReadOnlySession,
                                     XPHashtable htUserEnvironment)
GetCurrentValue determines the condition type's current value, and adds it to the htUserEnvironment. This is important since the Compare method is relying for the correct current value to be in the htUserEnvironment. If the current value is missing or incorrect, then the execution of the rules might return erroneous values. NOTE: Any exception thrown from this method will be caught and discarded.

Parameters:
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.
userSession - - a guest read only ptSession that can be used to access server objects
htUserEnvironment - - the user's environment of current values for condition types



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.