Class RegexRoleMapper

  • All Implemented Interfaces:
    RoleMapper

    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.

    Author:
    Diana Vilkolakova
    • 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
        Parameters:
        rolesToMap - the roles in their raw form to apply mapping
        Returns:
        the mapped role set