com.plumtree.portaluiinfrastructure.expandablelist.selectptobject
Class SelectPTObjectModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorHelperModel
      extended by com.plumtree.uiinfrastructure.expandablelist.ExpListModel
          extended by com.plumtree.portaluiinfrastructure.expandablelist.selectptobject.SelectPTObjectModel
All Implemented Interfaces:
ISelectPTObjectModelRO, IManagedObject, IModel, IModelRO, IMVCObject, IExpListModelRO, IPaginationModel, IPaginationModelRO
Direct Known Subclasses:
CommunityEditorSubcommunityModel, EODPortletPrefsProfileSectionListModel, EODPortletPrefsSelectPTObjectModel, GroupListModel, InheritListModel, JobFoldersListModel, MigrationSelectForExportModel, PortletSelectModel, ProfileSourceSelectPTObjectModel, RulesListModel, SavSrchDisplayFieldsListModel, SelectPTObjectsByTypeModel

public class SelectPTObjectModel
extends ExpListModel
implements ISelectPTObjectModelRO

This is the implementation of the Expandable List framework for the the Select PTObject list. The Select PTObject is a list of objects. New objects can be added to the list by selecting them from the associated Object tree. The list is by default sorted by name ascending.

Author:
Julie Fournier

Field Summary
static int CREATE_NEW_COL_ASNAME
          Create new array column: AS Name
static int CREATE_NEW_COL_CLASSID
          Create new array column: class ID
static int CREATE_NEW_COL_ICON
          Create new array column: icon to display for the create new link
static int CREATE_NEW_COL_LABEL
          Create new array column: text to display with the create new link
static int CREATE_NEW_COL_MAX
          Size of each m_arrCreateNewInfo row
static int CREATE_NEW_COL_MAXWITHPARAMS
          Size of each m_arrCreateNewInfo row with optional control parameters.
static int CREATE_NEW_COL_PARAMS
          Create new array column: extra control arguments for the create action.
static int EXPLIST_COL_CLASSID
          This column contains the Object Class IDs.
static int EXPLIST_COL_MAX
          Number total of columns
static int EXPLIST_COL_OBJECTID
          This column contains the Object IDs.
static int EXPLIST_COL_STRING
          This is the String that we doisplay in the list.
static int EXPLIST_DEFAULT_INITIAL_SIZE
          Default initial size for the sorted array.
static int HIDE_COL_CLASSID
          This column of the passed Objects to Hide contains the class IDs.
static int HIDE_COL_MAX
          Number total of columns for hide objects array.
static int HIDE_COL_OBJECTID
          This column of the passed Objects to Hide contains the object IDs.
protected  java.lang.Object[][] m_arrCreateNewInfo
          Information about the create new links to display
protected  int[] m_arrObjectClassIDs
          Class ID of the Objects displayed on the list.
protected  int[][] m_arrReadOnlyObjects
          JF- Array of classID/objectID that cannot be deleted from the list.
protected  boolean m_bNoRowIcons
          JH: Set to true if no row icons are to be displayed.
protected  boolean m_bTreeMultiSelect
          Selection type for the object tree.
protected  PTImageType m_imgDefaultRowIcon
          Icon to display on each row, just before the input text.
protected  int m_nAccessLevel
          This value determines the security access requirements for the objects to be added to the list...
protected  int m_nCommunityFolderID
          Community Folder ID to display objects from.
protected  int m_nCommunityMode
          Community Mode to display objects.
protected  java.lang.String m_sDisplayObjects
          Class IDs and Object IDs of objects to display in the tree.
protected  java.lang.String m_sTreeSpaceID
          Tree Space ID.
protected  java.lang.String m_sTreeSubTitle
          Tree sub title
protected  java.lang.String m_sTreeTitle
          Tree title
protected  java.lang.String m_strObjectsToHide
          Objects to hide for the object tree.
protected  java.lang.String m_strTreeQueryFilter
          Query Filter for the object tree.
protected  int m_treeLeafType
          Leaf type for the object tree.
protected  XPHashtable m_xphtRowIcons
          RWW: Stores multiple icons - allows us to store a different icon for each class id.
static int PARAM_COL_PARAMNAME
          Optional control parameter index for the parameter name.
static int PARAM_COL_PARAMVALUE
          Optional control parameter index for the parameter value.
static int READ_ONLY_ROW_CLASSID
          JF- Array of read-only objects: column index for classID.
static int READ_ONLY_ROW_OBJECTID
          JF- Array of read-only objects: column index for objectID.
static java.lang.String STR_MVC_CLASS_NAME
          Class name for the activity space
static java.lang.String SUBSPACE_KEY_SELECTTREE
          Key name used by the Activity Space to store the tree.
 
Fields inherited from class com.plumtree.uiinfrastructure.expandablelist.ExpListModel
EXPLIST_COLUMN_COLSPAN, EXPLIST_COLUMN_ENABLESORT, EXPLIST_COLUMN_ID, EXPLIST_COLUMN_INVALID, EXPLIST_COLUMN_TITLE, EXPLIST_COLUMN_WIDTH, EXPLIST_SORTEDARRAY_PROPID_INDEX, m_arrExpListColInfo, m_bAddButtonDisabled, m_bCheckBoxesDisabled, m_bEnableMoveRowActions, m_bIsReadOnly, m_bWrapColumnHeaders, m_imgAddIcon, m_imgDeleteIcon, m_nListKey, m_nNextIndex, m_saData, m_sAddIconAlt, m_sAddLabel, m_sDeleteIconAlt, m_sDelRowConfirmMsg, m_sEmptyListAlert, m_sInstructions, m_sMainMessage, m_sSectionTitle, m_sTableInstructions, MAX_ROWS, MOVEACTION_DOWN, MOVEACTION_FIRST, MOVEACTION_LAST, MOVEACTION_UP, parent
 
Fields inherited from class com.plumtree.uiinfrastructure.editor.EditorHelperModel
m_asOwner
 
Constructor Summary
SelectPTObjectModel()
           
 
Method Summary
 void AddControlParamsToURL(int _nClassID, ASURL myURL)
          Helper function for extracting and adding extra control parameters from the create object string.
 void AddRowsOnRepost(XPHashtable _htFormData)
          Clear the list and add all the values from the tree.
 void ClearHiddenObjects()
          Clears the hidden objects for the tree.
 boolean ContainsObject(int _nClassID, int _nObjectID)
          Tells whether the Object identified by the class ID and the object ID in argument is in the list or no.
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
protected  java.lang.Object[][] CreateIndexMapping(PTGrowableSortedArrayWrapper _saItems)
          Helper method to create a temporary array of index mapping.
 void DoTaskOnComeBackFromSubEditor()
          This method will be called when you come back to the main Editor from a sub Editor.
 int GetAccessLevel()
          Returns the nAccessLevel.
 int GetCommunityFolderID()
          Returns the community id for the tree.
 int GetCommunityMode()
          Returns the community mode for the tree.
 java.lang.Object[][] GetCreateNewInfo()
          Returns the create new action informations.
 ASURL GetCreateNewURL(int _nClassID, java.lang.String _sEditorASName)
          Returns the URL to the Editor in create mode (new object).
 PTImageType GetDefaultRowIcon()
          Returns the icon to display on each row before the input text.
 java.lang.String GetDisplayObjects()
          Returns the array of objects to display in the tree.
 ASURL GetEditObjectURL(int _nClassID, int _nObjectID)
          Returns the URL to edit the object.
 java.lang.String GetHiddenObjects()
          Returns the hidden objects for the tree.
protected  int GetIndex(java.lang.Object[][] _arrIndexMapping, int _nClassID, int _nObjectID)
          Helper method to get the value of the index for the object identified by the object ID and class ID in argument.
 java.lang.String GetName()
          Returns the Class name.
 boolean GetNoRowIcons()
          Returns the value of the m_bNoRowIcons member variable.
 java.lang.String GetObjectClassIDs()
          Returns String of Class ID of the Objects displayed in the tree.
 PTImageType GetRowIconByClassID(int _nClassID)
          Returns the icon to display on each row before the input text, given a class id.
 java.lang.String GetSelectedItems()
          Returns a String of Class IDs and Object IDs of the Objects to select in the tree.
 HTMLElementCollection GetSelectedNamesAsHTML()
          Helper method to get a String with the selected Object names.
 int GetTreeLeafType()
          Returns the leaf type of the tree.
 java.lang.String GetTreeMultiSelect()
          Returns the selection type of the tree.
 java.lang.String GetTreeQueryFilter()
          Returns the query filter for the tree.
 java.lang.String GetTreeSpaceID()
          Returns tree AS ID.
 java.lang.String GetTreeSubTitle()
          Returns the Tree sub title.
 java.lang.String GetTreeTitle()
          Returns the Tree title.
 java.lang.String GetUniquePopUpName(java.lang.String _sName)
          Returns a unique String for the name of the pop-up.
 void InitializeListClassIDs(int[] _arrObjectClassIDs)
          Partialally initializes the expandable list.
 void InitializeReadOnlySelectPTObject(java.lang.String _sSectionTitle, java.lang.String _sSectionSubTitle, int[] _arrObjectClassIDs, int _nListKey)
          Initializes the read only expandable list.
 void InitializeSelectPTObject(java.lang.String _sSectionTitle, java.lang.String _sSectionSubTitle, PTImageType _imgAddIcon, java.lang.String _sAddLabel, int[] _arrObjectClassIDs, int _nListKey)
          Initializes the expandable list.
 void InitializeSortedArray(PTGrowableSortedArrayWrapper _saData)
          Initalizes the list (PTGrowableSortedArrayWrapper) with a column mapping and an array of sort.
 boolean IsEditLinkEnabled(int _nClassID)
          Returns true if it should be possible to edit Objects from this class ID.
 boolean IsObjectReadOnly(int _nClassID, int _nObjectID)
          Returns true if the object identified by the class id and the object id in argument is read only.
 void ResetTreeID()
          Resets the tree ID, this way a new tree will be opened.
protected  int SaveRow(PTGrowableSortedArrayWrapper _saData, int _nRowIndex, XPHashtable _htFormData)
          Saves the data on the row _nRowIndex.
protected  void SaveTreeID(XPHashtable _htFormData)
          Helper method to save the Tree ID on repost.
 void SetAccessLevel(int nAccessLevel)
          Sets the nAccessLevel.
 void SetCommunityFolderID(int _nCommunityFolderID)
          Sets the community folder id for the tree.
 void SetCommunityMode(int _nCommunityMode)
          Sets the community mode for the tree.
 void SetDefaultObjects(java.lang.Object[][] _arrRows)
          Add the array passed in argument to the list.
 void SetDefaultRowIcon(PTImageType _imgRowIcon)
          Sets the icon to display on each row before the input text.
 void SetDisplayObjects(java.lang.String _sDisplayObjects)
          Sets the array of objects to display in the tree.
 void SetEnableCreateNew(java.lang.Object[][] _arrCreateNewInfo)
          Enables the create new links for the Class ID in argument.
 void SetEnableMoveRowActions(boolean _bEnableMoveRowActions)
          Because this select ptobject list needs to support both move row actions enable and disable, we need to change the colspan of the header row when this happens.
 void SetHiddenObjects(int[][] _anClassIDObjectID)
          Sets the hidden objects for the tree.
 void SetNoRowIcons(boolean m_bNoRowIcons)
          Sets the m_bNoRowIcons member variable.
 void SetReadOnlyObjects(int[][] _arrReadOnlyObjects)
          Sets the read only objects.
 void SetRowIconByClassID(int _nClassID, PTImageType _imgRowIcon)
          Sets the icon to display on each row before the input text, given a class id.
 void SetTreeLeafType(int _leafType)
          Sets the leaf type for the tree.
 void SetTreeMultiSelect(boolean _selectType)
          Sets the selection type for the tree.
 void SetTreeQueryFilter(int _nClassID, int _nPropID, int[] _anValues)
          Sets the query filter for the tree.
 void SetTreeSubTitle(java.lang.String _sTreeSubTitle)
          Sets the Tree sub title.
 void SetTreeTitle(java.lang.String _sTreeTitle)
          Sets the Tree title.
 
Methods inherited from class com.plumtree.uiinfrastructure.expandablelist.ExpListModel
DeleteRowsOnRepost, DisableAddButton, DisableCheckBoxes, EnablePagination, GetAddIcon, GetAddIconAlt, GetAddLabel, GetAlertMessageForEmptyList, GetArrayOfObjToDelete, GetArrExpListColInfo, GetCurrentLowerObjectCount, GetCurrentUpperObjectCount, GetDeleteIcon, GetDeleteIconAlt, GetDelRowConfirmMsg, GetEmptyListInstructions, GetEmptyListMainMessage, GetEnableMoveRowActions, GetIsListReadOnly, GetItems, GetListKey, GetMainColumnSort, GetMainColumnSortDirection, GetModelStorageName, GetMoveAction, GetNumObjects, GetPaginationSize, GetReadOnlyItems, GetRowIndex, GetSectionTitle, GetTableInstructions, GetUniqueInt, GetUniqueString, GetUnusedProperties, GetWrapColumnHeaders, InitializeExpandableList, InitializeReadOnlyExpandableList, IsAddButtonDisabled, IsCheckBoxesDisabled, IsPaginationEnabled, ModifyRow, MoveDown, MoveFirst, MoveLast, MoveRow, MoveUp, ReverseCurrentSort, SaveSection, SetAddIcon, SetAddIconAlt, SetDeleteIcon, SetDeleteIconAlt, SetDelRowConfirmMsg, SetEmptyListMessages, SetEnableEmptyListClientValidation, SetIsListReadOnly, SetListKey, SetPagination, SetSectionTitle, SetTableInstructions, SetWrapColumnHeaders, SortByColumn
 
Methods inherited from class com.plumtree.uiinfrastructure.editor.EditorHelperModel
CleanupAllData, CleanupTempData, Init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.plumtree.uiinfrastructure.expandablelist.IExpListModelRO
GetAddIcon, GetAddIconAlt, GetAddLabel, GetAlertMessageForEmptyList, GetArrExpListColInfo, GetDeleteIcon, GetDeleteIconAlt, GetDelRowConfirmMsg, GetEmptyListInstructions, GetEmptyListMainMessage, GetEnableMoveRowActions, GetIsListReadOnly, GetListKey, GetMainColumnSort, GetMainColumnSortDirection, GetModelStorageName, GetReadOnlyItems, GetSectionTitle, GetTableInstructions, GetUniqueInt, GetUniqueString, GetUnusedProperties, GetWrapColumnHeaders, IsAddButtonDisabled, IsCheckBoxesDisabled, IsPaginationEnabled
 
Methods inherited from interface com.plumtree.uiinfrastructure.form.pagination.IPaginationModelRO
GetCurrentLowerObjectCount, GetCurrentUpperObjectCount, GetNumObjects, GetPaginationSize
 
Methods inherited from interface com.plumtree.uiinfrastructure.activityspace.IModel
CleanupAllData, CleanupTempData, Init
 

Field Detail

STR_MVC_CLASS_NAME

public static final java.lang.String STR_MVC_CLASS_NAME
Class name for the activity space

See Also:
Constant Field Values

SUBSPACE_KEY_SELECTTREE

public static final java.lang.String SUBSPACE_KEY_SELECTTREE
Key name used by the Activity Space to store the tree.

See Also:
Constant Field Values

EXPLIST_COL_MAX

public static final int EXPLIST_COL_MAX
Number total of columns

See Also:
Constant Field Values

EXPLIST_COL_CLASSID

public static final int EXPLIST_COL_CLASSID
This column contains the Object Class IDs.

See Also:
Constant Field Values

EXPLIST_COL_OBJECTID

public static final int EXPLIST_COL_OBJECTID
This column contains the Object IDs.

See Also:
Constant Field Values

EXPLIST_COL_STRING

public static final int EXPLIST_COL_STRING
This is the String that we doisplay in the list. E.g.: Object name or folder path.

See Also:
Constant Field Values

EXPLIST_DEFAULT_INITIAL_SIZE

public static final int EXPLIST_DEFAULT_INITIAL_SIZE
Default initial size for the sorted array.

See Also:
Constant Field Values

HIDE_COL_MAX

public static final int HIDE_COL_MAX
Number total of columns for hide objects array.

See Also:
Constant Field Values

HIDE_COL_CLASSID

public static final int HIDE_COL_CLASSID
This column of the passed Objects to Hide contains the class IDs.

See Also:
Constant Field Values

HIDE_COL_OBJECTID

public static final int HIDE_COL_OBJECTID
This column of the passed Objects to Hide contains the object IDs.

See Also:
Constant Field Values

CREATE_NEW_COL_CLASSID

public static final int CREATE_NEW_COL_CLASSID
Create new array column: class ID

See Also:
Constant Field Values

CREATE_NEW_COL_ASNAME

public static final int CREATE_NEW_COL_ASNAME
Create new array column: AS Name

See Also:
Constant Field Values

CREATE_NEW_COL_LABEL

public static final int CREATE_NEW_COL_LABEL
Create new array column: text to display with the create new link

See Also:
Constant Field Values

CREATE_NEW_COL_ICON

public static final int CREATE_NEW_COL_ICON
Create new array column: icon to display for the create new link

See Also:
Constant Field Values

CREATE_NEW_COL_PARAMS

public static final int CREATE_NEW_COL_PARAMS
Create new array column: extra control arguments for the create action. Use CREATE_NEW_COL_MAXWITHPARAMS to set the size of the array when using this element.

See Also:
Constant Field Values

CREATE_NEW_COL_MAX

public static final int CREATE_NEW_COL_MAX
Size of each m_arrCreateNewInfo row

See Also:
Constant Field Values

CREATE_NEW_COL_MAXWITHPARAMS

public static final int CREATE_NEW_COL_MAXWITHPARAMS
Size of each m_arrCreateNewInfo row with optional control parameters.

See Also:
Constant Field Values

PARAM_COL_PARAMNAME

public static final int PARAM_COL_PARAMNAME
Optional control parameter index for the parameter name. Used in the create new array column: icon to display for the create new link

See Also:
Constant Field Values

PARAM_COL_PARAMVALUE

public static final int PARAM_COL_PARAMVALUE
Optional control parameter index for the parameter value. Used in the create new array column: icon to display for the create new link

See Also:
Constant Field Values

m_imgDefaultRowIcon

protected PTImageType m_imgDefaultRowIcon
Icon to display on each row, just before the input text. RWW: This will now be the "default". See m_xphtRowIcons for precedence in icon loading.


m_xphtRowIcons

protected XPHashtable m_xphtRowIcons
RWW: Stores multiple icons - allows us to store a different icon for each class id. When retrieving icons internally, this table will be checked first. If no icons appear here, then we will check the default row icon. If that is null, then we will show no image. Having an icon for a specific class id in this table will take precedence.


m_bNoRowIcons

protected boolean m_bNoRowIcons
JH: Set to true if no row icons are to be displayed. This will override m_xphtRowIcons, m_imgDefaultRowIcon, and the default ClassDescriptor icon retrieval mechanism.


m_sTreeSpaceID

protected java.lang.String m_sTreeSpaceID
Tree Space ID. The first time the ID is empty and a new AS is opened, but after that, we save the ID and the same tree AS is reopened each time.


m_sTreeSubTitle

protected java.lang.String m_sTreeSubTitle
Tree sub title


m_sTreeTitle

protected java.lang.String m_sTreeTitle
Tree title


m_sDisplayObjects

protected java.lang.String m_sDisplayObjects
Class IDs and Object IDs of objects to display in the tree.


m_strObjectsToHide

protected java.lang.String m_strObjectsToHide
Objects to hide for the object tree.


m_strTreeQueryFilter

protected java.lang.String m_strTreeQueryFilter
Query Filter for the object tree.


m_arrCreateNewInfo

protected java.lang.Object[][] m_arrCreateNewInfo
Information about the create new links to display


m_arrObjectClassIDs

protected int[] m_arrObjectClassIDs
Class ID of the Objects displayed on the list.


m_bTreeMultiSelect

protected boolean m_bTreeMultiSelect
Selection type for the object tree.


m_nAccessLevel

protected int m_nAccessLevel
This value determines the security access requirements for the objects to be added to the list... (a filter for the tree control).


m_nCommunityMode

protected int m_nCommunityMode
Community Mode to display objects.

See Also:
com.plumtree.portaluiinfrastructure.tree.StartTreeControl.COMMUNITY_MODE

m_nCommunityFolderID

protected int m_nCommunityFolderID
Community Folder ID to display objects from.


m_treeLeafType

protected int m_treeLeafType
Leaf type for the object tree.


m_arrReadOnlyObjects

protected int[][] m_arrReadOnlyObjects
JF- Array of classID/objectID that cannot be deleted from the list.


READ_ONLY_ROW_CLASSID

public static final int READ_ONLY_ROW_CLASSID
JF- Array of read-only objects: column index for classID.

See Also:
Constant Field Values

READ_ONLY_ROW_OBJECTID

public static final int READ_ONLY_ROW_OBJECTID
JF- Array of read-only objects: column index for objectID.

See Also:
Constant Field Values
Constructor Detail

SelectPTObjectModel

public SelectPTObjectModel()
Method Detail

AddControlParamsToURL

public void AddControlParamsToURL(int _nClassID,
                                  ASURL myURL)
Helper function for extracting and adding extra control parameters from the create object string.

Parameters:
_nClassID -
myURL -

GetUniquePopUpName

public java.lang.String GetUniquePopUpName(java.lang.String _sName)
Returns a unique String for the name of the pop-up.

Specified by:
GetUniquePopUpName in interface ISelectPTObjectModelRO
Parameters:
_sName -
See Also:
com.plumtree.portaluiinfrastructure.expandablelist.selectptobject.SelectPTObjectModel#GetUniquePopUpName()

AddRowsOnRepost

public void AddRowsOnRepost(XPHashtable _htFormData)
Clear the list and add all the values from the tree.

Specified by:
AddRowsOnRepost in class ExpListModel
Parameters:
_htFormData - Form data

ContainsObject

public boolean ContainsObject(int _nClassID,
                              int _nObjectID)
Tells whether the Object identified by the class ID and the object ID in argument is in the list or no.

Parameters:
_nClassID -
_nObjectID -
Returns:
boolean

Create

public java.lang.Object Create()
Description copied from class: EditorHelperModel
This method is used by the ASManager to return new instances of managed objects.

Specified by:
Create in interface IManagedObject
Specified by:
Create in class EditorHelperModel
Returns:
A new instance of the managed class (i.e. return new Foo();)
See Also:
IManagedObject.Create()

DoTaskOnComeBackFromSubEditor

public void DoTaskOnComeBackFromSubEditor()
This method will be called when you come back to the main Editor from a sub Editor.


GetAccessLevel

public int GetAccessLevel()
Returns the nAccessLevel. The accesslevel of the objects for the tree control to display.

Specified by:
GetAccessLevel in interface ISelectPTObjectModelRO
Returns:
int
See Also:
GetAccessLevel()

GetCommunityMode

public int GetCommunityMode()
Returns the community mode for the tree.

Specified by:
GetCommunityMode in interface ISelectPTObjectModelRO
Returns:
int
See Also:
GetCommunityMode()

GetCommunityFolderID

public int GetCommunityFolderID()
Returns the community id for the tree.

Specified by:
GetCommunityFolderID in interface ISelectPTObjectModelRO
Returns:
int
See Also:
GetCommunityFolderID()

GetCreateNewInfo

public java.lang.Object[][] GetCreateNewInfo()
Returns the create new action informations.

Specified by:
GetCreateNewInfo in interface ISelectPTObjectModelRO
Returns:
Object[][]
See Also:
GetCreateNewInfo()

GetCreateNewURL

public ASURL GetCreateNewURL(int _nClassID,
                             java.lang.String _sEditorASName)
Returns the URL to the Editor in create mode (new object).

Specified by:
GetCreateNewURL in interface ISelectPTObjectModelRO
Parameters:
_nClassID -
_sEditorASName -
Returns:
ASURL URL to the Editor
See Also:
com.plumtree.portaluiinfrastructure.expandablelist.selectptobject.SelectPTObjectModel#GetCreateNewURL()

GetEditObjectURL

public ASURL GetEditObjectURL(int _nClassID,
                              int _nObjectID)
Returns the URL to edit the object.

Specified by:
GetEditObjectURL in interface ISelectPTObjectModelRO
Parameters:
_nClassID -
_nObjectID -
_sEditorASName -
Returns:
ASURL URL to the Editor
See Also:
com.plumtree.portaluiinfrastructure.expandablelist.selectptobject.SelectPTObjectModel#GetEditObjectURL()

GetHiddenObjects

public java.lang.String GetHiddenObjects()
Returns the hidden objects for the tree.

Specified by:
GetHiddenObjects in interface ISelectPTObjectModelRO
Returns:
String
See Also:
GetHiddenObjects()

GetName

public java.lang.String GetName()
Returns the Class name.

Specified by:
GetName in interface IMVCObject
Specified by:
GetName in class EditorHelperModel
Returns:
String

GetObjectClassIDs

public java.lang.String GetObjectClassIDs()
Returns String of Class ID of the Objects displayed in the tree. E.g.: "2,45,3" This is the format used by the tree.

Specified by:
GetObjectClassIDs in interface ISelectPTObjectModelRO
Returns:
String
See Also:
GetObjectClassIDs()

GetDefaultRowIcon

public PTImageType GetDefaultRowIcon()
Returns the icon to display on each row before the input text. If the value is null, no icon is displayed.

Specified by:
GetDefaultRowIcon in interface ISelectPTObjectModelRO
Returns:
PTImageType
See Also:
com.plumtree.portaluiinfrastructure.expandablelist.selectptobject.SelectPTObjectModel#GetRowIcon()

GetRowIconByClassID

public PTImageType GetRowIconByClassID(int _nClassID)
Returns the icon to display on each row before the input text, given a class id. If the value is null then we get the default row icon.

Specified by:
GetRowIconByClassID in interface ISelectPTObjectModelRO
Returns:
PTImageType
See Also:
com.plumtree.portaluiinfrastructure.expandablelist.selectptobject.SelectPTObjectModel#GetRowIconByClassID()

GetSelectedItems

public java.lang.String GetSelectedItems()
Returns a String of Class IDs and Object IDs of the Objects to select in the tree. E.g.: "classID1,ObjID1,classID2,objID2" This is the format used by the tree.

Specified by:
GetSelectedItems in interface ISelectPTObjectModelRO
Returns:
String
See Also:
GetSelectedItems()

GetSelectedNamesAsHTML

public HTMLElementCollection GetSelectedNamesAsHTML()
Helper method to get a String with the selected Object names. E.g.: User1, User2, Group1 Will return an empty String if no Object was selected.

Specified by:
GetSelectedNamesAsHTML in interface ISelectPTObjectModelRO
Returns:
HTMLElementCollection
See Also:
GetSelectedNamesAsHTML()

GetTreeLeafType

public int GetTreeLeafType()
Returns the leaf type of the tree.

Specified by:
GetTreeLeafType in interface ISelectPTObjectModelRO
Returns:
int
See Also:
GetTreeLeafType()

GetTreeMultiSelect

public java.lang.String GetTreeMultiSelect()
Returns the selection type of the tree. Converts the boolean value to a string so that it can be put in the query string for the tree.

Specified by:
GetTreeMultiSelect in interface ISelectPTObjectModelRO
Returns:
String
See Also:
GetTreeMultiSelect()

GetTreeQueryFilter

public java.lang.String GetTreeQueryFilter()
Returns the query filter for the tree.

Specified by:
GetTreeQueryFilter in interface ISelectPTObjectModelRO
Returns:
String
See Also:
GetTreeQueryFilter()

GetTreeSpaceID

public java.lang.String GetTreeSpaceID()
Returns tree AS ID.

Specified by:
GetTreeSpaceID in interface ISelectPTObjectModelRO
Returns:
String
See Also:
GetTreeSpaceID()

ResetTreeID

public void ResetTreeID()
Resets the tree ID, this way a new tree will be opened. This can be used to switch from a multi select tree to a single select tree for example.


GetTreeSubTitle

public java.lang.String GetTreeSubTitle()
Returns the Tree sub title.

Specified by:
GetTreeSubTitle in interface ISelectPTObjectModelRO
Returns:
String
See Also:
GetTreeSubTitle()

GetTreeTitle

public java.lang.String GetTreeTitle()
Returns the Tree title.

Specified by:
GetTreeTitle in interface ISelectPTObjectModelRO
Returns:
String
See Also:
GetTreeTitle()

InitializeReadOnlySelectPTObject

public void InitializeReadOnlySelectPTObject(java.lang.String _sSectionTitle,
                                             java.lang.String _sSectionSubTitle,
                                             int[] _arrObjectClassIDs,
                                             int _nListKey)
Initializes the read only expandable list.

Parameters:
_sSectionTitle - Main title.
_sSectionSubTitle - Sub title
_arrObjectClassIDs - Class ID of the Objects displayed on the list.
_nListKey - In case you have multiple Expandable Lists on the same DP, they should have a different key (otherwise, just set it to 1).

InitializeSelectPTObject

public void InitializeSelectPTObject(java.lang.String _sSectionTitle,
                                     java.lang.String _sSectionSubTitle,
                                     PTImageType _imgAddIcon,
                                     java.lang.String _sAddLabel,
                                     int[] _arrObjectClassIDs,
                                     int _nListKey)
Initializes the expandable list.

Parameters:
_sSectionTitle - Main title.
_sSectionSubTitle - Sub title
_imgAddIcon - Icon for the add action.
_sAddLabel - Text to display next to the add icon.
_arrObjectClassIDs - Class ID of the Objects displayed on the list.
_nListKey - In case you have multiple Expandable Lists on the same DP, they should have a different key (otherwise, just set it to 1).

InitializeListClassIDs

public void InitializeListClassIDs(int[] _arrObjectClassIDs)
Partialally initializes the expandable list. InitializeExpandableList must also be called when this method is used.

Parameters:
_arrObjectClassIDs - Class ID of the Objects displayed on the list.

InitializeSortedArray

public void InitializeSortedArray(PTGrowableSortedArrayWrapper _saData)
Initalizes the list (PTGrowableSortedArrayWrapper) with a column mapping and an array of sort. The growable array will always be sorted by the 1st column ascending.

Specified by:
InitializeSortedArray in class ExpListModel
Parameters:
_saData -

IsEditLinkEnabled

public boolean IsEditLinkEnabled(int _nClassID)
Returns true if it should be possible to edit Objects from this class ID.

Specified by:
IsEditLinkEnabled in interface ISelectPTObjectModelRO
Parameters:
_nClassID -
See Also:
com.plumtree.portaluiinfrastructure.expandablelist.selectptobject.SelectPTObjectModel#IsEditLinkEnabled()

SetAccessLevel

public void SetAccessLevel(int nAccessLevel)
Sets the nAccessLevel. The accesslevel of the objects for the tree control to display.

Parameters:
nAccessLevel - The nAccessLevel to set

SetCommunityMode

public void SetCommunityMode(int _nCommunityMode)
Sets the community mode for the tree. By default there is no community mode.

Parameters:
_nCommunityMode -

SetCommunityFolderID

public void SetCommunityFolderID(int _nCommunityFolderID)
Sets the community folder id for the tree. By default there is no community folder id.

Parameters:
_nCommunityFolderID -

SetDefaultObjects

public void SetDefaultObjects(java.lang.Object[][] _arrRows)
Add the array passed in argument to the list. The array should be created using the EXPLIST_COL constants defined in this class.

Parameters:
_arrRows - Array of rows to add.

SetEnableCreateNew

public void SetEnableCreateNew(java.lang.Object[][] _arrCreateNewInfo)
Enables the create new links for the Class ID in argument. Doing this will also enbale the links to Edit the Objects in the list.

Parameters:
_arrCreateNewInfo - Information for each create new link

SetEnableMoveRowActions

public void SetEnableMoveRowActions(boolean _bEnableMoveRowActions)
Because this select ptobject list needs to support both move row actions enable and disable, we need to change the colspan of the header row when this happens.

Overrides:
SetEnableMoveRowActions in class ExpListModel
Parameters:
_bEnableMoveRowActions -

ClearHiddenObjects

public void ClearHiddenObjects()
Clears the hidden objects for the tree.

Specified by:
ClearHiddenObjects in interface ISelectPTObjectModelRO
See Also:
ClearHiddenObjects()

SetHiddenObjects

public void SetHiddenObjects(int[][] _anClassIDObjectID)
Sets the hidden objects for the tree. By default there are no hidden objects.

Parameters:
_anClassIDObjectID -

SetReadOnlyObjects

public void SetReadOnlyObjects(int[][] _arrReadOnlyObjects)
Sets the read only objects. Those object won't appear in the tree and the user will not be able to delete them.

Parameters:
_arrReadOnlyObjects -

IsObjectReadOnly

public boolean IsObjectReadOnly(int _nClassID,
                                int _nObjectID)
Returns true if the object identified by the class id and the object id in argument is read only.

Specified by:
IsObjectReadOnly in interface ISelectPTObjectModelRO
Parameters:
_nClassID -
_nObjectID -
Returns:
boolean
See Also:
com.plumtree.portaluiinfrastructure.expandablelist.selectptobject.SelectPTObjectModel#IsObjectReadOnly()

SetDisplayObjects

public void SetDisplayObjects(java.lang.String _sDisplayObjects)
Sets the array of objects to display in the tree. (Only those objects will be display in the tree.) The array in argument should be in the following format: classid1,objectid1,classid2,objectid2....

Parameters:
_sDisplayObjects -

GetDisplayObjects

public java.lang.String GetDisplayObjects()
Returns the array of objects to display in the tree.

Specified by:
GetDisplayObjects in interface ISelectPTObjectModelRO
Parameters:
String -
See Also:
GetDisplayObjects()

GetNoRowIcons

public boolean GetNoRowIcons()
Returns the value of the m_bNoRowIcons member variable. True if no icons are to be displayed on each selected row.

Specified by:
GetNoRowIcons in interface ISelectPTObjectModelRO
Returns:
boolean

SetNoRowIcons

public void SetNoRowIcons(boolean m_bNoRowIcons)
Sets the m_bNoRowIcons member variable. True if no icons are to be displayed on each selected row.

Parameters:
m_bNoRowIcons -

SetDefaultRowIcon

public void SetDefaultRowIcon(PTImageType _imgRowIcon)
Sets the icon to display on each row before the input text. By default, no icon is displayed.

Parameters:
_imgRowIcon -

SetRowIconByClassID

public void SetRowIconByClassID(int _nClassID,
                                PTImageType _imgRowIcon)
Sets the icon to display on each row before the input text, given a class id. By default, all class ids are associated with empty images. Call SetDefaultRowIcon to set a universal default icon.

Parameters:
_nClassID - the class id to be associated with this icon
_imgRowIcon - the icon you want to be displayed

SetTreeLeafType

public void SetTreeLeafType(int _leafType)
Sets the leaf type for the tree. Is set to N_LEAFSELECT by default.

Parameters:
_leafType -

SetTreeMultiSelect

public void SetTreeMultiSelect(boolean _selectType)
Sets the selection type for the tree. Multiselect is set to true by default.

Parameters:
_selectType -

SetTreeQueryFilter

public void SetTreeQueryFilter(int _nClassID,
                               int _nPropID,
                               int[] _anValues)
Sets the query filter for the tree. By default there is no query filter.

Parameters:
_nClassID -
_nPropID -
_anValues -

SetTreeSubTitle

public void SetTreeSubTitle(java.lang.String _sTreeSubTitle)
Sets the Tree sub title.

Parameters:
_sTreeSubTitle -

SetTreeTitle

public void SetTreeTitle(java.lang.String _sTreeTitle)
Sets the Tree title.

Parameters:
_sTreeTitle -

SaveRow

protected int SaveRow(PTGrowableSortedArrayWrapper _saData,
                      int _nRowIndex,
                      XPHashtable _htFormData)
Saves the data on the row _nRowIndex.

Specified by:
SaveRow in class ExpListModel
Parameters:
_saData - List to update the data on row _nRowIndex
_nRowIndex - Index of the row to save.
_htFormData - Data posted by the form.
Returns:
int Status for server side validation.

SaveTreeID

protected void SaveTreeID(XPHashtable _htFormData)
Helper method to save the Tree ID on repost.

Parameters:
_htFormData - Form data

CreateIndexMapping

protected java.lang.Object[][] CreateIndexMapping(PTGrowableSortedArrayWrapper _saItems)
Helper method to create a temporary array of index mapping. On each row we have the following info: class ID - Object ID - index This method is used to not loose the order when the move row actions are enabled.

Parameters:
_saItems - List items
Returns:
Object[][]

GetIndex

protected int GetIndex(java.lang.Object[][] _arrIndexMapping,
                       int _nClassID,
                       int _nObjectID)
Helper method to get the value of the index for the object identified by the object ID and class ID in argument. Returns -1 if the object was not in the array.

Parameters:
_arrIndexMapping - Index mapping
_nClassID - Object class ID
_nObjectID - Object ID
Returns:
int Value of the index



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