Class RoleHierarchyUtils

java.lang.Object
org.springframework.security.access.hierarchicalroles.RoleHierarchyUtils

public final class RoleHierarchyUtils extends Object
Utility methods for RoleHierarchy.
Since:
4.2.0
  • Method Details

    • roleHierarchyFromMap

      @Deprecated public static String roleHierarchyFromMap(Map<String, List<String>> roleHierarchyMap)
      Deprecated.
      Use RoleHierarchyImpl.fromHierarchy(String) or the builder-based approach instead of this manual conversion.
      Converts the supplied Map of role name to implied role name(s) to a string representation understood by the role hierarchy parser. The map key is the role name and the map value is a List of implied role name(s). * @param 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/implied role name is null or empty