1 18 19 package sync4j.framework.core.dm.ddf; 20 21 import sync4j.framework.tools.Base64; 22 23 30 public class DMAccount implements java.io.Serializable { 31 32 34 public static final String DMACC_ADDR = "/Addr"; 35 public static final String DMACC_ADDR_TYPE = "/AddrType" ; 36 public static final String DMACC_PORT_NBR = "/PortNbr" ; 37 public static final String DMACC_CON_REF = "/ConRef"; 38 public static final String DMACC_SERVER_ID = "/ServerId"; 39 public static final String DMACC_SERVER_PASSWORD = "/ServerPW"; 40 public static final String DMACC_SERVER_NONCE = "/ServerNonce"; 41 public static final String DMACC_USERNAME = "/UserName"; 42 public static final String DMACC_CLIENT_PASSWORD = "/ClientPW"; 43 public static final String DMACC_CLIENT_NONCE = "/ClientNonce"; 44 public static final String DMACC_AUTH_PREF = "/AuthPref"; 45 public static final String DMACC_NAME = "/Name"; 46 47 48 private String address; 50 private int addressType; 51 private int portNumber; 52 private String conRef; 53 private String serverId; 54 private String serverPassword; 55 private byte[] serverNonce; 56 private String userName; 57 private String clientPassword; 58 private byte[] clientNonce; 59 private String authPref; 60 private String name; 61 62 63 64 66 public DMAccount() {} 67 68 84 public DMAccount(final String address, 85 final int addressType, 86 final int portNumber, 87 final String conRef, 88 final String serverId, 89 final String serverPassword, 90 final byte[] serverNonce, 91 final String userName, 92 final String clientPassword, 93 final byte[] clientNonce, 94 final String authPref, 95 final String name) { 96 this.address = address; 97 this.addressType = addressType; 98 this.portNumber = portNumber; 99 this.conRef = conRef; 100 this.serverId = serverId; 101 this.serverPassword = serverPassword; 102 this.serverNonce = serverNonce; 103 this.userName = userName; 104 this.clientPassword = clientPassword; 105 this.clientNonce = clientNonce; 106 this.authPref = authPref; 107 this.name = name; 108 } 109 110 111 113 118 public String getUserName() { 119 return userName; 120 } 121 122 127 public void setUserName(String userName) { 128 this.userName = userName; 129 } 130 131 136 public byte[] getClientNonce() { 137 return clientNonce; 138 } 139 140 145 public void setClientNonce(byte[] clientNonce) { 146 this.clientNonce = clientNonce; 147 } 148 149 154 public void setClientNonce(String b64ClientNonce) { 155 this.clientNonce = Base64.decode(b64ClientNonce); 156 } 157 158 163 public String getAddress() { 164 return address; 165 } 166 167 172 public void setAddress(String address) { 173 this.address = address; 174 } 175 176 181 public String getServerId() { 182 return serverId; 183 } 184 185 190 public void setServerId(String serverId) { 191 this.serverId = serverId; 192 } 193 194 199 public int getAddressType() { 200 return addressType; 201 } 202 203 208 public void setAddressType(int addressType) { 209 this.addressType = addressType; 210 } 211 212 217 public String getServerPassword() { 218 return serverPassword; 219 } 220 221 226 public void setServerPassword(String serverPassword) { 227 this.serverPassword = serverPassword; 228 } 229 230 235 public int getPortNumber() { 236 return portNumber; 237 } 238 239 244 public void setPortNumber(int portNumber) { 245 this.portNumber = portNumber; 246 } 247 248 253 public String getConRef() { 254 return conRef; 255 } 256 257 262 public void setConRef(String conRef) { 263 this.conRef = conRef; 264 } 265 266 271 public String getName() { 272 return name; 273 } 274 275 280 public void setName(String name) { 281 this.name = name; 282 } 283 284 285 290 public byte[] getServerNonce() { 291 return serverNonce; 292 } 293 294 299 public void setServerNonce(byte[] serverNonce) { 300 this.serverNonce = serverNonce; 301 } 302 303 308 public void setServerNonce(String b64ServerNonce) { 309 this.serverNonce = Base64.decode(b64ServerNonce); 310 } 311 312 317 public String getClientPassword() { 318 return clientPassword; 319 } 320 321 326 public void setClientPassword(String clientPassword) { 327 this.clientPassword = clientPassword; 328 } 329 330 335 public String getAuthPref() { 336 return authPref; 337 } 338 339 344 public void setAuthPref(String authPref) { 345 this.authPref = authPref; 346 } 347 348 349 350 } | Popular Tags |