1 package org.ejbca.core.protocol.ws.objects; 2 3 import java.io.Serializable ; 4 5 import org.ejbca.core.model.SecConst; 6 import org.ejbca.core.model.ra.UserDataConstants; 7 8 15 16 public class UserDataVOWS implements Serializable { 17 18 public static final java.lang.String TOKEN_TYPE_USERGENERATED = "USERGENERATED"; 19 public static final java.lang.String TOKEN_TYPE_JKS = "JKS"; 20 public static final java.lang.String TOKEN_TYPE_PEM = "PEM"; 21 public static final java.lang.String TOKEN_TYPE_P12 = "P12"; 22 23 public static final int STATUS_NEW = UserDataConstants.STATUS_NEW; public static final int STATUS_FAILED = UserDataConstants.STATUS_FAILED; public static final int STATUS_INITIALIZED = UserDataConstants.STATUS_INITIALIZED; public static final int STATUS_INPROCESS = UserDataConstants.STATUS_INPROCESS; public static final int STATUS_GENERATED = UserDataConstants.STATUS_GENERATED; public static final int STATUS_REVOKED = UserDataConstants.STATUS_REVOKED; public static final int STATUS_HISTORICAL = UserDataConstants.STATUS_HISTORICAL; public static final int STATUS_KEYRECOVERY = UserDataConstants.STATUS_KEYRECOVERY; 32 private java.lang.String username = null; 33 private java.lang.String password = null; 34 private boolean clearPwd = false; 35 private java.lang.String subjectDN = null; 36 private java.lang.String caName = null; 37 private java.lang.String subjectAltName = null; 38 private java.lang.String email = null; 39 private int status = 0; 40 private java.lang.String tokenType = null; 41 private boolean sendNotification = false; 42 private boolean keyRecoverable = false; 43 private java.lang.String endEntityProfileName = null; 44 private java.lang.String certificateProfileName = null; 45 private java.lang.String hardTokenIssuerName = null; 46 47 48 51 public UserDataVOWS(){} 52 53 68 public UserDataVOWS(java.lang.String username, java.lang.String password, boolean clearPwd, java.lang.String subjectDN, java.lang.String caName, java.lang.String subjectAltName, java.lang.String email, int status, java.lang.String tokenType, java.lang.String endEntityProfileName, java.lang.String certificateProfileName, java.lang.String hardTokenIssuerName) { 69 super(); 70 this.username = username; 71 this.password = password; 72 this.clearPwd = clearPwd; 73 this.subjectDN = subjectDN; 74 this.caName = caName; 75 this.subjectAltName = subjectAltName; 76 this.email = email; 77 this.status = status; 78 this.tokenType = tokenType; 79 this.endEntityProfileName = endEntityProfileName; 80 this.certificateProfileName = certificateProfileName; 81 this.hardTokenIssuerName = hardTokenIssuerName; 82 } 83 84 85 89 public boolean getKeyRecoverable(){ 90 return this.keyRecoverable; 91 } 92 93 97 public void setKeyRecoverable(boolean keyrecoverable){ 98 this.keyRecoverable = keyrecoverable; 99 } 100 101 104 public boolean getSendNotification(){ 105 return sendNotification; 106 } 107 108 111 public void setSendNotification(boolean sendnotification){ 112 this.sendNotification = sendnotification; 113 } 114 115 118 public java.lang.String getCaName() { 119 return caName; 120 } 121 122 123 126 public java.lang.String getCertificateProfileName() { 127 return certificateProfileName; 128 } 129 130 131 134 public java.lang.String getEmail() { 135 return email; 136 } 137 138 139 142 public java.lang.String getEndEntityProfileName() { 143 return endEntityProfileName; 144 } 145 146 147 150 public java.lang.String getHardTokenIssuerName() { 151 return hardTokenIssuerName; 152 } 153 154 155 161 public java.lang.String getPassword() { 162 return password; 163 } 164 165 169 public boolean getClearPwd() { 170 return clearPwd; 171 } 172 173 176 public int getStatus() { 177 return status; 178 } 179 180 181 184 public java.lang.String getSubjectDN() { 185 return subjectDN; 186 } 187 188 189 192 public java.lang.String getSubjectAltName() { 193 return subjectAltName; 194 } 195 196 197 200 public java.lang.String getTokenType() { 201 return tokenType; 202 } 203 204 205 208 public int getType() { 209 int type = 1; 210 211 if(sendNotification) 212 type = type | SecConst.USER_SENDNOTIFICATION; 213 else 214 type = type & (~SecConst.USER_SENDNOTIFICATION); 215 216 if(keyRecoverable) 217 type = type | SecConst.USER_KEYRECOVERABLE; 218 else 219 type = type & (~SecConst.USER_KEYRECOVERABLE); 220 221 return type; 222 } 223 224 225 228 public java.lang.String getUsername() { 229 return username; 230 } 231 232 235 public void setCaName(java.lang.String name) { 236 caName = name; 237 } 238 239 242 public void setCertificateProfileName(java.lang.String certificateProfileName) { 243 this.certificateProfileName = certificateProfileName; 244 } 245 246 249 public void setClearPwd(boolean clearPwd) { 250 this.clearPwd = clearPwd; 251 } 252 253 256 public void setEmail(java.lang.String email) { 257 this.email = email; 258 } 259 260 263 public void setEndEntityProfileName(java.lang.String endEntityProfileName) { 264 this.endEntityProfileName = endEntityProfileName; 265 } 266 267 270 public void setHardTokenIssuerName(java.lang.String hardTokenIssuerName) { 271 this.hardTokenIssuerName = hardTokenIssuerName; 272 } 273 274 277 public void setPassword(java.lang.String password) { 278 this.password = password; 279 } 280 281 284 public void setStatus(int status) { 285 this.status = status; 286 } 287 288 291 public void setSubjectAltName(java.lang.String subjectAltName) { 292 this.subjectAltName = subjectAltName; 293 } 294 295 298 public void setSubjectDN(java.lang.String subjectDN) { 299 this.subjectDN = subjectDN; 300 } 301 302 305 public void setTokenType(java.lang.String tokenType) { 306 this.tokenType = tokenType; 307 } 308 309 310 311 314 public void setUsername(java.lang.String username) { 315 this.username = username; 316 } 317 318 319 320 321 322 323 324 } 325 | Popular Tags |