Package org.minijax.security
Class SecurityUser
- java.lang.Object
-
- org.minijax.dao.DefaultBaseEntity
-
- org.minijax.dao.DefaultNamedEntity
-
- org.minijax.security.SecurityUser
-
- All Implemented Interfaces:
Serializable,Principal,BaseEntity,NamedEntity
@MappedSuperclass public abstract class SecurityUser extends DefaultNamedEntity
The SecurityUser class is an abstract base class for "security" entities that can login, logout, change passwords, etc.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.minijax.dao.DefaultNamedEntity
HANDLE_REGEX, HANDLE_SPECIAL_CHARS, HANDLE_SPECIAL_CHARS_REGEX
-
-
Constructor Summary
Constructors Constructor Description SecurityUser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetEmail()StringgetPasswordHash()StringgetRoles()Returns all user roles as a string.booleanhasRole(String role)voidsetEmail(String email)voidsetPassword(String password)voidsetRoles(String... roles)Sets the user roles.-
Methods inherited from class org.minijax.dao.DefaultNamedEntity
generateHandle, getAvatar, getHandle, getName, setAvatar, setHandle, setName
-
Methods inherited from class org.minijax.dao.DefaultBaseEntity
copyNonNullProperties, equals, fromJson, getCreatedDateTime, getDeletedDateTime, getId, getUpdatedDateTime, hashCode, isDeleted, onPrePersist, onPreUpdate, setCreatedDateTime, setDeleted, setId, setUpdatedDateTime, toJson
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.minijax.dao.BaseEntity
getCreatedDateTime, getDeletedDateTime, getId, getUpdatedDateTime, isDeleted, setDeleted, setId
-
Methods inherited from interface org.minijax.dao.NamedEntity
getUri
-
-
-
-
Method Detail
-
getEmail
public String getEmail()
-
setEmail
public void setEmail(String email)
-
getPasswordHash
public String getPasswordHash()
-
setPassword
public void setPassword(String password)
-
getRoles
public String getRoles()
Returns all user roles as a string.- Returns:
- All user roles.
-
setRoles
public void setRoles(String... roles)
Sets the user roles.- Parameters:
roles- The user roles.
-
hasRole
public boolean hasRole(String role)
-
-