public interface PermissionNode
Modifier and Type | Method and Description |
---|---|
void |
addDependencies(Permission permission,
Permission... dependencies)
Attach to the given
Permission instance a set of permissions which depends on it so that if the
permission is denied then all its dependencies must be denied as well. |
void |
addPermission(Permission permission,
String name)
Add a permission instance to the list
|
void |
addPermission(Permission permission,
String grantName,
String denyName)
Add a permission instance to the list
|
void |
collapse()
Collapse the node
|
void |
expand(LoadCallback consumer)
Expand the node.
|
List<Permission> |
getDependencies(Permission permission)
Get the dependencies (if any) attached to a given permission instance.
|
int |
getLevel()
A number indicating at what specific levels this node is placed within the
PermissionTree |
String |
getNodeFullName()
Retrieves the full name to display for the given node.
|
String |
getNodeName()
Retrieves the name to display for the given node.
|
PermissionNode |
getParentNode()
Get the parent node.
|
String |
getPermissionDenyName(Permission permission)
Retrieves the name to display for the deny action.
|
String |
getPermissionGrantName(Permission permission)
Retrieves the name to display for the grant action.
|
List<Permission> |
getPermissionList()
The list of permissions attached to this node.
|
PermissionTree |
getPermissionTree()
Get the
PermissionTree instance this root node has been attached to. |
PermissionTreeProvider |
getPermissionTreeProvider()
Get the provider instance that built this node instance.
|
int |
getPositionInTree()
The position of the node within the permission tree.
|
Object |
getProperty(String key)
Get a property attached to this node
|
List<Permission> |
impliesName(PermissionNode node)
Retrieve the permissions of the specified node that are implied by this node's permissions.
|
boolean |
isExpanded()
Get the expand status
|
boolean |
propertyEquals(String key,
Object value)
Check if a property exists and matchs the given value
|
void |
setParentNode(PermissionNode parentNode)
Set this node's parent
|
void |
setPermissionTree(PermissionTree tree)
Attach this root node to the given
PermissionTree instance. |
void |
setPermissionTreeProvider(PermissionTreeProvider provider)
Set the provider instance that built this node instance.
|
void |
setProperty(String key,
Object value)
Attach a property to this node
|
void |
updatePermissionList(PermissionCollection collection)
Updates the node's permission values according to the values specified in the given collection.
|
PermissionTreeProvider getPermissionTreeProvider()
void setPermissionTreeProvider(PermissionTreeProvider provider)
PermissionTree getPermissionTree()
PermissionTree
instance this root node has been attached to.void setPermissionTree(PermissionTree tree)
PermissionTree
instance.PermissionNode getParentNode()
void setParentNode(PermissionNode parentNode)
int getLevel()
PermissionTree
String getNodeName()
String getNodeFullName()
int getPositionInTree()
PermissionTree
implementations to order its root nodes from lower position nodes to higher ones.List<Permission> getPermissionList()
void updatePermissionList(PermissionCollection collection)
collection
- The permission collection with the results to apply.void addPermission(Permission permission, String name)
void addPermission(Permission permission, String grantName, String denyName)
String getPermissionGrantName(Permission permission)
permission
- The Permission
instanceString getPermissionDenyName(Permission permission)
permission
- The Permission
instancevoid addDependencies(Permission permission, Permission... dependencies)
Permission
instance a set of permissions which depends on it so that if the
permission is denied then all its dependencies must be denied as well.
For instance, the update and delete permission over a resource depends on the read permission.
permission
- The Permission
instancedependencies
- The set of dependenciesList<Permission> getDependencies(Permission permission)
permission
- The permission to checkboolean isExpanded()
Object getProperty(String key)
key
- The property keyvoid setProperty(String key, Object value)
key
- The property keyvalue
- The value objectboolean propertyEquals(String key, Object value)
key
- The property keyvalue
- The value object to checkList<Permission> impliesName(PermissionNode node)
Permission
instancesvoid expand(LoadCallback consumer)
The children nodes are loaded asynchronously and the consumer instance passed as a parameter is invoked after the loading process is done.
It does nothing in case the node is already expanded.
consumer
- The callback instance that consumes the children nodes.void collapse()
Copyright © 2012–2020 JBoss by Red Hat. All rights reserved.