Class UserAccount

    • Constructor Detail

      • UserAccount

        public UserAccount()
    • Method Detail

      • getUsername

        public String getUsername()
        Returns the user's username.
        Returns:
        will never be null.
      • add

        public boolean add​(Role role)
        Adds a Role to the UserAccount.
        Parameters:
        role - role which the user will receive, must not be null.
        Returns:
        true if successful, false otherwise.
      • remove

        public boolean remove​(Role role)
        Removes a Role from a UserAccount.
        Parameters:
        role - role which will be removed from user, must not be null.
        Returns:
        true if successful, false otherwise.
      • hasRole

        public boolean hasRole​(Role role)
        Checks if a UserAccount has a specific Role
        Parameters:
        role - Role for which the user will be checked for, must not be null.
        Returns:
        true if role was granted to user
      • getRoles

        public org.springframework.data.util.Streamable<Role> getRoles()
        Returns:
        A Streamable/code> with all Roles of the user
      • getFirstname

        public String getFirstname()
      • setFirstname

        public void setFirstname​(String firstname)
      • getLastname

        public String getLastname()
      • setLastname

        public void setLastname​(String lastname)
      • getEmail

        public String getEmail()
      • setEmail

        public void setEmail​(String email)
      • isEnabled

        public boolean isEnabled()
      • setEnabled

        public void setEnabled​(boolean enabled)