com.bea.security.entitlements.admin.rbac
Class PermissionSetNode

java.lang.Object
  extended byorg.apache.myfaces.custom.tree2.TreeNodeBase
      extended bycom.bea.security.entitlements.admin.rbac.TreeNodeWithSelection
          extended bycom.bea.security.entitlements.admin.rbac.BaseTreeNode
              extended bycom.bea.security.entitlements.admin.rbac.AttributableEntitlementNode
                  extended bycom.bea.security.entitlements.admin.rbac.RolePermissionSetNode
                      extended bycom.bea.security.entitlements.admin.rbac.PermissionSetNode
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable, org.apache.myfaces.custom.tree2.TreeNode

public class PermissionSetNode
extends RolePermissionSetNode

The Permission set node will wrap the RBAC API Permission Sets The TreeNodeWithSelection code is used to designate which permission sets are associated with a role. The selected code is used for the checkboxes in addPerm2Role.jsp

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.bea.security.entitlements.admin.rbac.BaseTreeNode
IDENTITY_DIRECTORY_NODE, IDENTITY_NODE, NAVIGATION_NODE, PERMISSION_NODE, PERMISSION_SET_NODE, REPORTING_NODE, RESOURCE_NODE, ROLE_NODE, SOD_NODE
 
Constructor Summary
PermissionSetNode()
          Default unnamed permission set node, uses a type "pset"
PermissionSetNode(PermissionSetNode parentNode, com.bea.ales.rbac.RBAC_PermissionSet pset, boolean isLeaf)
          Constructor to create a new PermissionSetNode
PermissionSetNode(com.bea.ales.rbac.RBAC_PermissionSet pset, boolean isLeaf)
          Constructor to create a new PermissionSetNode
PermissionSetNode(java.lang.String name, boolean isLeaf)
          Constructor to create a new PermissionSetNode
 
Method Summary
 java.lang.String addPermissions()
           
 java.lang.String addPermissionsToDB()
          This persists the permissions to the backend database
 java.lang.String finishedModifyAttribute()
          When finished modifying a rule, make sure that if it was a new rule we re-set our state back to false so that on cancel, we don't accidentally delete an existing rule.
 java.util.List getAllRbacPermissions()
          Get All RBAC Permission objects associated to this node
 java.util.List getAttributes()
          Get all (QueryType.ALL) attributes for this node
 java.util.List getChildren()
          Get children permission set nodes
 java.util.List getCurrentAvailablePermissions()
          Get all available permissions for this node
 java.util.List getCurrentIndividualPermissions()
          Get just the individual permissions for this node
 java.util.List getDirectAttributes()
          Get Direct Atttributes for this PermissionSet node
 java.util.List getDirectRbacPermissions()
          Accessor method to get direct permissions for this node
 java.lang.String getFullName()
          Node full name
 java.util.List getIndividualPermissions()
          Get just the individual permissions for this node
 java.util.List getInheritedPermissions()
          Get all inherited pemissions for this node
 TreeNodeWithSelection getNodeByName(java.lang.String name)
          Given a name, return instance of PermissionsetNode
 java.lang.String getNodeType()
          Return permission set node type constant
 int getPermFromIdx()
          Index of the permission in the From box
 java.lang.String getPermissionFilter()
          Filter set to view permissions
 java.util.List getPermissions()
          Retrieve all SelectItem for the current permission set node
 int getPermToIdx()
          Index of the permission in the To box
 int getPermTotal()
          Get a total of permissions for node
 com.bea.ales.rbac.RBAC_PermissionSet getRbacPermissionSet()
          Access the RBAC permission set representing this node
 java.util.List getSelectedNewPermissions()
           
 java.util.List getSelectedPermissions()
          Retrieve currently selected Permissions
 java.lang.String removeCurrentAttribute()
          Remove the currently selected rule from the list
 java.lang.String removePermissions()
          Remove permissions method.
 java.lang.String restorePermissionsInDB()
          Roll back all changes if cancel button is clicked
 void setFullName(java.lang.String fullName)
          Set full name
 void setPermissionFilter(java.lang.String filter)
          Reset currently set filter to display permissions
 void setSelectedNewPermissions(java.util.List selectedNewPermissions)
           
 void setSelectedPermissions(java.util.List selectedIndPermissions)
          Set a new set of selected permissions
 
Methods inherited from class com.bea.security.entitlements.admin.rbac.RolePermissionSetNode
decreasePermissionIndex, increasePermissionIndex
 
Methods inherited from class com.bea.security.entitlements.admin.rbac.AttributableEntitlementNode
cancelModifyAttribute, getCurrentAttribute, isNewAttribute, newAttributeAction, removeCurrentAttributeFromList, setAttributes, setAttrIdx, setCurrentAttribute, setNewAttribute
 
Methods inherited from class com.bea.security.entitlements.admin.rbac.TreeNodeWithSelection
compareTo, getParent, isSelected, removeNode, setChildrenSelectedRecursively, setNeedUpdateChildren, setParent, setSelected
 
Methods inherited from class org.apache.myfaces.custom.tree2.TreeNodeBase
getChildCount, getDescription, getIdentifier, getType, isLeaf, setDescription, setIdentifier, setLeaf, setType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PermissionSetNode

public PermissionSetNode()
Default unnamed permission set node, uses a type "pset"


PermissionSetNode

public PermissionSetNode(PermissionSetNode parentNode,
                         com.bea.ales.rbac.RBAC_PermissionSet pset,
                         boolean isLeaf)
Constructor to create a new PermissionSetNode

Parameters:
pset - parent permission set node to set for this node
isLeaf - true if leaf, false otherwise

PermissionSetNode

public PermissionSetNode(com.bea.ales.rbac.RBAC_PermissionSet pset,
                         boolean isLeaf)
Constructor to create a new PermissionSetNode

Parameters:
pset - RBAC permission set to use
isLeaf - true if leaf, false otherwise

PermissionSetNode

public PermissionSetNode(java.lang.String name,
                         boolean isLeaf)
Constructor to create a new PermissionSetNode

Parameters:
name - Name of the PermissionSet to create
isLeaf - true if leaf, false otherwise
Method Detail

addPermissions

public java.lang.String addPermissions()
Specified by:
addPermissions in class RolePermissionSetNode

addPermissionsToDB

public java.lang.String addPermissionsToDB()
This persists the permissions to the backend database

Returns:
null mostly

finishedModifyAttribute

public java.lang.String finishedModifyAttribute()
When finished modifying a rule, make sure that if it was a new rule we re-set our state back to false so that on cancel, we don't accidentally delete an existing rule.

Returns:
null mostly

getAllRbacPermissions

public java.util.List getAllRbacPermissions()
Get All RBAC Permission objects associated to this node

Specified by:
getAllRbacPermissions in class RolePermissionSetNode
Returns:
ArrayList of RBAC_Permission objects

getAttributes

public java.util.List getAttributes()
Get all (QueryType.ALL) attributes for this node

Returns:
Array list of AttributeElements

getChildren

public java.util.List getChildren()
Get children permission set nodes

Returns:
a list of PermissionSetNodes if any

getCurrentAvailablePermissions

public java.util.List getCurrentAvailablePermissions()
Get all available permissions for this node

Specified by:
getCurrentAvailablePermissions in class RolePermissionSetNode
Returns:
Array list of available RBAC_Permission objects

getCurrentIndividualPermissions

public java.util.List getCurrentIndividualPermissions()
Get just the individual permissions for this node

Specified by:
getCurrentIndividualPermissions in class RolePermissionSetNode
Returns:
array list of SelectItem objects

getDirectAttributes

public java.util.List getDirectAttributes()
Get Direct Atttributes for this PermissionSet node

Specified by:
getDirectAttributes in class RolePermissionSetNode
Returns:
List of AttributeElements for this node

getDirectRbacPermissions

public java.util.List getDirectRbacPermissions()
Accessor method to get direct permissions for this node

Specified by:
getDirectRbacPermissions in class RolePermissionSetNode
Returns:
array list of RBAC_Permission objects

getFullName

public java.lang.String getFullName()
Node full name

Returns:
full name

getIndividualPermissions

public java.util.List getIndividualPermissions()
Get just the individual permissions for this node

Specified by:
getIndividualPermissions in class RolePermissionSetNode
Returns:
array list of RBAC_Permission objects

getInheritedPermissions

public java.util.List getInheritedPermissions()
Get all inherited pemissions for this node

Specified by:
getInheritedPermissions in class RolePermissionSetNode
Returns:
array list of RBAC_Permission objects

getNodeByName

public TreeNodeWithSelection getNodeByName(java.lang.String name)
Given a name, return instance of PermissionsetNode

Overrides:
getNodeByName in class TreeNodeWithSelection
Parameters:
name - name of the node
Returns:
instance of PermissionSetNode

getNodeType

public java.lang.String getNodeType()
Return permission set node type constant

Specified by:
getNodeType in class BaseTreeNode
Returns:
returns BaseTreeNode.PERMISSION_NODE for permission node

getPermFromIdx

public int getPermFromIdx()
Index of the permission in the From box

Returns:
index

getPermissionFilter

public java.lang.String getPermissionFilter()
Filter set to view permissions

Returns:
filter currently set

getPermissions

public java.util.List getPermissions()
Retrieve all SelectItem for the current permission set node

Returns:
Array List of SelectItems

getPermToIdx

public int getPermToIdx()
Index of the permission in the To box

Returns:
index

getPermTotal

public int getPermTotal()
Get a total of permissions for node

Returns:
total permissions

getRbacPermissionSet

public com.bea.ales.rbac.RBAC_PermissionSet getRbacPermissionSet()
Access the RBAC permission set representing this node

Returns:
RBAC_PermissionSet object

getSelectedNewPermissions

public java.util.List getSelectedNewPermissions()
Returns:
Returns the selectedNewPermissions.

getSelectedPermissions

public java.util.List getSelectedPermissions()
Retrieve currently selected Permissions

Returns:

removeCurrentAttribute

public java.lang.String removeCurrentAttribute()
Remove the currently selected rule from the list

Returns:
mostly null

removePermissions

public java.lang.String removePermissions()
Description copied from class: RolePermissionSetNode
Remove permissions method. Called by the add permissions popup. For each selected permission remove it to the current role.

Specified by:
removePermissions in class RolePermissionSetNode
Returns:
null mostly

restorePermissionsInDB

public java.lang.String restorePermissionsInDB()
Roll back all changes if cancel button is clicked

Returns:
null mostly

setFullName

public void setFullName(java.lang.String fullName)
Set full name

Parameters:
fullName - to set

setPermissionFilter

public void setPermissionFilter(java.lang.String filter)
Reset currently set filter to display permissions

Parameters:
filter - new filter value to set

setSelectedNewPermissions

public void setSelectedNewPermissions(java.util.List selectedNewPermissions)
Parameters:
selectedNewPermissions - The selectedNewPermissions to set.

setSelectedPermissions

public void setSelectedPermissions(java.util.List selectedIndPermissions)
Set a new set of selected permissions

Parameters:
selectedIndPermissions -


Copyright © 2007 BEA Systems Inc. All Rights Reserved.