com.plumtree.portalpages.admin.ptutilities.userlockmanager
Class UserLockListModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorHelperModel
      extended by com.plumtree.uiinfrastructure.expandablelist.ExpListModel
          extended by com.plumtree.portalpages.admin.ptutilities.userlockmanager.UserLockListModel
All Implemented Interfaces:
IManagedObject, IModel, IModelRO, IMVCObject, IExpListModelRO, IPaginationModel, IPaginationModelRO

public class UserLockListModel
extends ExpListModel

Author:
JenniferSu Expandable list implementation for the Release User Lock utility.

Field Summary
static int EXPLIST_COL_DATELOCKED
          This column contains the Date Locked.
static int EXPLIST_COL_LOGINNAME
          This column contains the Reason for Lock.
static int EXPLIST_COL_MAX
          Number total of columns
static int EXPLIST_COL_NAME
          This column contains the Name.
static int EXPLIST_COL_USERID
          This column contains the User Object ID
static int EXPLIST_SORT_ORDER
          This column contains the sort order.
static java.lang.String FILTER_ADMIN_DISABLED
          Filter reason string for admin disabled.
static java.lang.String FILTER_AGENT_DISABLED
          Filter reason string for agent disabled.
static java.lang.String FILTER_ALL
          Filter reason string for retrieving all.
static java.lang.String FILTER_BAD_LOGIN
          Filter reason string for too many bad login attempts.
protected  java.lang.String m_sDefaultValue
          This is used on add to populate the input text of the newly added row.
static java.lang.String STR_MVC_CLASS_NAME
          Class name for the activity space
 
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
UserLockListModel()
           
 
Method Summary
 void AddRowsOnRepost(XPHashtable _htFormData)
          Adds one row at the bottom of the list
 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.
 void Finish()
           
 int[] GetArrayOfObjToDelete(XPHashtable _htFormData)
          ROB: Make the available for other models.
 java.lang.String GetCurrentFilter()
          Get the reason that the list is currently filtering on.
 java.lang.String GetName()
          Returns the Class name.
 void InitializeExpandableList(java.lang.String _sSectionTitle, java.lang.String _sSectionSubTitle1, java.lang.String _sSectionSubTitle2, java.lang.String _sSectionSubTitle3, PTImageType _imgAddIcon, java.lang.String _sAddLabel, int _nListKey)
          Initializes the expandable list.
 void InitializeSortedArray(PTGrowableSortedArrayWrapper _saData)
          Initalizes the list (PTGrowableSortedArrayWrapper) with a column mapping and an array of sort.
 void InitializeUserLockList()
          Initialize and load the expandable list.
 void Load(java.lang.String filter)
          Load the expandable list with locked users
protected  int SaveRow(PTGrowableSortedArrayWrapper _saData, int _nRowIndex, XPHashtable _htFormData)
          Saves the data on the row _nRowIndex.
 int SaveSection(XPHashtable _htFormData)
          Calls the right save function according to the page name passed in argument.
 void SetDefaultObjects(java.lang.Object[][] _arrRows)
          Add the array passed in argument to the list.
 void UnlockUsers()
          This function unlocks users that have been checked in the UI
 
Methods inherited from class com.plumtree.uiinfrastructure.expandablelist.ExpListModel
DisableAddButton, DisableCheckBoxes, EnablePagination, GetAddIcon, GetAddIconAlt, GetAddLabel, GetAlertMessageForEmptyList, 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, 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
Class name for the activity space

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_USERID

public static final int EXPLIST_COL_USERID
This column contains the User Object ID

See Also:
Constant Field Values

EXPLIST_COL_NAME

public static final int EXPLIST_COL_NAME
This column contains the Name.

See Also:
Constant Field Values

EXPLIST_SORT_ORDER

public static final int EXPLIST_SORT_ORDER
This column contains the sort order. Rows will be sorted by user name

See Also:
Constant Field Values

EXPLIST_COL_LOGINNAME

public static final int EXPLIST_COL_LOGINNAME
This column contains the Reason for Lock.

See Also:
Constant Field Values

EXPLIST_COL_DATELOCKED

public static final int EXPLIST_COL_DATELOCKED
This column contains the Date Locked.

See Also:
Constant Field Values

FILTER_ADMIN_DISABLED

public static final java.lang.String FILTER_ADMIN_DISABLED
Filter reason string for admin disabled.

See Also:
Constant Field Values

FILTER_AGENT_DISABLED

public static final java.lang.String FILTER_AGENT_DISABLED
Filter reason string for agent disabled.

See Also:
Constant Field Values

FILTER_BAD_LOGIN

public static final java.lang.String FILTER_BAD_LOGIN
Filter reason string for too many bad login attempts.

See Also:
Constant Field Values

FILTER_ALL

public static final java.lang.String FILTER_ALL
Filter reason string for retrieving all.

See Also:
Constant Field Values

m_sDefaultValue

protected java.lang.String m_sDefaultValue
This is used on add to populate the input text of the newly added row.

Constructor Detail

UserLockListModel

public UserLockListModel()
Method Detail

AddRowsOnRepost

public void AddRowsOnRepost(XPHashtable _htFormData)
Adds one row at the bottom of the list

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

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

GetName

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

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

InitializeUserLockList

public void InitializeUserLockList()
Initialize and load the expandable list.


InitializeExpandableList

public void InitializeExpandableList(java.lang.String _sSectionTitle,
                                     java.lang.String _sSectionSubTitle1,
                                     java.lang.String _sSectionSubTitle2,
                                     java.lang.String _sSectionSubTitle3,
                                     PTImageType _imgAddIcon,
                                     java.lang.String _sAddLabel,
                                     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.
_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)
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 -

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.

SaveSection

public int SaveSection(XPHashtable _htFormData)
Calls the right save function according to the page name passed in argument.

Overrides:
SaveSection in class ExpListModel
Parameters:
_sPageName -
_htFormData -
Returns:
int Page status for server side validation

GetArrayOfObjToDelete

public int[] GetArrayOfObjToDelete(XPHashtable _htFormData)
ROB: Make the available for other models.

Overrides:
GetArrayOfObjToDelete in class ExpListModel
Parameters:
_htFormData -
Returns:
int[]

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.

UnlockUsers

public void UnlockUsers()
This function unlocks users that have been checked in the UI


DeleteRowsOnRepost

public void DeleteRowsOnRepost(XPHashtable _htFormData)
Gets the array of checked rows and delete them from the list.

Overrides:
DeleteRowsOnRepost in class ExpListModel
Parameters:
_htFormData -

Finish

public void Finish()

Load

public void Load(java.lang.String filter)
Load the expandable list with locked users

Parameters:
filter -

GetCurrentFilter

public java.lang.String GetCurrentFilter()
Get the reason that the list is currently filtering on.

Returns:



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