406. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 5/10/2018 8:27:07 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

406.1 Files compared

# Location File Last Modified
1 OSCIF MHED P3 Annie.zip\cms-vet-app-release-v4.0.1@103ac3fb628.zip\automation_phase_3\src\main\java\com\agilex\annie\framework\dataModels VeteranUserModel.java Wed Mar 21 18:37:29 2018 UTC
2 OSCIF MHED P3 Annie.zip\cms-vet-app-release-v4.0.1@103ac3fb628.zip\automation_phase_3\src\main\java\com\agilex\annie\framework\dataModels VeteranUserModel.java Wed May 9 13:09:45 2018 UTC

406.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 232
Changed 2 4
Inserted 0 0
Removed 0 0

406.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

406.4 Active regular expressions

No regular expressions were active.

406.5 Comparison detail

  1   package co m.agilex.a nnie.frame work.dataM odels;
  2  
  3   import jav a.text.Dat eFormat;
  4   import jav a.text.Par seExceptio n;
  5   import jav a.text.Sim pleDateFor mat;
  6   import jav a.util.Cal endar;
  7  
  8   public cla ss Veteran UserModel  {
  9           pr ivate Stri ng usernam e, passwor d, firstNa me, middle Name, last Name, dob,  age, mobi lePhone, g ender, ssn ;
  10  
  11       // Con structor t hat only s ets login  info
  12       public  VeteranUs erModel(St ring newUs ername, St ring newPa ssword) {
  13           se tUsername( newUsernam e);
  14           se tPassword( newPasswor d);
  15       }
  16  
  17       // Ful l construc tor
  18       public  VeteranUs erModel(St ring newUs ername, St ring newPa ssword, St ring newFi rstName, S tring newM iddleName,  String ne wLastName,  String ne wDob, Stri ng newMobi lePhone, S tring newG ender, Str ing newSsn ) {
  19           se tUsername( newUsernam e);
  20           se tPassword( newPasswor d);
  21           se tFirstName (newFirstN ame);
  22           se tMiddleNam e(newMiddl eName);
  23           se tLastName( newLastNam e);
  24           se tDob(newDo b);
  25           se tAge(calcu lateAge(ne wDob));
  26           se tMobilePho ne(newMobi lePhone);
  27           se tGender(ne wGender);
  28           se tSsn(newSs n);
  29       }
  30  
  31       // Cop y construc tor
  32       public  VeteranUs erModel(Ve teranUserM odel objec tToCopy) {
  33           se tUsername( objectToCo py.getUser name());
  34           se tPassword( objectToCo py.getPass word());
  35           se tFirstName (objectToC opy.getFir stName());
  36           se tMiddleNam e(objectTo Copy.getMi ddleName() );
  37           se tLastName( objectToCo py.getLast Name());
  38           se tDob(objec tToCopy.ge tDob());
  39           se tAge(objec tToCopy.ge tAge());
  40           se tMobilePho ne(objectT oCopy.getM obilePhone ());
  41           se tGender(ob jectToCopy .getGender ());
  42           se tSsn(objec tToCopy.ge tSsn());
  43       }
  44  
  45       public  String ge tUsername( ) { return  username;  }
  46  
  47         public voi d setUsern ame(String  newUserna me) {  V s ID                        }
  48  
  49       public  String ge tPassword( ) { return  password;  }
  50  
  51         public voi d setPassw ord(String  newPasswo rd) {  V s ID                        }
  52  
  53       public  String ge tFirstName () { retur n firstNam e; }
  54  
  55       public  void setF irstName(S tring newF irstName)  { firstNam e = newFir stName; }
  56  
  57       public  String ge tMiddleNam e() { retu rn middleN ame; }
  58  
  59       public  String ge tMiddleIni tial() {
  60           if (getMiddle Name().len gth() < 2)  { return  getMiddleN ame(); }
  61           el se { retur n middleNa me.substri ng(1); }
  62       }
  63  
  64       public  void setM iddleName( String new MiddleName ) { middle Name = new MiddleName ; }
  65  
  66       public  String ge tLastName( ) { return  lastName;  }
  67  
  68       public  void setL astName(St ring newLa stName) {  lastName =  newLastNa me; }
  69  
  70       public  String ge tDob() { r eturn dob;  }
  71  
  72       public  void setD ob(String  newDob) {  dob = newD ob; }
  73  
  74       public  String ge tAge() { r eturn age;  }
  75  
  76       public  void setA ge(String  newAge) {  age = newA ge; }
  77  
  78       public  void setA ge(int new Age) { age  = Integer .toString( newAge); }
  79  
  80       public  String ge tMobilePho ne() { ret urn mobile Phone; }
  81  
  82       public  void setM obilePhone (String ne wMobilePho ne) { mobi lePhone =  newMobileP hone; }
  83  
  84       public  String ge tGender()  { return g ender; }
  85  
  86       public  void setG ender(Stri ng newGend er) { gend er = newGe nder; }
  87  
  88       public  String ge tSsn() { r eturn ssn;  }
  89  
  90       public  void setS sn(String  newSsn) {  ssn = newS sn; }
  91  
  92       public  String ge tDisplayNa me() { ret urn String .format("% s, %s %s",  getLastNa me(), getF irstName() , getMiddl eInitial() ); }
  93  
  94  
  95       privat e int calc ulateAge(S tring date OfBirth) {
  96           in t age;
  97           St ring dobDa teFormat =  "MM/dd/yy yy";
  98           Da teFormat d obFormatti ng = new S impleDateF ormat(dobD ateFormat) ;
  99           Ca lendar dob Object = C alendar.ge tInstance( ), todayOb ject = Cal endar.getI nstance();
  100  
  101           //  Parse the  date of b irth
  102           tr y {
  103                dobObjec t.setTime( dobFormatt ing.parse( dateOfBirt h));
  104           }  catch(Pars eException  pe) {
  105                throw ne w RuntimeE xception(S tring.form at("Could  not parse  date \"%s\ ", expecte d format i s \"%s\"." , dateOfBi rth, dobDa teFormat)) ;
  106           }
  107  
  108           //  Calculate  the age
  109           ag e = todayO bject.get( Calendar.Y EAR) - dob Object.get (Calendar. YEAR);
  110           if (todayObje ct.get(Cal endar.MONT H) < dobOb ject.get(C alendar.MO NTH)) {
  111                age--;
  112           }  else if(to dayObject. get(Calend ar.MONTH)  == dobObje ct.get(Cal endar.MONT H) && toda yObject.ge t(Calendar .DAY_OF_MO NTH) < dob Object.get (Calendar. DAY_OF_MON TH)) {
  113                age--;
  114           }
  115  
  116           re turn age;
  117       }
  118   }