com.plumtree.portalpages.portlets.sitemap.prefs
Class SiteMapPortletPrefsSortedLinksModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorHelperModel
      extended by com.plumtree.uiinfrastructure.expandablelist.ExpListModel
          extended by com.plumtree.portalpages.portlets.sitemap.prefs.SiteMapPortletPrefsSortedLinksModel
All Implemented Interfaces:
IManagedObject, IModel, IModelRO, IMVCObject, IExpListModelRO, IPaginationModel, IPaginationModelRO

public class SiteMapPortletPrefsSortedLinksModel
extends ExpListModel

Author:
NaveenP

Field Summary
static int EXPLIST_DEFAULT_INITIAL_SIZE
          Default initial size for the sorted array.
static int LINKS_COL_LINK_DESCRIPTION
           
static int LINKS_COL_LINK_INDEX
           
static int LINKS_COL_LINK_NAME
           
static int LINKS_COL_LINK_OBJECTID
           
static int LINKS_COL_LINK_TYPE
           
static int LINKS_COL_LINK_UNIQUE_ID
           
static java.lang.String STR_MVC_CLASS_NAME
           
 
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
SiteMapPortletPrefsSortedLinksModel()
           
 
Method Summary
 void AddRowsOnRepost(XPHashtable _htFormData)
          Will be called each time the add action is performed.
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 void DeleteRowsOnRepost(XPHashtable _htFormData)
          Gets the array of checked rows and delete them from the list.
 int GetCurrNumLinks()
           
 java.lang.String GetItemsAsStringForStore()
           
 java.lang.String GetLinkName(int nIndex)
           
 java.lang.String GetName()
          Returns the Class name.
 void InitializeLinkList(IPTSession _Session, int _nListKey, java.lang.String strLinkOrder)
          Initializes the expandable list.
 void InitializeSortedArray(PTGrowableSortedArrayWrapper _saData)
          Will be called when this class is initalized.
 boolean IsAlpha()
           
protected  int SaveRow(PTGrowableSortedArrayWrapper _saData, int _nRowIndex, XPHashtable _htFormData)
          Will be called each ime there is a repost to save the data on the list.
 void SetAlphaOrdering(boolean bIsAlpha)
           
 void UpdateRowsOnRepost(XPHashtable _htFormData)
           
 
Methods inherited from class com.plumtree.uiinfrastructure.expandablelist.ExpListModel
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, SetEnableMoveRowActions, 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.activityspace.IModel
CleanupAllData, CleanupTempData, Init
 

Field Detail

STR_MVC_CLASS_NAME

public static final java.lang.String STR_MVC_CLASS_NAME
See Also:
Constant Field Values

LINKS_COL_LINK_NAME

public static final int LINKS_COL_LINK_NAME
See Also:
Constant Field Values

LINKS_COL_LINK_OBJECTID

public static final int LINKS_COL_LINK_OBJECTID
See Also:
Constant Field Values

LINKS_COL_LINK_DESCRIPTION

public static final int LINKS_COL_LINK_DESCRIPTION
See Also:
Constant Field Values

LINKS_COL_LINK_TYPE

public static final int LINKS_COL_LINK_TYPE
See Also:
Constant Field Values

LINKS_COL_LINK_INDEX

public static final int LINKS_COL_LINK_INDEX
See Also:
Constant Field Values

LINKS_COL_LINK_UNIQUE_ID

public static final int LINKS_COL_LINK_UNIQUE_ID
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
Constructor Detail

SiteMapPortletPrefsSortedLinksModel

public SiteMapPortletPrefsSortedLinksModel()
Method Detail

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()

AddRowsOnRepost

public void AddRowsOnRepost(XPHashtable _htFormData)
Description copied from class: ExpListModel
Will be called each time the add action is performed. Should take care of adding the row(s) to the list. Use the GetItems() method to get the list.

Specified by:
AddRowsOnRepost in class ExpListModel
Parameters:
_htFormData - Form data
See Also:
ExpListModel.AddRowsOnRepost(XPHashtable)

UpdateRowsOnRepost

public void UpdateRowsOnRepost(XPHashtable _htFormData)

DeleteRowsOnRepost

public void DeleteRowsOnRepost(XPHashtable _htFormData)
Description copied from class: ExpListModel
Gets the array of checked rows and delete them from the list.

Overrides:
DeleteRowsOnRepost in class ExpListModel
See Also:
ExpListModel.DeleteRowsOnRepost(XPHashtable)

GetCurrNumLinks

public int GetCurrNumLinks()
Returns:
int

GetItemsAsStringForStore

public java.lang.String GetItemsAsStringForStore()
Returns:
String

GetLinkName

public java.lang.String GetLinkName(int nIndex)
Parameters:
nIndex -
Returns:

GetName

public java.lang.String GetName()
Description copied from class: EditorHelperModel
Returns the Class name.

Specified by:
GetName in interface IMVCObject
Specified by:
GetName in class EditorHelperModel
Returns:
String
See Also:
IMVCObject.GetName()

InitializeLinkList

public void InitializeLinkList(IPTSession _Session,
                               int _nListKey,
                               java.lang.String strLinkOrder)
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).

InitializeSortedArray

public void InitializeSortedArray(PTGrowableSortedArrayWrapper _saData)
Description copied from class: ExpListModel
Will be called when this class is initalized. Should take care of initializing _saData (calling Initialize).

Specified by:
InitializeSortedArray in class ExpListModel
See Also:
ExpListModel.InitializeSortedArray(PTGrowableSortedArrayWrapper)

SetAlphaOrdering

public void SetAlphaOrdering(boolean bIsAlpha)
Parameters:
bIsAlpha -

SaveRow

protected int SaveRow(PTGrowableSortedArrayWrapper _saData,
                      int _nRowIndex,
                      XPHashtable _htFormData)
Description copied from class: ExpListModel
Will be called each ime there is a repost to save the data on the list. Should contain the code to update the data on the row _nRowIndex.Use the SetItem method to update _saData and use _htFormData to retrieve the posted data.

Specified by:
SaveRow in class ExpListModel
Returns:
int
See Also:
ExpListModel.SaveRow(PTGrowableSortedArrayWrapper, int, XPHashtable)

IsAlpha

public boolean IsAlpha()



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