Class SpelFormatter


  • public class SpelFormatter
    extends Object
    This class parses a informed value recovered from a determined RolesAllowed or PreAuthorize Spring annotation to get the informed Roles and Resources to send them to RAC.
    Author:
    Diego N. da Silveira
    • Constructor Detail

      • SpelFormatter

        public SpelFormatter()
    • Method Detail

      • getRoles

        public List<String> getRoles()
        Gets the annotation roles.
        Returns:
        List of the roles.
      • getResources

        public List<String> getResources()
        Gets the annotation resources.
        Returns:
        List of the resources.
      • parseValuePreAuthorize

        public void parseValuePreAuthorize​(String value)
        Parses the SpEL of the informed value.
        Parameters:
        value - Original informed value.
      • addRolesAllowed

        public void addRolesAllowed​(String[] value)
        Add roles.
        Parameters:
        value - Original informed value.