Package de.fraunhofer.iese.mydata.user
Class User
- java.lang.Object
-
- de.fraunhofer.iese.mydata.common.MyDataEntity
-
- de.fraunhofer.iese.mydata.user.User
-
@Entity public class User extends MyDataEntity
MyData-user compatible with spring-security.- Author:
- Fraunhofer IESE
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
accountLocked
protected @NotBlank @Email String
email
Email is not kept unique intentionallyprotected @NotBlank String
encryptedPassword
protected @NotBlank String
firstName
protected @NotBlank String
lastName
protected String
password
Password wont be stored in database, used for sending passwords via UI to backendprotected @NotNull @Valid MyDataRole
role
protected @NotBlank String
username
protected @Pattern(regexp="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}") String
userUUID
-
Constructor Summary
Constructors Constructor Description User()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSolution(Solution solution)
boolean
equals(Object o)
Set<Solution>
getSolutions()
int
hashCode()
boolean
isAccountNonExpired()
boolean
isAccountNonLocked()
boolean
isAdmin()
boolean
isDev()
boolean
isSuperAdmin()
void
removeSolution(Solution solution)
void
setAccountLocked(boolean accountLocked)
void
setSolutions(Set<Solution> solutions)
needed for JPA/Hibernate if the solutions set is null, a new set is initialized, else, it re-uses the previous object then updates the current list (set) of solutions for this affiliation-
Methods inherited from class de.fraunhofer.iese.mydata.common.MyDataEntity
fromJson, getGson, getGson, toJson, toString, validate, validateAndNullCheck
-
-
-
-
Field Detail
-
userUUID
@Pattern(regexp="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}") protected @Pattern(regexp="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}") String userUUID
-
username
@NotBlank protected @NotBlank String username
-
email
@NotBlank @Email protected @NotBlank @Email String email
Email is not kept unique intentionally
-
firstName
@NotBlank protected @NotBlank String firstName
-
lastName
@NotBlank protected @NotBlank String lastName
-
encryptedPassword
@NotBlank protected @NotBlank String encryptedPassword
-
accountLocked
protected boolean accountLocked
-
password
protected String password
Password wont be stored in database, used for sending passwords via UI to backend
-
role
@NotNull @Valid protected @NotNull @Valid MyDataRole role
-
-
Method Detail
-
isSuperAdmin
public boolean isSuperAdmin()
-
isAdmin
public boolean isAdmin()
-
isDev
public boolean isDev()
-
setAccountLocked
public void setAccountLocked(boolean accountLocked)
-
isAccountNonLocked
public boolean isAccountNonLocked()
-
isAccountNonExpired
public boolean isAccountNonExpired()
-
setSolutions
public void setSolutions(Set<Solution> solutions)
needed for JPA/Hibernate if the solutions set is null, a new set is initialized, else, it re-uses the previous object then updates the current list (set) of solutions for this affiliation- Parameters:
solutions
- the new list(set) of solutions for this affiliation
-
addSolution
public void addSolution(Solution solution)
-
removeSolution
public void removeSolution(Solution solution)
-
-