Class DefaultPermissionTree
- java.lang.Object
-
- org.uberfire.security.client.authz.tree.impl.DefaultPermissionTree
-
- All Implemented Interfaces:
PermissionTree
public class DefaultPermissionTree extends Object implements PermissionTree
-
-
Constructor Summary
Constructors Constructor Description DefaultPermissionTree(org.uberfire.security.authz.PermissionManager permissionManager, List<PermissionNode> rootNodes, org.uberfire.security.authz.PermissionCollection permissions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(PermissionTreeVisitor visitor)Entry point for visitor interfacesvoidaccept(PermissionTreeVisitor visitor, List<PermissionNode> children)voidaccept(PermissionTreeVisitor visitor, PermissionNode node)Set<org.uberfire.security.authz.Permission>getChildrenPermissions(PermissionNode parent)Collection<String>getChildrenResourceIds(PermissionNode node)Get the resource ids (if any) referenced from the permission instances, seePermissionTree.getPermissions().org.uberfire.security.authz.PermissionCollectiongetPermissions()Get the collection of permissions this tree has been initiliazed withList<PermissionNode>getRootNodes()Get the root nodes of the tree.
-
-
-
Constructor Detail
-
DefaultPermissionTree
public DefaultPermissionTree(org.uberfire.security.authz.PermissionManager permissionManager, List<PermissionNode> rootNodes, org.uberfire.security.authz.PermissionCollection permissions)
-
-
Method Detail
-
getRootNodes
public List<PermissionNode> getRootNodes()
Description copied from interface:PermissionTreeGet the root nodes of the tree.A list of nodes order by its
PermissionNode.getPositionInTree(). The nodes with the same position are ordered by node name in incremental order.- Specified by:
getRootNodesin interfacePermissionTree
-
getPermissions
public org.uberfire.security.authz.PermissionCollection getPermissions()
Description copied from interface:PermissionTreeGet the collection of permissions this tree has been initiliazed with- Specified by:
getPermissionsin interfacePermissionTree
-
getChildrenResourceIds
public Collection<String> getChildrenResourceIds(PermissionNode node)
Description copied from interface:PermissionTreeGet the resource ids (if any) referenced from the permission instances, seePermissionTree.getPermissions().- Specified by:
getChildrenResourceIdsin interfacePermissionTree- Parameters:
node- The parent node to start looking for- Returns:
- A collection of resource identifiers
-
getChildrenPermissions
public Set<org.uberfire.security.authz.Permission> getChildrenPermissions(PermissionNode parent)
-
accept
public void accept(PermissionTreeVisitor visitor)
Description copied from interface:PermissionTreeEntry point for visitor interfaces- Specified by:
acceptin interfacePermissionTree
-
accept
public void accept(PermissionTreeVisitor visitor, PermissionNode node)
-
accept
public void accept(PermissionTreeVisitor visitor, List<PermissionNode> children)
-
-