public class DefaultPermissionTree extends Object implements PermissionTree
Constructor and Description |
---|
DefaultPermissionTree(PermissionManager permissionManager,
List<PermissionNode> rootNodes,
PermissionCollection permissions) |
Modifier and Type | Method and Description |
---|---|
void |
accept(PermissionTreeVisitor visitor)
Entry point for visitor interfaces
|
void |
accept(PermissionTreeVisitor visitor,
List<PermissionNode> children) |
void |
accept(PermissionTreeVisitor visitor,
PermissionNode node) |
Set<Permission> |
getChildrenPermissions(PermissionNode parent) |
Collection<String> |
getChildrenResourceIds(PermissionNode node)
Get the resource ids (if any) referenced from the permission instances, see
PermissionTree.getPermissions() . |
PermissionCollection |
getPermissions()
Get the collection of permissions this tree has been initiliazed with
|
List<PermissionNode> |
getRootNodes()
Get the root nodes of the tree.
|
public DefaultPermissionTree(PermissionManager permissionManager, List<PermissionNode> rootNodes, PermissionCollection permissions)
public List<PermissionNode> getRootNodes()
PermissionTree
A list of nodes order by its PermissionNode.getPositionInTree()
. The nodes with the same position
are ordered by node name in incremental order.
getRootNodes
in interface PermissionTree
public PermissionCollection getPermissions()
PermissionTree
getPermissions
in interface PermissionTree
public Collection<String> getChildrenResourceIds(PermissionNode node)
PermissionTree
PermissionTree.getPermissions()
.getChildrenResourceIds
in interface PermissionTree
node
- The parent node to start looking forpublic Set<Permission> getChildrenPermissions(PermissionNode parent)
public void accept(PermissionTreeVisitor visitor)
PermissionTree
accept
in interface PermissionTree
public void accept(PermissionTreeVisitor visitor, PermissionNode node)
public void accept(PermissionTreeVisitor visitor, List<PermissionNode> children)
Copyright © 2012–2020 JBoss by Red Hat. All rights reserved.