Class RoleHierarchyUtils
java.lang.Object
org.springframework.security.access.hierarchicalroles.RoleHierarchyUtils
Utility methods for
RoleHierarchy
.- Since:
- 4.2.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
roleHierarchyFromMap
(Map<String, List<String>> roleHierarchyMap) Converts the suppliedMap
of role name to implied role name(s) to a string representation understood byRoleHierarchyImpl.setHierarchy(String)
.
-
Method Details
-
roleHierarchyFromMap
Converts the suppliedMap
of role name to implied role name(s) to a string representation understood byRoleHierarchyImpl.setHierarchy(String)
. The map key is the role name and the map value is aList
of implied role name(s).- Parameters:
roleHierarchyMap
- the mapping(s) of role name to implied role name(s)- Returns:
- a string representation of a role hierarchy
- Throws:
IllegalArgumentException
- if roleHierarchyMap is null or empty or if a role name is null or empty or if an implied role name(s) is null or empty
-