1 18 19 20 package sync4j.framework.core; 21 22 import java.util.*; 23 24 31 public final class DevInf 32 implements java.io.Serializable { 33 34 private VerDTD verDTD; 36 private String man; 37 private String mod; 38 private String oem; 39 private String fwV; 40 private String swV; 41 private String hwV; 42 private String devID; 43 private String devTyp; 44 private ArrayList datastores = new ArrayList(); 45 private ArrayList ctCap = new ArrayList(); 46 private ArrayList ext = new ArrayList(); 47 private Boolean utc; 48 private Boolean supportLargeObjs; 49 private Boolean supportNumberOfChanges; 50 51 56 public DevInf() {} 57 58 78 public DevInf(final VerDTD verDTD, 79 final String man, 80 final String mod, 81 final String oem, 82 final String fwV, 83 final String swV, 84 final String hwV, 85 final String devID, 86 final String devTyp, 87 final DataStore[] dataStores, 88 final CTCap[] ctCap, 89 final Ext[] ext, 90 final boolean utc, 91 final boolean supportLargeObjs, 92 final boolean supportNumberOfChanges) { 93 94 setVerDTD(verDTD); 95 setDevID(devID); 96 setDevTyp(devTyp); 97 setDataStore(dataStores); 98 setCTCap(ctCap); 99 setExt(ext); 100 101 this.man = man; 102 this.mod = mod; 103 this.oem = oem; 104 this.fwV = fwV; 105 this.swV = swV; 106 this.hwV = hwV; 107 108 109 this.utc = (utc) ? new Boolean (utc) : null; 110 this.supportLargeObjs = 111 (supportLargeObjs) ? new Boolean (supportLargeObjs) : null; 112 this.supportNumberOfChanges = 113 (supportNumberOfChanges) ? new Boolean (supportNumberOfChanges) : null; 114 } 115 116 122 public VerDTD getVerDTD() { 123 return verDTD; 124 } 125 126 131 public void setVerDTD(VerDTD verDTD) { 132 if (verDTD == null) { 133 throw new IllegalArgumentException ("verDTD cannot be null"); 134 } 135 this.verDTD = verDTD; 136 } 137 138 143 public String getMan() { 144 return man; 145 } 146 147 153 public void setMan(String man) { 154 this.man = man; 155 } 156 157 162 public String getMod() { 163 return mod; 164 } 165 166 172 public void setMod(String mod) { 173 this.mod = mod; 174 } 175 176 181 public String getOEM() { 182 return oem; 183 } 184 185 191 public void setOEM(String oem) { 192 this.oem = oem; 193 } 194 195 200 public String getFwV() { 201 return fwV; 202 } 203 204 210 public void setFwV(String fwV) { 211 this.fwV =fwV; 212 } 213 214 219 public String getSwV() { 220 return swV; 221 } 222 223 229 public void setSwV(String swV) { 230 this.swV =swV; 231 } 232 233 238 public String getHwV() { 239 return hwV; 240 } 241 242 248 public void setHwV(String hwV) { 249 this.hwV =hwV; 250 } 251 252 257 public String getDevID() { 258 return devID; 259 } 260 261 267 public void setDevID(String devID) { 268 if (devID == null) { 269 throw new IllegalArgumentException ("devID cannot be null"); 270 } 271 this.devID = devID; 272 } 273 274 279 public String getDevTyp() { 280 return devTyp; 281 } 282 283 289 public void setDevTyp(String devTyp) { 290 if (devTyp == null) { 291 throw new IllegalArgumentException ("devTyp cannot be null"); 292 } 293 this.devTyp = devTyp; 294 } 295 296 301 public ArrayList getDataStore() { 302 return this.datastores; 303 } 304 305 311 public void setDataStore(DataStore[] dataStores) { 312 if (dataStores == null ) { 313 throw new IllegalArgumentException ("datastores cannot be null"); 314 } 315 this.datastores.clear(); 316 this.datastores.addAll(Arrays.asList(dataStores)); 317 } 318 319 324 public ArrayList getCTCap() { 325 return this.ctCap; 326 } 327 328 334 public void setCTCap(CTCap[] ctCap) { 335 if (ctCap != null) { 336 this.ctCap.clear(); 337 this.ctCap.addAll(Arrays.asList(ctCap)); 338 } else { 339 this.ctCap = null; 340 } 341 } 342 343 348 public ArrayList getExt() { 349 return this.ext; 350 } 351 352 358 public void setExt(Ext[] ext) { 359 if (ext != null) { 360 this.ext.clear(); 361 this.ext.addAll(Arrays.asList(ext)); 362 } else { 363 this.ext = null; 364 } 365 } 366 367 372 public boolean isUTC() { 373 return (utc != null); 374 } 375 376 381 public void setUTC(Boolean utc) { 382 this.utc = (utc.booleanValue()) ? utc : null; 383 } 384 385 390 public void setUTC(boolean utc) { 391 setUTC(new Boolean (utc)); 392 } 393 394 395 400 public Boolean getUTC() { 401 if (utc == null || !utc.booleanValue()) { 402 return null; 403 } 404 return utc; 405 } 406 407 412 public boolean isSupportLargeObjs() { 413 return (supportLargeObjs != null); 414 } 415 416 422 public void setSupportLargeObjs(Boolean supportLargeObjs) { 423 this.supportLargeObjs = (supportLargeObjs.booleanValue()) ? 424 supportLargeObjs : 425 null 426 ; 427 } 428 429 435 public void setSupportLargeObjs(boolean supportLargeObjs) { 436 setSupportLargeObjs(new Boolean (supportLargeObjs)); 437 } 438 439 444 public Boolean getSupportLargeObjs() { 445 if (supportLargeObjs == null || !supportLargeObjs.booleanValue()) { 446 return null; 447 } 448 return supportLargeObjs; 449 } 450 451 456 public boolean isSupportNumberOfChanges() { 457 return (supportNumberOfChanges != null); 458 } 459 460 466 public void setSupportNumberOfChanges(Boolean supportNumberOfChanges) { 467 this.supportNumberOfChanges = (supportNumberOfChanges.booleanValue()) ? 468 supportNumberOfChanges : 469 null 470 ; 471 } 472 473 479 public void setSupportNumberOfChanges(boolean supportNumberOfChanges) { 480 setSupportNumberOfChanges(new Boolean (supportNumberOfChanges)); 481 } 482 483 488 public Boolean getSupportNumberOfChanges() { 489 if (supportNumberOfChanges == null || !supportNumberOfChanges.booleanValue()) { 490 return null; 491 } 492 return supportNumberOfChanges; 493 } 494 } 495 | Popular Tags |