Produced by Araxis Merge on 6/11/2019 10:54:13 AM Eastern 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.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | HTRE_P3_v14.5_iter_4_build_14.zip\java\gov\va\med\fw\model | ConfigurableModelProperties.java | Wed May 29 15:26:00 2019 UTC |
| 2 | HTRE_P3_v14.5_iter_4_build_14.zip\java\gov\va\med\fw\model | ConfigurableModelProperties.java | Mon Jun 10 19:30:05 2019 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 412 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| 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 |
No regular expressions were active.
| 1 | /********* ********** ********** ********** ********** ********** ********* | |
| 2 | * Copyrii ght 2006 V HA. All ri ghts reser ved | |
| 3 | ********* ********** ********** ********** ********** ********** *********/ | |
| 4 | ||
| 5 | package go v.va.med.f w.model; | |
| 6 | ||
| 7 | import jav a.util.Set ; | |
| 8 | ||
| 9 | import gov .va.med.fw .service.A bstractCom ponent; | |
| 10 | ||
| 11 | /** | |
| 12 | * Generic object th at encapsu lates conf igurable m odel prope rties (can be used | |
| 13 | * for any need). Ex amples are propertie s that are used for identities , | |
| 14 | * propert ies that a re used fo r copying, etc. | |
| 15 | * | |
| 16 | * <p> | |
| 17 | * No-args construct or allows all proper ties to be used in | |
| 18 | * ModelPr opertiesMa nager. | |
| 19 | * | |
| 20 | * Created Mar 13, 2 006 2:22:5 1 PM | |
| 21 | * | |
| 22 | * @author DNS DN S
|
|
| 23 | */ | |
| 24 | public cla ss Configu rableModel Properties extends A bstractCom ponent { | |
| 25 | pr ivate Set inclusions ; | |
| 26 | ||
| 27 | pr ivate Set exclusions ; | |
| 28 | ||
| 29 | pr ivate Conf igurableMo delPropert ies global Properties ; | |
| 30 | ||
| 31 | pr ivate bool ean inheri tAncestors Properties = true; / / default | |
| 32 | ||
| 33 | pu blic Confi gurableMod elProperti es() { | |
| 34 | supe r(); | |
| 35 | } | |
| 36 | ||
| 37 | pu blic Confi gurableMod elProperti es(Configu rableModel Properties globalPro perties) { | |
| 38 | setG lobalPrope rties(glob alProperti es); | |
| 39 | } | |
| 40 | ||
| 41 | pu blic void addInclusi ons(Set in ) { | |
| 42 | if ( in == null || in.isE mpty()) | |
| 43 | return ; | |
| 44 | ||
| 45 | if ( this.inclu sions != n ull) | |
| 46 | this.i nclusions. addAll(in) ; | |
| 47 | else | |
| 48 | this.i nclusions = in; | |
| 49 | } | |
| 50 | ||
| 51 | pu blic void addExclusi ons(Set in ) { | |
| 52 | if ( in == null || in.isE mpty()) | |
| 53 | return ; | |
| 54 | ||
| 55 | if ( this.exclu sions != n ull) | |
| 56 | this.e xclusions. addAll(in) ; | |
| 57 | else | |
| 58 | this.e xclusions = in; | |
| 59 | } | |
| 60 | ||
| 61 | /* * | |
| 62 | * @return R eturns the exclusion s. | |
| 63 | * / | |
| 64 | pu blic Set g etExclusio ns() { | |
| 65 | retu rn exclusi ons; | |
| 66 | } | |
| 67 | ||
| 68 | /* * | |
| 69 | * @param ex clusions | |
| 70 | * The excl usions to set. | |
| 71 | * / | |
| 72 | pu blic void setExclusi ons(Set ex clusions) { | |
| 73 | this .exclusion s = exclus ions; | |
| 74 | } | |
| 75 | ||
| 76 | /* * | |
| 77 | * @return R eturns the inclusion s. | |
| 78 | * / | |
| 79 | pu blic Set g etInclusio ns() { | |
| 80 | retu rn inclusi ons; | |
| 81 | } | |
| 82 | ||
| 83 | /* * | |
| 84 | * @param in clusions | |
| 85 | * The incl usions to set. | |
| 86 | * / | |
| 87 | pu blic void setInclusi ons(Set in clusions) { | |
| 88 | this .inclusion s = inclus ions; | |
| 89 | } | |
| 90 | ||
| 91 | pu blic boole an contain sInclusion s() { | |
| 92 | retu rn inclusi ons == nul l || inclu sions.size () == 0 ? false : tr ue; | |
| 93 | } | |
| 94 | ||
| 95 | pu blic boole an contain sExclusion s() { | |
| 96 | retu rn exclusi ons == nul l || exclu sions.size () == 0 ? false : tr ue; | |
| 97 | } | |
| 98 | ||
| 99 | pu blic boole an isPrope rtySpecifi ed(String propertyNa me) { | |
| 100 | retu rn isPrope rtySpecifi edForInclu sion(prope rtyName) | |
| 101 | || isPro pertySpeci fiedForExc lusion(pro pertyName) ; | |
| 102 | } | |
| 103 | ||
| 104 | pu blic void allowAllPr operties() { | |
| 105 | incl usions = n ull; | |
| 106 | excl usions = n ull; | |
| 107 | glob alProperti es = new C onfigurabl eModelProp erties(); | |
| 108 | } | |
| 109 | ||
| 110 | pu blic void rejectAllP roperties( ) { | |
| 111 | incl usions = n ull; | |
| 112 | excl usions = n ull; | |
| 113 | glob alProperti es = null; | |
| 114 | } | |
| 115 | ||
| 116 | pu blic boole an isPrope rtySpecifi edForInclu sion(Strin g property Name) { | |
| 117 | bool ean wasSpe cified = f alse; | |
| 118 | if ( containsIn clusions() ) | |
| 119 | wasSpe cified = i nclusions. contains(p ropertyNam e); | |
| 120 | retu rn wasSpec ified; | |
| 121 | } | |
| 122 | ||
| 123 | pu blic boole an isPrope rtySpecifi edForExclu sion(Strin g property Name) { | |
| 124 | bool ean wasSpe cified = f alse; | |
| 125 | if ( containsEx clusions() ) | |
| 126 | wasSpe cified = e xclusions. contains(p ropertyNam e); | |
| 127 | retu rn wasSpec ified; | |
| 128 | } | |
| 129 | ||
| 130 | /* * | |
| 131 | * If at lea st one ite m is speci fied for i nclusions, then it i s by defau lt | |
| 132 | * explicit mode. Same goes for exclusions . | |
| 133 | * | |
| 134 | * <p> | |
| 135 | * Configure d Inclusio ns take pr iority ove r configur ed Exclusi ons. | |
| 136 | * / | |
| 137 | pu blic boole an shouldI nclude(Str ing proper tyName) { | |
| 138 | if ( containsIn clusions() ) | |
| 139 | if (is PropertySp ecifiedFor Inclusion( propertyNa me)) | |
| 140 | return t rue; | |
| 141 | ||
| 142 | if ( containsEx clusions() ) | |
| 143 | if (is PropertySp ecifiedFor Exclusion( propertyNa me)) | |
| 144 | return f alse; | |
| 145 | ||
| 146 | // i f there is no one el se to defe r to.... | |
| 147 | if ( globalProp erties == null) | |
| 148 | return false; | |
| 149 | ||
| 150 | // o nly deal w ith global if did no t override or act ex plitictly | |
| 151 | bool ean result = true; | |
| 152 | if ( !isPropert ySpecified (propertyN ame)) { | |
| 153 | boolea n globalDe cision = g lobalPrope rties.shou ldInclude( propertyNa me); | |
| 154 | result = globalD ecision; | |
| 155 | // if global dec ided becau se it did not know a bout this. ..then go | |
| 156 | // bac k to this class's de cision | |
| 157 | if (!g lobalDecis ion && !gl obalProper ties.isPro pertySpeci fied(prope rtyName)) { | |
| 158 | if (cont ainsInclus ions() && !isPropert ySpecified ForInclusi on(propert yName)) | |
| 159 | result = f alse; | |
| 160 | else if (containsE xclusions( ) && !isPr opertySpec ifiedForEx clusion(pr opertyName )) | |
| 161 | result = t rue; | |
| 162 | else | |
| 163 | result = t rue; // th e overall default if nothing i s | |
| 164 | // speci fied | |
| 165 | } | |
| 166 | } | |
| 167 | ||
| 168 | retu rn result; | |
| 169 | } | |
| 170 | ||
| 171 | /* * | |
| 172 | * @return R eturns the globalPro perties. | |
| 173 | * / | |
| 174 | pu blic Confi gurableMod elProperti es getGlob alProperti es() { | |
| 175 | retu rn globalP roperties; | |
| 176 | } | |
| 177 | ||
| 178 | /* * | |
| 179 | * @param gl obalProper ties | |
| 180 | * The glob alProperti es to set. | |
| 181 | * / | |
| 182 | pu blic void setGlobalP roperties( Configurab leModelPro perties gl obalProper ties) { | |
| 183 | this .globalPro perties = globalProp erties; | |
| 184 | } | |
| 185 | ||
| 186 | /* * | |
| 187 | * @return R eturns the inheritAn cestorsPro perties. | |
| 188 | * / | |
| 189 | pu blic boole an isInher itAncestor sPropertie s() { | |
| 190 | retu rn inherit AncestorsP roperties; | |
| 191 | } | |
| 192 | ||
| 193 | /* * | |
| 194 | * @param in heritAnces torsProper ties | |
| 195 | * The inhe ritAncesto rsProperti es to set. | |
| 196 | * / | |
| 197 | pu blic void setInherit AncestorsP roperties( boolean in heritAnces torsProper ties) { | |
| 198 | this .inheritAn cestorsPro perties = inheritAnc estorsProp erties; | |
| 199 | } | |
| 200 | ||
| 201 | /* * | |
| 202 | * @return R eturns the inheritAn cestorsPro perties. | |
| 203 | * / | |
| 204 | pu blic boole an isInher itAncestor sConfigura tion(Strin g property Name) { | |
| 205 | retu rn inherit AncestorsP roperties && !isProp ertySpecif ied(proper tyName); | |
| 206 | } | |
| 207 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.