This project has retired. For details please refer to its
Attic page.
SimpleUser xref
1 package org.apache.archiva.redback.users.memory;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import org.apache.archiva.redback.users.User;
23
24 import java.io.Serializable;
25 import java.util.ArrayList;
26 import java.util.Date;
27 import java.util.List;
28
29
30
31
32
33
34 public class SimpleUser
35 implements User, Serializable
36 {
37 private String username;
38
39 private String password;
40
41 private String email;
42
43 private String fullName;
44
45 private String encodedPassword;
46
47 private Date lastPasswordChange;
48
49 private Date lastLoginDate;
50
51 private int countFailedLoginAttempts = 0;
52
53 private boolean locked = false;
54
55 private boolean permanent = false;
56
57 private boolean validated = false;
58
59 private List<String> previousEncodedPasswords;
60
61 private Date accountCreationDate;
62
63 private boolean passwordChangeRequired;
64
65 public SimpleUser()
66 {
67
68 }
69
70 public void addPreviousEncodedPassword( String encodedPassword )
71 {
72 getPreviousEncodedPasswords().add( encodedPassword );
73 }
74
75 public Date getAccountCreationDate()
76 {
77 return accountCreationDate;
78 }
79
80 public int getCountFailedLoginAttempts()
81 {
82 return countFailedLoginAttempts;
83 }
84
85 public String getEmail()
86 {
87 return email;
88 }
89
90 public String getEncodedPassword()
91 {
92 return encodedPassword;
93 }
94
95 public String getFullName()
96 {
97 return fullName;
98 }
99
100 public Date getLastLoginDate()
101 {
102 return lastLoginDate;
103 }
104
105 public Date getLastPasswordChange()
106 {
107 return lastPasswordChange;
108 }
109
110 public String getPassword()
111 {
112 return password;
113 }
114
115 public List<String> getPreviousEncodedPasswords()
116 {
117 if ( previousEncodedPasswords == null )
118 {
119 previousEncodedPasswords = new ArrayList<String>();
120 }
121 return previousEncodedPasswords;
122 }
123
124 public String getUsername()
125 {
126 return username;
127 }
128
129 public boolean isLocked()
130 {
131 return locked;
132 }
133
134 public void setAccountCreationDate( Date accountCreationDate )
135 {
136 this.accountCreationDate = accountCreationDate;
137 }
138
139 public void setCountFailedLoginAttempts( int countFailedLoginAttempts )
140 {
141 this.countFailedLoginAttempts = countFailedLoginAttempts;
142 }
143
144 public void setEmail( String email )
145 {
146 this.email = email;
147 }
148
149 public void setEncodedPassword( String encodedPassword )
150 {
151 this.encodedPassword = encodedPassword;
152 }
153
154 public void setFullName( String fullName )
155 {
156 this.fullName = fullName;
157 }
158
159 public void setLastLoginDate( Date lastLoginDate )
160 {
161 this.lastLoginDate = lastLoginDate;
162 }
163
164 public void setLastPasswordChange( Date lastPasswordChange )
165 {
166 this.lastPasswordChange = lastPasswordChange;
167 }
168
169 public void setLocked( boolean locked )
170 {
171 this.locked = locked;
172 }
173
174 public void setPassword( String password )
175 {
176 this.password = password;
177 }
178
179 public void setPreviousEncodedPasswords( List<String> previousEncodedPasswords )
180 {
181 this.previousEncodedPasswords = previousEncodedPasswords;
182 }
183
184 public void setUsername( String username )
185 {
186 this.username = username;
187 }
188
189 public boolean isPasswordChangeRequired()
190 {
191 return passwordChangeRequired;
192 }
193
194 public void setPasswordChangeRequired( boolean passwordChangeRequired )
195 {
196 this.passwordChangeRequired = passwordChangeRequired;
197 }
198
199 public boolean isPermanent()
200 {
201 return permanent;
202 }
203
204 public void setPermanent( boolean permanent )
205 {
206 this.permanent = permanent;
207 }
208
209 public boolean isValidated()
210 {
211 return validated;
212 }
213
214 public void setValidated( boolean validated )
215 {
216 this.validated = validated;
217 }
218
219 public String getUserManagerId()
220 {
221 return "simple";
222 }
223 }