Class User


  • public class User
    extends Object
    Holds information about an user.
    • Method Detail

      • current

        public static User current()
        Returns:
        the current user.
      • getName

        public String getName()
        Returns:
        the user name.
      • setName

        public void setName​(String name)
      • getRoles

        public Set<Role> getRoles()
      • refreshRoles

        public void refreshRoles​(Set<Role> roles)
      • addRole

        public void addRole​(Role role)
      • isSuperuser

        public boolean isSuperuser()
        Returns:
        true if this user belongs to the role SuperUser, false otherwise.
      • isAdministrator

        public boolean isAdministrator()
        Returns:
        true if this user belongs to the role Administrator, false otherwise.
      • isAuthenticated

        public boolean isAuthenticated()
      • setAuthenticated

        public void setAuthenticated​(boolean authenticated)