Plumtree Portal UI  
 

AGuestConditionType Members

AGuestConditionType overview

Public Instance Methods

AddItemToMyConditionsList (inherited from AConditionType) This method is almost like the opposite of the GetConditionValue() method. It takes the objItem, which is the server version of the condition value, and converts it to the UI version. The variable objItem is currently of the type returned by GetConditionValueType(). It now needs to be converted to the type that the ExpListModel understands. If you are using the default Growable List, then the objItem simply needs to be converted to a string. Then, add it to a String[], and call the AddRowsToList(String[]) method.
Compare (inherited from AConditionType) 
Equals (inherited from Object)Determines whether the specified Object is equal to the current Object.
GetConditionTypeIdentifier (inherited from AConditionType) 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.
GetConditionValue (inherited from AConditionType) To return the condition value, we have to retrieve the data from the list using the nRow and saData variables. Then it needs to be converted to the value type that is expected. The default list used is the Growable List, which is what the URL condition type uses. To retrieve the data from the Growable List, use the GrowableListModel.EXPLIST_SORTEDARRAY_PROPID_INPUTTEXT constant: Object result = saData.GetItem(nRow, GrowableListModel.EXPLIST_SORTEDARRAY_PROPID_INPUTTEXT); At this point, the result has been retrieved as a String. The next step would be to convert the string object to the type returned by GetConditionValueType(). This method is also where validation of the value occurs. If the value is suppose to be an integer, validate that it is and throw a ValidationFailedException if it's not.
GetConditionValueType (inherited from AConditionType) Each condition type has an expectation of what type of value they are to receive. A condition on url domain most likey will expect its value type to be of string, while a condition on community ID would have a value of type integer.
GetCurrentValue 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.
GetDescriptionString (inherited from AConditionType) Constructs the string to be set in an expression's description. Simply return a string describing the current condition. NOTE: The string returned by this method will be HTMLEncoded Example:
GetHashCode (inherited from Object)Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetMyConditionsListAddLabel (inherited from AConditionType) The Add label specifies what text will be displayed on the Add button. Use the Resource Manager and the string language to localize. NOTE: The string returned by this method is not HTMLEncoded Examples:
GetMyConditionsListIcon (inherited from AConditionType) This method specifies what icon will be displayed on the add button. Use the PTImageType class to select an icon.
GetMyConditionsListSectionSubTitle (inherited from AConditionType) This method specifies what text will be displayed on the section sub title. Use the Resource Manager and the string language to localize. NOTE: The string returned by this method is not HTMLEncoded Examples:
GetMyConditionsListSectionTitle (inherited from AConditionType) This method specifies what text will be displayed on the section title. Use the Resource Manager and the string language to localize. NOTE: The string returned by this method is not HTMLEncoded Examples:
GetPhaseType 
GetType (inherited from Object)Gets the Type of the current instance.
GetTypeID (inherited from AConditionType) 
GetValidationFailedString (inherited from AConditionType) If a ValidationFailedException occurs, the RulesEditorModel will call this method to retrieve the appropriete error message. NOTE: The string returned by this method is not HTMLEncoded
InitializeMyConditionsList (inherited from AConditionType) This method initializes the expandable list registered by the RegisterMyConditionsList method. This method simply calls the expandable list's initialize method located in the list's model. The name of the initialize method depends on which type of expandable list was registered. Initializing the expandable list simply involves specifying display items like the list's title, or the add label. Use the methods above: GetMyConditionsListSectionTitle(), GetMyConditionsListSectionSubTitle(), GetMyConditionsListAddLabel(), GetMyConditionsListIcon() to help initialize the list.
RegisterMyConditionsList (inherited from AConditionType) This method will register the type of Expandable List that this condition type will use to display its list of conditions. The expandable list is registered using the condition type's unique identifier. The Expandable List itself is merely an abstract class that needs to be extended. There are two list objects that have extended the Expandable List: 1) Growable List under package com.plumtree.uiinfrastructure.expandablelist.growablelist. This is a vary simple, but useful extenstion of the Expandable List consisting of an input box per row. Adding a new condition is as easy as inputting the condition value in the text box. Check out com.plumtree.portalpages.condition.conditiontypes.ConditionTypeURLDomain as an example of how to use the Growable List. 2) Select PTObject List under package com.plumtree.portaluiinfrastructure.expandablelist.selectptobject. The Select PTObject List allows users to select ptobjects easily. It comes set up with a pop up tree picker where you can select more than one object at a time, and it displays the name of the objects selected in the rows. Check out com.plumtree.portalpages.condition.conditiontypes.ConditionTypeCommunityID as an example of how to use the Select PTObject List. If neither of the two lists above suits your need, another option would be to create a new list by extending either of the two lists mentioned above, or extending Expandable List itself. Registering the chosen list involves registering a list model, a list view, and a list control. To register the model, use the RegiserModel() method of the ActivitySpace: asCurrentSpace.RegisterModel(MyListModel.STR_MVC_CLASS_NAME, GetConditionTypeIdentifier()); The registered list model is needed to register the view and the control, therefore, we need to get back the Model we just registered using this condition type's identifier: IModel myListModel = asCurrentSpace.GetModel(GetConditionTypeIdentifier()); Now that we have the model, we can continue to register the list view and the list control: asCurrentSpace.RegisterView(MyListListView.STR_MVC_CLASS_NAME, GetConditionTypeIdentifier(), myListModel); asCurrentSpace.RegisterControl(ExpListControl.STR_MVC_CLASS_NAME, GetConditionTypeIdentifier(), myListModel); It is very likely that the ExpListControl is sufficient to use and will not need to be extended. In such a case, simply register the ExpListControl as your list control.
ToString (inherited from Object)Returns a String that represents the current Object.

Protected Instance Constructors

AGuestConditionType Constructor Initializes a new instance of the AGuestConditionType class.

Protected Instance Methods

Finalize (inherited from Object)Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object)Creates a shallow copy of the current Object.

See Also

AGuestConditionType Class | com.plumtree.portaluiinfrastructure.condition Namespace