|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.uiinfrastructure.editor.EditorHelperModel com.plumtree.uiinfrastructure.expandablelist.ExpListModel com.plumtree.portaluiinfrastructure.expandablelist.selectptobject.SelectPTObjectModel com.plumtree.portaluiinfrastructure.expandablelist.selectptobject.selectptobjectsbytype.SelectPTObjectsByTypeModel com.plumtree.portaluiinfrastructure.editor.commonpages.objectsecurity.ObjectSecurityModel
public class ObjectSecurityModel
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.
Field Summary | |
---|---|
static int |
EXPLIST_COL_ACCESSLEVEL_ID
This column is used to store the access level ID of each row. |
static int |
EXPLIST_COL_ACCESSLEVEL_STRING
This column is used to store the access level String of each row. |
static int |
EXPLIST_COL_GROUPTREEASID
On each group on the list there is a link to get the tree of groups in the users in that group. |
static int |
EXPLIST_COL_MANDATORY
If the Object being created or edited is mandatory for this user or group. |
static int |
EXPLIST_COL_MAX
Number total of columns |
static int |
EXPLIST_COL_ROWACCESS
If the row is read only, we won't deisplay the checkbox to delete it. |
static int |
EXPLIST_DEFAULT_INITIAL_SIZE
Default initial size for the sorted array. |
protected int[] |
m_arrAccessLevels
Array of supported Access Levels (constants from PT_ACCESS_LEVELS). |
protected XPArrayList |
m_arrLowAccessObjects
Special case for ACLs that the current user doesn't have at least select access to. |
protected XPArrayList |
m_arrNoContentTree
You can click on a group only if the current user has at least read access to it. |
protected boolean |
m_bCardACL
Special case for Crawler Editor where it's possible to Edit the imported cards ACL. |
protected boolean |
m_bShowHeaderAndLeftNav
We don't want to display the header and the left navigation in create mode when the Security table is displayed in the save object pop-up. |
protected int |
m_nSupportMandatoryColumn
Flag to know if we should display the mandatory column for this Object. |
protected IPTObject |
m_ptObject
Object being created or edited. |
protected IPTSession |
m_ptSession
Current User Session |
protected java.lang.String |
m_sLeftNavString
String to display on the left navigation menu. |
static int |
MANDATORY_FALSE
Mandatory column value: the Object is NOT mandatory for this user of group |
static int |
MANDATORY_TRUE
Mandatory column value: the Object is mandatory for this user of group |
static int |
MANDCOL_COMMUNITY
Value for m_nSupportMandatoryColumn: community |
static int |
MANDCOL_NONE
Value for m_nSupportMandatoryColumn: none |
static int |
MANDCOL_REGULAR
Value for m_nSupportMandatoryColumn: regular |
static boolean |
PT_ACCESS_LIST_ENTRY_READONLY
Read only flag value for the EXPLIST_COL_ROWACCESS column. |
static boolean |
PT_ACCESS_LIST_ENTRY_READWRITE
Read/Write flag value for the EXPLIST_COL_ROWACCESS column. |
static java.lang.String |
STR_MVC_CLASS_NAME
Class name for the activity space |
static java.lang.String |
SUBSPACE_KEY_EVERYONETREE
Key name used by the Activity Space to store the read-only everyone tree. |
static java.lang.String |
SUBSPACE_KEY_GROUPTREE
Key name used by the Activity Space to store the read-only groups in groups tree. |
Fields inherited from class com.plumtree.uiinfrastructure.editor.EditorHelperModel |
---|
m_asOwner |
Constructor Summary | |
---|---|
ObjectSecurityModel()
|
Method Summary | |
---|---|
void |
AddACLFromTree(XPHashtable _htFormData)
This method adds the group and users selected in the tree to the list. |
protected void |
AddACLToList(int _nClassID,
int _nObjectID,
java.lang.String _sName)
Helper method that adds a row to the list. |
void |
AddRowsOnRepost(XPHashtable _htFormData)
Calls the right AddRow method based on the Object type. |
boolean |
CanPropagateSecurity()
|
java.lang.Object |
Create()
This method is used by the ASManager to return new instances of managed objects. |
boolean |
DisplayGroupMembersTree(int _nGroupID)
Returns true if this group should have a link to view its members. |
void |
Finish()
Saves the security settings into the IPTObject. |
int[] |
GetAccessLevels()
Returns the array of supported Access Levels. |
java.lang.String |
GetAccessLevelString(int _nAccessLevelID)
Returns the String associated with the Access Level ID in argument. |
protected int[] |
GetArrayOfColumns()
Helper method to get the sort. |
protected java.lang.Object[][] |
GetColumnInfos()
Helper method to get the array of column info. |
boolean |
GetIsCardACL()
Returns the value of m_bCardACL. |
java.lang.String |
GetLeftNavString()
Returns the String to display on the left navigation menu. |
java.lang.String |
GetName()
Returns the Class name. |
java.lang.String |
GetSelectedItems()
Returns a String of Class IDs and Object IDs of the Objects to select in the tree. |
boolean |
GetShowHeaderAndLeftNav()
Tells whether or not the DP should display the header and the left navigation. |
int |
GetSupportMandatoryColumn()
Returns the value of m_nSupportMandatoryColumn. |
protected boolean |
HasAccessRights(IPTSession _ptSession,
int _nClassID,
int _nObjectID,
int _nAccessLevel)
Helper method to know whether or not the current user has at least select access to the object in argument. |
boolean |
HasEditAccessToGroup(int _nGroupID)
Helper function that returns true if the current user has edit access on the group identified by the ID in argument. |
boolean |
HasSecurityChanged()
Returns a flag to know whether the security has changed compared to what we have in the DB or no. |
protected void |
InitAccessLevels()
Inits the array of supported Access Levels. |
void |
InitializeSecurityPage(IPTObject _ptObject,
IPTSession _ptSession)
Initializes the expandable list. |
protected void |
InitListWithACLFromObject(IPTObject _ptObject,
IPTSession _ptSession)
Initializes the list with the ACL from the PTObject. |
protected void |
InitReadOnlyAccessFlag(IPTSession _ptSession)
Initializes the m_bIsReadOnly flag to know if the user can edit the page or not. |
boolean |
IsACLInArray(int _nClassID,
int _nObjectID,
int _nAccessLevel)
Tells whether the Object ACL identified by the class ID, the object ID and the Access Level ID in argument is in the list or no. |
boolean |
IsEveryoneGroup(int _nRowIndex)
Returns true if the object on the row in argument corresponds to the Everyone Group. |
protected int |
SaveRow(PTGrowableSortedArrayWrapper _saData,
int _nRowIndex,
XPHashtable _htFormData)
Saves the access level for the row _nRowIndex. |
void |
SetCardACL(boolean _bCardACL)
Special case for Crawler Editor where it's possible to Edit the ACL for cards imported by this crawler. |
void |
SetLeftNavString(java.lang.String _sLeftNavString)
Sets the String to display on the left navigation menu. |
void |
SetShowHeaderAndLeftNav(boolean _bShowHeaderAndLeftNav)
Changes the value of the flag m_bShowHeaderAndLeftNav that decides if the DP should display the header and the left navigation. |
void |
SetSupportMandatoryColumn(int _nSupportMandatoryColumn)
Sets a new value for m_nSupportMandatoryColumn. |
Methods inherited from class com.plumtree.portaluiinfrastructure.expandablelist.selectptobject.selectptobjectsbytype.SelectPTObjectsByTypeModel |
---|
GetMainColumnSort, GetMainColumnSortDirection, InitializeSortedArray, ReverseCurrentSort, 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.portaluiinfrastructure.expandablelist.selectptobject.ISelectPTObjectModelRO |
---|
ClearHiddenObjects, GetAccessLevel, GetCommunityFolderID, GetCommunityMode, GetCreateNewInfo, GetCreateNewURL, GetDefaultRowIcon, GetDisplayObjects, GetEditObjectURL, GetHiddenObjects, GetNoRowIcons, GetObjectClassIDs, GetRowIconByClassID, 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 |
---|
public static final java.lang.String STR_MVC_CLASS_NAME
public static final java.lang.String SUBSPACE_KEY_GROUPTREE
public static final java.lang.String SUBSPACE_KEY_EVERYONETREE
public static final int EXPLIST_COL_MAX
public static final int EXPLIST_COL_ACCESSLEVEL_ID
public static final int EXPLIST_COL_ACCESSLEVEL_STRING
public static final int EXPLIST_COL_ROWACCESS
public static final int EXPLIST_COL_MANDATORY
public static final int EXPLIST_COL_GROUPTREEASID
public static final int MANDATORY_TRUE
public static final int MANDATORY_FALSE
public static final int EXPLIST_DEFAULT_INITIAL_SIZE
public static final int MANDCOL_NONE
public static final int MANDCOL_REGULAR
public static final int MANDCOL_COMMUNITY
public static final boolean PT_ACCESS_LIST_ENTRY_READONLY
public static final boolean PT_ACCESS_LIST_ENTRY_READWRITE
protected IPTObject m_ptObject
protected IPTSession m_ptSession
protected java.lang.String m_sLeftNavString
protected int[] m_arrAccessLevels
protected boolean m_bCardACL
protected XPArrayList m_arrLowAccessObjects
protected XPArrayList m_arrNoContentTree
protected boolean m_bShowHeaderAndLeftNav
protected int m_nSupportMandatoryColumn
Constructor Detail |
---|
public ObjectSecurityModel()
Method Detail |
---|
public void AddACLFromTree(XPHashtable _htFormData)
_htFormData
- Form dataprotected void AddACLToList(int _nClassID, int _nObjectID, java.lang.String _sName)
_nClassID
- _nObjectID
- _sName
- public void AddRowsOnRepost(XPHashtable _htFormData)
AddRowsOnRepost
in class SelectPTObjectModel
_htFormData
- Form datapublic java.lang.Object Create()
EditorHelperModel
Create
in interface IManagedObject
Create
in class SelectPTObjectsByTypeModel
IManagedObject.Create()
public void Finish()
public java.lang.String GetAccessLevelString(int _nAccessLevelID)
GetAccessLevelString
in interface IObjectSecurityModelRO
_nAccessLevelID
-
com.plumtree.portaluiinfrastructure.editor.commonpages.objectsecurity.ObjectSecurityModel#GetAccessLevelString()
public int[] GetAccessLevels()
GetAccessLevels
in interface IObjectSecurityModelRO
GetAccessLevels()
public java.lang.String GetLeftNavString()
GetLeftNavString
in interface IObjectSecurityModelRO
GetLeftNavString()
public java.lang.String GetName()
GetName
in interface IMVCObject
GetName
in class SelectPTObjectsByTypeModel
public boolean GetShowHeaderAndLeftNav()
GetShowHeaderAndLeftNav
in interface IObjectSecurityModelRO
GetShowHeaderAndLeftNav()
public int GetSupportMandatoryColumn()
GetSupportMandatoryColumn
in interface IObjectSecurityModelRO
GetSupportMandatoryColumn()
public java.lang.String GetSelectedItems()
GetSelectedItems
in interface ISelectPTObjectModelRO
GetSelectedItems
in class SelectPTObjectModel
SelectPTObjectModel.GetSelectedItems()
public boolean HasEditAccessToGroup(int _nGroupID)
HasEditAccessToGroup
in interface IObjectSecurityModelRO
_nGroupID
-
com.plumtree.portaluiinfrastructure.editor.commonpages.objectsecurity.ObjectSecurityModel#HasEditAccessToGroup()
public boolean HasSecurityChanged()
public boolean CanPropagateSecurity()
public void InitializeSecurityPage(IPTObject _ptObject, IPTSession _ptSession)
_ptObject
- Object being created or edited_ptSession
- User sessionpublic boolean IsACLInArray(int _nClassID, int _nObjectID, int _nAccessLevel)
_nClassID
- _nObjectID
- _nAccessLevel
-
public boolean DisplayGroupMembersTree(int _nGroupID)
DisplayGroupMembersTree
in interface IObjectSecurityModelRO
_nGroupID
-
com.plumtree.portaluiinfrastructure.editor.commonpages.objectsecurity.ObjectSecurityModel#DisplayGroupMembersTree()
public void SetCardACL(boolean _bCardACL)
_bCardACL
- public boolean GetIsCardACL()
GetIsCardACL
in interface IObjectSecurityModelRO
GetIsCardACL()
public void SetLeftNavString(java.lang.String _sLeftNavString)
_sLeftNavString
- public void SetShowHeaderAndLeftNav(boolean _bShowHeaderAndLeftNav)
_bShowHeaderAndLeftNav
- public void SetSupportMandatoryColumn(int _nSupportMandatoryColumn)
_nSupportMandatoryColumn
- protected int[] GetArrayOfColumns()
GetArrayOfColumns
in class SelectPTObjectsByTypeModel
protected java.lang.Object[][] GetColumnInfos()
protected void InitAccessLevels()
protected void InitListWithACLFromObject(IPTObject _ptObject, IPTSession _ptSession)
_ptObject
- Object being created or editedprotected boolean HasAccessRights(IPTSession _ptSession, int _nClassID, int _nObjectID, int _nAccessLevel)
_ptSession
- _nClassID
- _nObjectID
- _nAccessLevel
-
protected void InitReadOnlyAccessFlag(IPTSession _ptSession)
_ptSession
- User sessionpublic boolean IsEveryoneGroup(int _nRowIndex)
IsEveryoneGroup
in interface IObjectSecurityModelRO
_nRowIndex
-
com.plumtree.portaluiinfrastructure.editor.commonpages.objectsecurity.ObjectSecurityModel#IsEveryoneGroup()
protected int SaveRow(PTGrowableSortedArrayWrapper _saData, int _nRowIndex, XPHashtable _htFormData)
SaveRow
in class SelectPTObjectModel
_saData
- List to update the data on row _nRowIndex_nRowIndex
- Index of the row to save._htFormData
- Data posted by the form.
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |