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

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.PermissionNode
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable, org.apache.myfaces.custom.tree2.TreeNode

public class PermissionNode
extends AttributableEntitlementNode

Permission represents a right to perform an operation on an object. Node represents an RBAC_Permission object.

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
PermissionNode(java.lang.String name, boolean isLeaf)
          Constructor to create a new PermissionNode
 
Method Summary
 java.lang.String cancelModifyAttribute()
          When canceling the modification of the attribute of permission, If the new rule is canceled, make sure we delete the rule.
 java.lang.String cancelModifyPermission()
          When canceling the modification of a permission, If the new rule is canceled, make sure we delete the rule.
 java.lang.String filterPermissions()
          Filter permissions
 java.lang.String finishedModifyAttribute()
          When finished modifying a permission attribute, make sure that if it was a new attribute we re-set our state back to false so that on cancel, we don't accidentally delete an existing rule.
 java.lang.String finishedModifyPermission()
          When finished modifying a permission, 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 getAllPermissions(java.lang.String filter)
          Get all permissions for this node, for a given filter
 javax.faces.component.UIData getAttributeData()
          Get Attribute Data associate for this node
 java.util.List getAttributes()
          Return a list Attributes associated to this node
 int getAttrIdx()
          Get Attribute id
 int getAttrUIIdx()
          Get row index for the attribute in this node
 AttributeElement getCurrentAttribute()
          Get Current attribute for this node
 PermissionElement getCurrentPermission()
          Get current selected permission for this node
 TreeNodeWithSelection getNodeByName(java.lang.String name)
          Retrieve node with a given name
 java.lang.String getNodeType()
          Return permission node type constant
 PermissionElement getPermByName(java.lang.String name)
          Retrieve permission element for a given name
 java.lang.String getPermissionFilter()
          Return permission filter for this node
 int getPermissionIdx()
          Get permission nodes row index
 java.util.List getPermissions()
          Get a list of permissions for this node, for already set filter
 org.apache.myfaces.custom.tree2.TreeModel getResourceTreeModel()
          Get model associate to this TreeModel
 boolean isDisableModifyPermissionOK()
          Disable/Enable Modify permission OK button in modify permisions page
 boolean isNewPerm()
          Is this a new permission node
 java.lang.String newAttributeAction()
          Create a new permission to be edited in the UI.
 java.lang.String newPermAction()
          Create a new permission to be edited in the UI.
 java.lang.String processAttrRowSelection()
          Set the selected attribute from the attribute table
 void processResourceSelect(javax.faces.event.ActionEvent event)
          This event listener fires when a node is selected on the permission set tree.
 java.lang.String removeCurrentAttribute()
          Removes currently selected Attribute from permission.
 void removeCurrentAttributeFromList()
          Remove the currently selected Attribute from the list
 java.lang.String removeCurrentPermission()
           
 java.lang.String removeCurrentPermissionFromList()
          Remove permission from this node
 void setAttributeData(javax.faces.component.UIData attributeData)
          Set a new data model for this node
 void setAttributes(java.util.List attributes)
          Set a new set of attributes for this node
 void setAttrIdx(int attrIdx)
          set row index for this attribute
 void setCurrentAttribute(AttributeElement currentAttribute)
          Set current attribute to set for this node
 void setCurrentPermission(PermissionElement currentPermission)
          Set a new Permission for this node
 void setNewPerm(boolean newPerm)
          Set this permission node to say its new
 void setPermissionFilter(java.lang.String filter)
          Set filter for this new permission node
 void setPermissionIdx(int permissionIdx)
          Set a new permission node row index
 void setPermissions(java.util.List permissions)
          Set a new set of permissions to this node
 
Methods inherited from class com.bea.security.entitlements.admin.rbac.AttributableEntitlementNode
isNewAttribute, 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, getChildren, 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

PermissionNode

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

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

cancelModifyAttribute

public java.lang.String cancelModifyAttribute()
When canceling the modification of the attribute of permission, If the new rule is canceled, make sure we delete the rule.

Overrides:
cancelModifyAttribute in class AttributableEntitlementNode
Returns:
null mostly, exception otherwise

cancelModifyPermission

public java.lang.String cancelModifyPermission()
When canceling the modification of a permission, If the new rule is canceled, make sure we delete the rule.

Returns:
null mostly, exception otherwise

filterPermissions

public java.lang.String filterPermissions()
Filter permissions

Returns:
null mostly, exception otherwise

finishedModifyAttribute

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

Returns:
null mostly, exception otherwise

finishedModifyPermission

public java.lang.String finishedModifyPermission()
When finished modifying a permission, 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, exception otherwise

getAllPermissions

public java.util.List getAllPermissions(java.lang.String filter)
Get all permissions for this node, for a given filter

Parameters:
filter - to narrow the permission results
Returns:
List of PermissionElement objects

getAttributeData

public javax.faces.component.UIData getAttributeData()
Get Attribute Data associate for this node

Returns:
UIData - data representing this node

getAttributes

public java.util.List getAttributes()
Return a list Attributes associated to this node

Returns:
selected set of attributes for this node

getAttrIdx

public int getAttrIdx()
Get Attribute id

Returns:

getAttrUIIdx

public int getAttrUIIdx()
Get row index for the attribute in this node

Returns:
row index for attribute

getCurrentAttribute

public AttributeElement getCurrentAttribute()
Get Current attribute for this node

Overrides:
getCurrentAttribute in class AttributableEntitlementNode
Returns:
AttributeElement for current attribute

getCurrentPermission

public PermissionElement getCurrentPermission()
Get current selected permission for this node

Returns:
selected permission

getNodeByName

public TreeNodeWithSelection getNodeByName(java.lang.String name)
Retrieve node with a given name

Overrides:
getNodeByName in class TreeNodeWithSelection
Parameters:
name - Name to recurse
Returns:
a TreeNodeWithSelection object for a given name

getNodeType

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

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

getPermByName

public PermissionElement getPermByName(java.lang.String name)
Retrieve permission element for a given name

Returns:
name Name of the Permission to get

getPermissionFilter

public java.lang.String getPermissionFilter()
Return permission filter for this node

Returns:

getPermissionIdx

public int getPermissionIdx()
Get permission nodes row index

Returns:
row index of this permission node

getPermissions

public java.util.List getPermissions()
Get a list of permissions for this node, for already set filter

Returns:
ArrayList of PermissionElements objects

getResourceTreeModel

public org.apache.myfaces.custom.tree2.TreeModel getResourceTreeModel()
Get model associate to this TreeModel

Returns:
tree model to set for this node

isDisableModifyPermissionOK

public boolean isDisableModifyPermissionOK()
Disable/Enable Modify permission OK button in modify permisions page

Returns:
true to disable, false otherwise

isNewPerm

public boolean isNewPerm()
Is this a new permission node

Returns:
true if new, false otherwise

newAttributeAction

public java.lang.String newAttributeAction()
Create a new permission to be edited in the UI.

Overrides:
newAttributeAction in class AttributableEntitlementNode
Returns:
"Success" Once created the success return value causes the popup to be forwarded to the modifymemberrule.jsp page which will be pointing to the newly created rule.

newPermAction

public java.lang.String newPermAction()
Create a new permission to be edited in the UI.

Returns:
"Success" Once created the success return value causes the popup to be forwarded to the modifymemberrule.jsp page which will be pointing to the newly created rule.

processAttrRowSelection

public java.lang.String processAttrRowSelection()
Set the selected attribute from the attribute table

Returns:
null mostly, exception otherwise

processResourceSelect

public void processResourceSelect(javax.faces.event.ActionEvent event)
                           throws javax.faces.event.AbortProcessingException
This event listener fires when a node is selected on the permission set tree. It will cause all the data associated with the node selected to be represented by the GUI

Parameters:
event - ActionEvent on select
Throws:
javax.faces.event.AbortProcessingException

removeCurrentAttribute

public java.lang.String removeCurrentAttribute()
Removes currently selected Attribute from permission. This call, starts a transaction if not started and calls remove attribute from permission.

Returns:
null mostly, exception otherwise

removeCurrentAttributeFromList

public void removeCurrentAttributeFromList()
Remove the currently selected Attribute from the list

Overrides:
removeCurrentAttributeFromList in class AttributableEntitlementNode
Returns:
null mostly, exception otherwise

removeCurrentPermission

public java.lang.String removeCurrentPermission()

removeCurrentPermissionFromList

public java.lang.String removeCurrentPermissionFromList()
Remove permission from this node

Returns:
null mostly, exception otherwise

setAttributeData

public void setAttributeData(javax.faces.component.UIData attributeData)
Set a new data model for this node

Parameters:
attributeData - new UIData model to set

setAttributes

public void setAttributes(java.util.List attributes)
Set a new set of attributes for this node

Overrides:
setAttributes in class AttributableEntitlementNode
Parameters:
attributes -

setAttrIdx

public void setAttrIdx(int attrIdx)
set row index for this attribute

Overrides:
setAttrIdx in class AttributableEntitlementNode
Parameters:
attrIdx - attribute row index to set for this node

setCurrentAttribute

public void setCurrentAttribute(AttributeElement currentAttribute)
Set current attribute to set for this node

Overrides:
setCurrentAttribute in class AttributableEntitlementNode
Parameters:
currentAttribute - AttributeElement to set

setCurrentPermission

public void setCurrentPermission(PermissionElement currentPermission)
Set a new Permission for this node

Parameters:
currentPermission - new permission to set

setNewPerm

public void setNewPerm(boolean newPerm)
Set this permission node to say its new

Parameters:
newPerm - true if new, false otherwise

setPermissionFilter

public void setPermissionFilter(java.lang.String filter)
Set filter for this new permission node

Parameters:
filter -

setPermissionIdx

public void setPermissionIdx(int permissionIdx)
Set a new permission node row index

Parameters:
permissionIdx -

setPermissions

public void setPermissions(java.util.List permissions)
Set a new set of permissions to this node

Parameters:
permissions - List of PermissionElement objects


Copyright © 2007 BEA Systems Inc. All Rights Reserved.