View Javadoc
1   package org.woehlke.bloodmoney.user;
2   
3   import lombok.*;
4   import org.hibernate.validator.constraints.SafeHtml;
5   
6   import javax.validation.constraints.Email;
7   import javax.validation.constraints.NotNull;
8   import java.io.Serializable;
9   import java.util.Locale;
10  
11  @Getter
12  @Setter
13  @EqualsAndHashCode
14  public class UserAccountBean implements Serializable {
15  
16      private static final long serialVersionUID = 4168992193351369032L;
17  
18      @Email
19      private String userEmail;
20  
21      @SuppressWarnings("deprecation")
22      @SafeHtml(whitelistType= SafeHtml.WhiteListType.NONE)
23      private String userPassword;
24  
25      @SuppressWarnings("deprecation")
26      @SafeHtml(whitelistType= SafeHtml.WhiteListType.NONE)
27      private String userFullname;
28  
29      @NotNull
30      private Locale defaultLanguage=Locale.GERMAN;
31  
32      @NotNull
33      private Boolean accountNonExpired=true;
34  
35      @NotNull
36      private Boolean accountNonLocked=true;
37  
38      @NotNull
39      private Boolean credentialsNonExpired=true;
40  
41      @NotNull
42      private Boolean enabled=true;
43  
44      @SuppressWarnings("deprecation")
45      public UserAccountBean(
46          @Email String userEmail,
47          @SafeHtml(whitelistType = SafeHtml.WhiteListType.NONE) String userPassword,
48          @SafeHtml(whitelistType = SafeHtml.WhiteListType.NONE) String userFullname
49      ) {
50          this.userEmail = userEmail;
51          this.userPassword = userPassword;
52          this.userFullname = userFullname;
53      }
54  
55      @Override
56      public String toString() {
57          return userEmail;
58      }
59  }