Add RoleHierarchyImpl#of
Closes gh-13788
This commit is contained in:
committed by
Josh Cummings
parent
e6bea1cfa1
commit
c1b3351569
@@ -125,6 +125,17 @@ public class RoleHierarchyImpl implements RoleHierarchy {
|
||||
return new Builder(rolePrefix);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a role hierarchy instance with the given definition
|
||||
* @param roleHierarchyStringRepresentation String definition of the role hierarchy.
|
||||
* @return role hierarchy instance
|
||||
*/
|
||||
public static RoleHierarchyImpl of(String roleHierarchyStringRepresentation) {
|
||||
RoleHierarchyImpl hierarchy = new RoleHierarchyImpl();
|
||||
hierarchy.setHierarchy(roleHierarchyStringRepresentation);
|
||||
return hierarchy;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the role hierarchy and pre-calculate for every role the set of all reachable
|
||||
* roles, i.e. all roles lower in the hierarchy of every given role. Pre-calculation
|
||||
|
||||
Reference in New Issue
Block a user