@Entity
public class User
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
User.AuthMethod
Possible authentication methods
|
static class |
User.Role
Roles are used for authorization within JATOS GUI
|
Constructor and Description |
---|
User() |
User(java.lang.String username,
java.lang.String name,
java.lang.String email) |
Modifier and Type | Method and Description |
---|---|
void |
addRole(User.Role role) |
void |
addStudy(Study study) |
boolean |
equals(java.lang.Object obj) |
User.AuthMethod |
getAuthMethod() |
java.lang.String |
getEmail() |
java.sql.Timestamp |
getLastLogin() |
java.sql.Timestamp |
getLastSeen() |
java.lang.String |
getName() |
java.lang.String |
getPasswordHash() |
java.util.Set<User.Role> |
getRoleList() |
java.util.Set<Study> |
getStudyList() |
java.lang.String |
getUsername() |
JatosWorker |
getWorker() |
int |
hashCode() |
boolean |
hasRole(User.Role role) |
boolean |
hasStudy(Study study) |
boolean |
isActive() |
boolean |
isAdmin() |
boolean |
isDb() |
boolean |
isLdap() |
boolean |
isOauthGoogle() |
boolean |
isOidc() |
boolean |
isSuperuser() |
static java.lang.String |
normalizeUsername(java.lang.String username)
Normalise username:
1) remove accents
2) turn to lower case
3) trim
4) return the composed form NFKC (combining character sequences are mapped to composites)
(see https://stackoverflow.com/a/1598365/1278769)
|
void |
removeRole(User.Role role) |
void |
removeStudy(Study study) |
void |
setActive(boolean active) |
void |
setAuthMethod(User.AuthMethod authMethod) |
void |
setEmail(java.lang.String email) |
void |
setLastLogin(java.sql.Timestamp lastLogin) |
void |
setLastSeen(java.sql.Timestamp lastSeen) |
void |
setName(java.lang.String name) |
void |
setPasswordHash(java.lang.String passwordHash) |
void |
setRoleList(java.util.Set<User.Role> roleList) |
void |
setStudyList(java.util.Set<Study> studyList) |
void |
setUsername(java.lang.String username) |
void |
setWorker(JatosWorker worker) |
java.lang.String |
toString() |
public User(java.lang.String username, java.lang.String name, java.lang.String email)
public User()
public static java.lang.String normalizeUsername(java.lang.String username)
public void setUsername(java.lang.String username)
public java.lang.String getUsername()
public void setName(java.lang.String name)
public java.lang.String getName()
public void setEmail(java.lang.String email)
public java.lang.String getEmail()
public java.util.Set<User.Role> getRoleList()
public void setRoleList(java.util.Set<User.Role> roleList)
public void addRole(User.Role role)
public void removeRole(User.Role role)
public boolean hasRole(User.Role role)
public boolean isAdmin()
public boolean isSuperuser()
public void setPasswordHash(java.lang.String passwordHash)
public java.lang.String getPasswordHash()
public User.AuthMethod getAuthMethod()
public void setAuthMethod(User.AuthMethod authMethod)
public boolean isDb()
public boolean isLdap()
public boolean isOauthGoogle()
public boolean isOidc()
public void setWorker(JatosWorker worker)
public JatosWorker getWorker()
public void setStudyList(java.util.Set<Study> studyList)
public java.util.Set<Study> getStudyList()
public void addStudy(Study study)
public void removeStudy(Study study)
public boolean hasStudy(Study study)
public java.sql.Timestamp getLastLogin()
public void setLastLogin(java.sql.Timestamp lastLogin)
public java.sql.Timestamp getLastSeen()
public void setLastSeen(java.sql.Timestamp lastSeen)
public boolean isActive()
public void setActive(boolean active)
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object