com.plumtree.portaluiinfrastructure.subscribematrix
Class MultiObjectsSubscribeModel

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
              extended by com.plumtree.portaluiinfrastructure.expandablelist.selectptobject.selectptobjectsbytype.SelectPTObjectsByTypeModel
                  extended by com.plumtree.portaluiinfrastructure.editor.commonpages.objectsecurity.ObjectSecurityModel
                      extended by com.plumtree.portaluiinfrastructure.subscribematrix.MultiObjectsSubscribeModel
All Implemented Interfaces:
IObjectSecurityModelRO, ISelectPTObjectModelRO, IMultiObjectsSubscribeModelRO, IManagedObject, IModel, IModelRO, IMVCObject, IExpListModelRO, IPaginationModel, IPaginationModelRO

public class MultiObjectsSubscribeModel
extends ObjectSecurityModel
implements IMultiObjectsSubscribeModelRO

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 EXPLIST_COL_SUBSCRIBE
          Subscribe column
static int EXPLIST_COLUMN_IMG
          Object img
protected  int[] m_arrColumns
          Array of column info.
protected  XPArrayList m_arrObjects
          Array of objects we are editing the security for.
static java.lang.String QS_MULTI_OBJ_SUBSCRIBE_IDS
          Class name for the activity space
static java.lang.String STR_MVC_CLASS_NAME
          Class name for the activity space
 
Fields inherited from class com.plumtree.portaluiinfrastructure.editor.commonpages.objectsecurity.ObjectSecurityModel
EXPLIST_COL_ACCESSLEVEL_ID, EXPLIST_COL_ACCESSLEVEL_STRING, EXPLIST_COL_GROUPTREEASID, EXPLIST_COL_MANDATORY, EXPLIST_COL_MAX, EXPLIST_COL_ROWACCESS, EXPLIST_DEFAULT_INITIAL_SIZE, m_arrAccessLevels, m_arrLowAccessObjects, m_arrNoContentTree, m_bCardACL, m_bShowHeaderAndLeftNav, m_nSupportMandatoryColumn, m_ptObject, m_ptSession, m_sLeftNavString, MANDATORY_FALSE, MANDATORY_TRUE, MANDCOL_COMMUNITY, MANDCOL_NONE, MANDCOL_REGULAR, PT_ACCESS_LIST_ENTRY_READONLY, PT_ACCESS_LIST_ENTRY_READWRITE, SUBSPACE_KEY_EVERYONETREE, SUBSPACE_KEY_GROUPTREE
 
Fields inherited from class com.plumtree.portaluiinfrastructure.expandablelist.selectptobject.SelectPTObjectModel
CREATE_NEW_COL_ASNAME, CREATE_NEW_COL_CLASSID, CREATE_NEW_COL_ICON, CREATE_NEW_COL_LABEL, CREATE_NEW_COL_MAX, CREATE_NEW_COL_MAXWITHPARAMS, CREATE_NEW_COL_PARAMS, EXPLIST_COL_CLASSID, EXPLIST_COL_OBJECTID, EXPLIST_COL_STRING, HIDE_COL_CLASSID, HIDE_COL_MAX, HIDE_COL_OBJECTID, m_arrCreateNewInfo, m_arrObjectClassIDs, m_arrReadOnlyObjects, m_bNoRowIcons, m_bTreeMultiSelect, m_imgDefaultRowIcon, m_nAccessLevel, m_nCommunityFolderID, m_nCommunityMode, m_sDisplayObjects, m_sTreeSpaceID, m_sTreeSubTitle, m_sTreeTitle, m_strObjectsToHide, m_strTreeQueryFilter, m_treeLeafType, m_xphtRowIcons, PARAM_COL_PARAMNAME, PARAM_COL_PARAMVALUE, READ_ONLY_ROW_CLASSID, READ_ONLY_ROW_OBJECTID, SUBSPACE_KEY_SELECTTREE
 
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
MultiObjectsSubscribeModel()
           
 
Method Summary
protected  void AddACLToList(int _nClassID, int _nObjectID, java.lang.String _sName)
          Helper method that adds a row to the list.
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
protected  java.lang.Object[][] CreateColumnInfos()
          Creates the array of clolumn info.
 void Finish()
          Saves the security settings into the IPTObject.
 int GetACLIndex(int _nClassID, int _nObjectID)
           
protected  int[] GetArrayOfColumns()
          Helper method to get the sort.
 int[] GetColumns()
          Returns the array of column info.
 IPTAccessList GetCurrentFolderACL()
           
 java.lang.String GetJobFolderName()
           
 int GetJobID()
           
 java.lang.String GetJobName()
           
 java.lang.String GetName()
          Returns the Class name.
 XPArrayList GetObjectArray()
          Returns the array of Objects.
 int[] GetObjectIDs()
          Returns the array of Object IDs.
 boolean HaveSubscriptionsBeenMade()
          Returns a flag to know whether any subscriptions have been made.
 boolean InitializeMultiObjsSubscribePage(XPHashtable _htFormData, IPTSession _ptSession)
          Initializes the expandable list.
protected  void InitListWithACLFromObject(IPTObject _ptObject)
          Initializes the list with the ACL from the PTObject.
protected  boolean IsMatrixRowInObjectACL(int _nClassID, int _nObjectID, int _nAccessLevel, IPTAccessList _ptACL)
          Tells whether the row identified by the class ID, the object ID and the Access Level ID in argument is in the Object ACL or no.
protected  int SaveRow(PTGrowableSortedArrayWrapper _saData, int _nRowIndex, XPHashtable _htFormData)
          Saves the access level for the row _nRowIndex.
protected  void StoreSubscriptionsToObject(IPTObject _ptObject, IPTBulkSubscriber _ptSubscriber)
          Saves the security settings into the IPTObject.
 
Methods inherited from class com.plumtree.portaluiinfrastructure.editor.commonpages.objectsecurity.ObjectSecurityModel
AddACLFromTree, AddRowsOnRepost, CanPropagateSecurity, DisplayGroupMembersTree, GetAccessLevels, GetAccessLevelString, GetColumnInfos, GetIsCardACL, GetLeftNavString, GetSelectedItems, GetShowHeaderAndLeftNav, GetSupportMandatoryColumn, HasAccessRights, HasEditAccessToGroup, HasSecurityChanged, InitAccessLevels, InitializeSecurityPage, InitListWithACLFromObject, InitReadOnlyAccessFlag, IsACLInArray, IsEveryoneGroup, SetCardACL, SetLeftNavString, SetShowHeaderAndLeftNav, SetSupportMandatoryColumn
 
Methods inherited from class com.plumtree.portaluiinfrastructure.expandablelist.selectptobject.selectptobjectsbytype.SelectPTObjectsByTypeModel
GetMainColumnSort, GetMainColumnSortDirection, InitializeSortedArray, ReverseCurrentSort, SortByColumn
 
Methods inherited from class com.plumtree.portaluiinfrastructure.expandablelist.selectptobject.SelectPTObjectModel
AddControlParamsToURL, ClearHiddenObjects, ContainsObject, CreateIndexMapping, DoTaskOnComeBackFromSubEditor, GetAccessLevel, GetCommunityFolderID, GetCommunityMode, GetCreateNewInfo, GetCreateNewURL, GetDefaultRowIcon, GetDisplayObjects, GetEditObjectURL, GetHiddenObjects, GetIndex, GetNoRowIcons, GetObjectClassIDs, GetRowIconByClassID, GetSelectedNamesAsHTML, GetTreeLeafType, GetTreeMultiSelect, GetTreeQueryFilter, GetTreeSpaceID, GetTreeSubTitle, GetTreeTitle, GetUniquePopUpName, InitializeListClassIDs, InitializeReadOnlySelectPTObject, InitializeSelectPTObject, IsEditLinkEnabled, IsObjectReadOnly, ResetTreeID, SaveTreeID, SetAccessLevel, SetCommunityFolderID, SetCommunityMode, SetDefaultObjects, SetDefaultRowIcon, SetDisplayObjects, SetEnableCreateNew, SetEnableMoveRowActions, SetHiddenObjects, SetNoRowIcons, SetReadOnlyObjects, SetRowIconByClassID, SetTreeLeafType, SetTreeMultiSelect, SetTreeQueryFilter, SetTreeSubTitle, SetTreeTitle
 
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, GetModelStorageName, GetMoveAction, GetNumObjects, GetPaginationSize, GetReadOnlyItems, GetRowIndex, GetSectionTitle, GetTableInstructions, GetUniqueInt, GetUniqueString, GetUnusedProperties, GetWrapColumnHeaders, InitializeExpandableList, InitializeReadOnlyExpandableList, IsAddButtonDisabled, IsCheckBoxesDisabled, IsPaginationEnabled, ModifyRow, MoveDown, MoveFirst, MoveLast, MoveRow, MoveUp, SaveSection, SetAddIcon, SetAddIconAlt, SetDeleteIcon, SetDeleteIconAlt, SetDelRowConfirmMsg, SetEmptyListMessages, SetEnableEmptyListClientValidation, SetIsListReadOnly, SetListKey, SetPagination, SetSectionTitle, SetTableInstructions, SetWrapColumnHeaders
 
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.portaluiinfrastructure.editor.commonpages.objectsecurity.IObjectSecurityModelRO
DisplayGroupMembersTree, GetAccessLevels, GetAccessLevelString, GetIsCardACL, GetLeftNavString, GetShowHeaderAndLeftNav, GetSupportMandatoryColumn, HasEditAccessToGroup, IsEveryoneGroup
 
Methods inherited from interface com.plumtree.portaluiinfrastructure.expandablelist.selectptobject.ISelectPTObjectModelRO
ClearHiddenObjects, GetAccessLevel, GetCommunityFolderID, GetCommunityMode, GetCreateNewInfo, GetCreateNewURL, GetDefaultRowIcon, GetDisplayObjects, GetEditObjectURL, GetHiddenObjects, GetNoRowIcons, GetObjectClassIDs, GetRowIconByClassID, GetSelectedItems, GetSelectedNamesAsHTML, GetTreeLeafType, GetTreeMultiSelect, GetTreeQueryFilter, GetTreeSpaceID, GetTreeSubTitle, GetTreeTitle, GetUniquePopUpName, IsEditLinkEnabled, IsObjectReadOnly
 
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

QS_MULTI_OBJ_SUBSCRIBE_IDS

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

See Also:
Constant Field Values

EXPLIST_COL_SUBSCRIBE

public static final int EXPLIST_COL_SUBSCRIBE
Subscribe column

See Also:
Constant Field Values

EXPLIST_COLUMN_IMG

public static final int EXPLIST_COLUMN_IMG
Object img

See Also:
Constant Field Values

m_arrObjects

protected XPArrayList m_arrObjects
Array of objects we are editing the security for.


m_arrColumns

protected int[] m_arrColumns
Array of column info.

Constructor Detail

MultiObjectsSubscribeModel

public MultiObjectsSubscribeModel()
Method Detail

AddACLToList

protected void AddACLToList(int _nClassID,
                            int _nObjectID,
                            java.lang.String _sName)
Helper method that adds a row to the list.

Overrides:
AddACLToList in class ObjectSecurityModel
Parameters:
_nClassID -
_nObjectID -
_sName -

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
Overrides:
Create in class ObjectSecurityModel
Returns:
A new instance of the managed class (i.e. return new Foo();)
See Also:
IManagedObject.Create()

Finish

public void Finish()
Saves the security settings into the IPTObject.

Overrides:
Finish in class ObjectSecurityModel

GetJobID

public int GetJobID()
Specified by:
GetJobID in interface IMultiObjectsSubscribeModelRO

GetJobName

public java.lang.String GetJobName()
Specified by:
GetJobName in interface IMultiObjectsSubscribeModelRO

GetJobFolderName

public java.lang.String GetJobFolderName()
Specified by:
GetJobFolderName in interface IMultiObjectsSubscribeModelRO

GetACLIndex

public int GetACLIndex(int _nClassID,
                       int _nObjectID)
Parameters:
_nClassID -
_nObjectID -
Returns:
int

HaveSubscriptionsBeenMade

public boolean HaveSubscriptionsBeenMade()
Returns a flag to know whether any subscriptions have been made.

Returns:
boolean

IsMatrixRowInObjectACL

protected boolean IsMatrixRowInObjectACL(int _nClassID,
                                         int _nObjectID,
                                         int _nAccessLevel,
                                         IPTAccessList _ptACL)
Tells whether the row identified by the class ID, the object ID and the Access Level ID in argument is in the Object ACL or no.

Parameters:
_nClassID -
_nObjectID -
_nAccessLevel -
_ptACL -
Returns:
boolean

GetCurrentFolderACL

public IPTAccessList GetCurrentFolderACL()
Returns:
the current IPTAccessList of the folder whose security is being edited

GetObjectIDs

public int[] GetObjectIDs()
Returns the array of Object IDs.

Returns:
int[]

GetColumns

public int[] GetColumns()
Returns the array of column info.

Specified by:
GetColumns in interface IMultiObjectsSubscribeModelRO
Returns:
int[]
See Also:
MultiObjectsSecurityModel.GetColumns()

GetName

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

Specified by:
GetName in interface IMVCObject
Overrides:
GetName in class ObjectSecurityModel
Returns:
String

GetObjectArray

public XPArrayList GetObjectArray()
Returns the array of Objects.

Specified by:
GetObjectArray in interface IMultiObjectsSubscribeModelRO
Returns:
XPArrayList
See Also:
MultiObjectsSecurityModel.GetObjectArray()

InitializeMultiObjsSubscribePage

public boolean InitializeMultiObjsSubscribePage(XPHashtable _htFormData,
                                                IPTSession _ptSession)
Initializes the expandable list.

Parameters:
_ptObject - Object being created or edited
_ptSession - User session
Returns:
boolean Flag to know if the initialization was successful or no.

CreateColumnInfos

protected java.lang.Object[][] CreateColumnInfos()
Creates the array of clolumn info.

Returns:
Object[][]

GetArrayOfColumns

protected int[] GetArrayOfColumns()
Helper method to get the sort.

Overrides:
GetArrayOfColumns in class ObjectSecurityModel
Returns:
int[]

InitListWithACLFromObject

protected void InitListWithACLFromObject(IPTObject _ptObject)
Initializes the list with the ACL from the PTObject.

Parameters:
_ptObject - Object being created or edited

SaveRow

protected int SaveRow(PTGrowableSortedArrayWrapper _saData,
                      int _nRowIndex,
                      XPHashtable _htFormData)
Saves the access level for the row _nRowIndex.

Overrides:
SaveRow in class ObjectSecurityModel
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.

StoreSubscriptionsToObject

protected void StoreSubscriptionsToObject(IPTObject _ptObject,
                                          IPTBulkSubscriber _ptSubscriber)
Saves the security settings into the IPTObject.




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