Class RegexRoleMapper

  • All Implemented Interfaces:

    public class RegexRoleMapper
    extends Object
    implements RoleMapper
    A pattern role mapper.

    Role mapper that maps roles that contain Pattern with replacement. Pattern can capture groups that replacement string can use. Can be used to replace all occurrences of the pattern in role or only the first occurrence.

    Diana Vilkolakova
    • Field Detail

      • replacement

        private String replacement
      • keepNonMapped

        private boolean keepNonMapped
      • replaceAll

        private boolean replaceAll
    • Method Detail

      • mapRoles

        public Roles mapRoles​(Roles rolesToMap)
        Description copied from interface: RoleMapper
        Returns a set of strings representing the roles mapped from the given roles in their raw form.
        Specified by:
        mapRoles in interface RoleMapper
        rolesToMap - the roles in their raw form to apply mapping
        the mapped role set