Class GenericUser

  • All Implemented Interfaces:
    Principal, User, Identifiable<String>

    @NonNullByDefault
    public class GenericUser
    extends Object
    implements User
    Represents a generic User with a set of roles
    Author:
    Yannick Schaus - initial contribution
    • Constructor Detail

      • GenericUser

        public GenericUser​(String name,
                           Set<String> roles)
        Constructs a user attributed with a set of roles.
        Parameters:
        name - the username (account name)
        roles - the roles attributed to this user
      • GenericUser

        public GenericUser​(String name)
        Constructs a user with no roles.
        Parameters:
        name - the username (account name)
    • Method Detail

      • getRoles

        public Set<String> getRoles()
        Description copied from interface: User
        Gets the roles attributed to the user.
        Specified by:
        getRoles in interface User
        Returns:
        role attributed to the user
        See Also:
        Role