Class BasicUser<R extends org.springframework.security.core.GrantedAuthority>

  • Type Parameters:
    R - the generic type
    All Implemented Interfaces:
    Serializable, Activatable, EntityId, org.springframework.data.domain.Persistable<Long>, org.springframework.security.core.userdetails.UserDetails

    @MappedSuperclass
    public abstract class BasicUser<R extends org.springframework.security.core.GrantedAuthority>
    extends AclSid
    implements org.springframework.security.core.userdetails.UserDetails
    The Class BasicUser. When you extend this class, make sure you use:
    @DiscriminatorValue(value = "1")
    See Also:
    Serialized Form
    • Constructor Detail

      • BasicUser

        public BasicUser()
        Instantiates a new basic user.
    • Method Detail

      • getEmail

        public String getEmail()
        Gets the email.
        Returns:
        the email
      • setEmail

        public void setEmail​(String email)
        Sets the email.
        Parameters:
        email - the new email
      • getShortName

        public String getShortName()
        Gets the short name.
        Returns:
        the short name
      • setShortName

        public void setShortName​(String shortName)
        Sets the short name.
        Parameters:
        shortName - the new short name
      • getFullName

        public String getFullName()
        Gets the full name.
        Overrides:
        getFullName in class AclSid
        Returns:
        the full name
      • setFullName

        public void setFullName​(String fullName)
        Sets the full name.
        Parameters:
        fullName - the new full name
      • getAccountExpires

        public Instant getAccountExpires()
        Gets the account expires.
        Returns:
        the account expires
      • setAccountExpires

        public void setAccountExpires​(Instant accountExpires)
        Sets the account expires.
        Parameters:
        accountExpires - the new account expires
      • getLockedUntil

        public Instant getLockedUntil()
        Gets the locked until.
        Returns:
        the locked until
      • setLockedUntil

        public void setLockedUntil​(Instant lockedUntil)
        Sets the locked until.
        Parameters:
        lockedUntil - the new locked until
      • getPasswordExpires

        public Instant getPasswordExpires()
        Gets the password expires.
        Returns:
        the password expires
      • setPasswordExpires

        public void setPasswordExpires​(Instant passwordExpires)
        Sets the password expires.
        Parameters:
        passwordExpires - the new password expires
      • setPassword

        public void setPassword​(String password)
        Sets the password.
        Parameters:
        password - the new password
      • getRoles

        public Set<R> getRoles()
        Gets the roles.
        Returns:
        the roles
      • setRoles

        public void setRoles​(Set<R> roles)
        Sets the roles.
        Parameters:
        roles - the new roles
      • getUuid

        public String getUuid()
        Gets the uuid.
        Returns:
        the uuid
      • setUuid

        public void setUuid​(String uuid)
        Sets the uuid.
        Parameters:
        uuid - the new uuid
      • getAuthorities

        public Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
        Specified by:
        getAuthorities in interface org.springframework.security.core.userdetails.UserDetails
      • getPassword

        public String getPassword()
        Specified by:
        getPassword in interface org.springframework.security.core.userdetails.UserDetails
      • getUsername

        public String getUsername()
        getUsername() must return the name used by UserDetailService in the UserDetailsService.loadUserByUsername(String)
        Specified by:
        getUsername in interface org.springframework.security.core.userdetails.UserDetails
        See Also:
        UserDetails.getUsername()
      • isAccountNonExpired

        public boolean isAccountNonExpired()
        Specified by:
        isAccountNonExpired in interface org.springframework.security.core.userdetails.UserDetails
      • isAccountNonLocked

        public boolean isAccountNonLocked()
        Specified by:
        isAccountNonLocked in interface org.springframework.security.core.userdetails.UserDetails
      • isAccountLocked

        public boolean isAccountLocked()
        Checks if is account locked.
        Returns:
        true, if is account locked
      • isCredentialsNonExpired

        public boolean isCredentialsNonExpired()
        Specified by:
        isCredentialsNonExpired in interface org.springframework.security.core.userdetails.UserDetails
      • isEnabled

        public boolean isEnabled()
        Specified by:
        isEnabled in interface org.springframework.security.core.userdetails.UserDetails
      • getAccountType

        public BasicUser.AccountType getAccountType()
        Gets the account type.
        Returns:
        the account type
      • setAccountType

        public void setAccountType​(BasicUser.AccountType accountType)
        Sets the account type.
        Parameters:
        accountType - the new account type
      • getLastLogin

        public Instant getLastLogin()
        Gets the last login.
        Returns:
        the last login
      • setLastLogin

        public void setLastLogin​(Instant lastLogin)
        Sets the last login.
        Parameters:
        lastLogin - the new last login
      • setRuntimeAuthorities

        public void setRuntimeAuthorities​(List<org.springframework.security.core.GrantedAuthority> authorities)
        Set the actual authorities to use at runtime. See runtimeAuthorities.
        Parameters:
        authorities - the new runtime authorities