Class BasicUser<R extends org.springframework.security.core.GrantedAuthority>
- java.lang.Object
-
- org.genesys.blocks.model.EmptyModel
-
- org.genesys.blocks.model.BasicModel
-
- org.genesys.blocks.model.VersionedModel
-
- org.genesys.blocks.model.AuditedVersionedModel
-
- org.genesys.blocks.security.model.AclSid
-
- org.genesys.blocks.security.model.BasicUser<R>
-
- 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBasicUser.AccountTypeThe Enum AccountType.
-
Field Summary
-
Fields inherited from class org.genesys.blocks.model.VersionedModel
active
-
-
Constructor Summary
Constructors Constructor Description BasicUser()Instantiates a new basic user.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DategetAccountExpires()Gets the account expires.BasicUser.AccountTypegetAccountType()Gets the account type.Collection<? extends org.springframework.security.core.GrantedAuthority>getAuthorities()StringgetEmail()Gets the email.StringgetFullName()Gets the full name.DategetLastLogin()Gets the last login.DategetLockedUntil()Gets the locked until.StringgetPassword()DategetPasswordExpires()Gets the password expires.Set<R>getRoles()Gets the roles.StringgetShortName()Gets the short name.StringgetUsername()getUsername()must return the name used by UserDetailService in theUserDetailsService.loadUserByUsername(String)StringgetUuid()Gets the uuid.booleanisAccountLocked()Checks if is account locked.booleanisAccountNonExpired()booleanisAccountNonLocked()booleanisCredentialsNonExpired()booleanisEnabled()voidsetAccountExpires(Date accountExpires)Sets the account expires.voidsetAccountType(BasicUser.AccountType accountType)Sets the account type.voidsetEmail(String email)Sets the email.voidsetFullName(String fullName)Sets the full name.voidsetLastLogin(Date lastLogin)Sets the last login.voidsetLockedUntil(Date lockedUntil)Sets the locked until.voidsetPassword(String password)Sets the password.voidsetPasswordExpires(Date passwordExpires)Sets the password expires.voidsetRoles(Set<R> roles)Sets the roles.voidsetRuntimeAuthorities(Set<String> authorities)Set additional authorities at runtime.voidsetShortName(String shortName)Sets the short name.voidsetUuid(String uuid)Sets the uuid.StringtoString()-
Methods inherited from class org.genesys.blocks.security.model.AclSid
getAclEntries, getObjectIdentities, getSid, isPrincipal, setAclEntries, setObjectIdentities, setPrincipal, setSid
-
Methods inherited from class org.genesys.blocks.model.AuditedVersionedModel
getCreatedBy, getCreatedDate, getLastModifiedBy, getLastModifiedDate, setCreatedBy, setCreatedDate, setLastModifiedBy, setLastModifiedDate
-
Methods inherited from class org.genesys.blocks.model.VersionedModel
equals, getVersion, hashCode, isActive, setActive, setVersion
-
Methods inherited from class org.genesys.blocks.model.BasicModel
getId, setId
-
Methods inherited from class org.genesys.blocks.model.EmptyModel
isNew
-
-
-
-
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:
getFullNamein classAclSid- Returns:
- the full name
-
setFullName
public void setFullName(String fullName)
Sets the full name.- Parameters:
fullName- the new full name
-
getAccountExpires
public Date getAccountExpires()
Gets the account expires.- Returns:
- the account expires
-
setAccountExpires
public void setAccountExpires(Date accountExpires)
Sets the account expires.- Parameters:
accountExpires- the new account expires
-
getLockedUntil
public Date getLockedUntil()
Gets the locked until.- Returns:
- the locked until
-
setLockedUntil
public void setLockedUntil(Date lockedUntil)
Sets the locked until.- Parameters:
lockedUntil- the new locked until
-
getPasswordExpires
public Date getPasswordExpires()
Gets the password expires.- Returns:
- the password expires
-
setPasswordExpires
public void setPasswordExpires(Date 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
-
getUuid
public String getUuid()
Gets the uuid.- Returns:
- the uuid
-
setUuid
public void setUuid(String uuid)
Sets the uuid.- Parameters:
uuid- the new uuid
-
toString
public String toString()
- Overrides:
toStringin classVersionedModel
-
getAuthorities
public Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
- Specified by:
getAuthoritiesin interfaceorg.springframework.security.core.userdetails.UserDetails
-
getPassword
public String getPassword()
- Specified by:
getPasswordin interfaceorg.springframework.security.core.userdetails.UserDetails
-
getUsername
public String getUsername()
getUsername()must return the name used by UserDetailService in theUserDetailsService.loadUserByUsername(String)- Specified by:
getUsernamein interfaceorg.springframework.security.core.userdetails.UserDetails- See Also:
UserDetails.getUsername()
-
isAccountNonExpired
public boolean isAccountNonExpired()
- Specified by:
isAccountNonExpiredin interfaceorg.springframework.security.core.userdetails.UserDetails
-
isAccountNonLocked
public boolean isAccountNonLocked()
- Specified by:
isAccountNonLockedin interfaceorg.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:
isCredentialsNonExpiredin interfaceorg.springframework.security.core.userdetails.UserDetails
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabledin interfaceorg.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 Date getLastLogin()
Gets the last login.- Returns:
- the last login
-
setLastLogin
public void setLastLogin(Date lastLogin)
Sets the last login.- Parameters:
lastLogin- the new last login
-
-