Produced by Araxis Merge on 12/5/2017 12:06:38 PM Central Standard 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 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\CoreValueObjects\main\src\java\gov\va\med\imaging\exchange\business\storage | StorageServerDatabaseConfiguration.java | Mon Dec 4 21:35:18 2017 UTC |
| 2 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\CoreValueObjects\main\src\java\gov\va\med\imaging\exchange\business\storage | StorageServerDatabaseConfiguration.java | Mon Dec 4 21:58:53 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 912 |
| 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 | * | |
| 3 | Package: MAG - Vis tA Imaging | |
| 4 | WARNING: Per VHA D irective 2 004-038, t his routin e should n ot be modi fied. | |
| 5 | Date Cre ated: Dec 01, 2007 | |
| 6 | Site Nam e: Washin gton OI Fi eld Office , Silver S pring, MD | |
| 7 | Developer:
|
|
| 8 | Descript ion: | |
| 9 | ||
| 10 | ;; +-------- ---------- ---------- ---------- ---------- ---------- ---------- + | |
| 11 | ;; Property of the US Government . | |
| 12 | ;; No permis sion to co py or redi stribute t his softwa re is give n. | |
| 13 | ;; Use of un released v ersions of this soft ware requi res the us er | |
| 14 | ;; to execu te a writt en test ag reement wi th the Vis tA Imaging | |
| 15 | ;; Developm ent Office of the De partment o f Veterans Affairs, | |
| 16 | ;; telephon e (301) 73 4-0100. | |
| 17 | ;; | |
| 18 | ;; The Food and Drug A dministrat ion classi fies this software a s | |
| 19 | ;; a Class I I medical device. A s such, it may not b e changed | |
| 20 | ;; in any wa y. Modifi cations to this soft ware may r esult in a n | |
| 21 | ;; adulterat ed medical device un der 21CFR8 20, the us e of which | |
| 22 | ;; is consid ered to be a violati on of US F ederal Sta tutes. | |
| 23 | ;; +-------- ---------- ---------- ---------- ---------- ---------- ---------- + | |
| 24 | ||
| 25 | */ | |
| 26 | package go v.va.med.i maging.exc hange.busi ness.stora ge; | |
| 27 | ||
| 28 | import gov .va.med.im aging.core .interface s.exceptio ns.Connect ionExcepti on; | |
| 29 | import gov .va.med.im aging.core .interface s.exceptio ns.MethodE xception; | |
| 30 | import gov .va.med.im aging.exch ange.busin ess.storag e.exceptio ns.Storage Configurat ionExcepti on; | |
| 31 | ||
| 32 | import jav a.util.Arr ayList; | |
| 33 | import jav a.util.Has hMap; | |
| 34 | import jav a.util.Lis t; | |
| 35 | import jav a.util.Map ; | |
| 36 | ||
| 37 | import org .apache.lo gging.log4 j.LogManag er; | |
| 38 | import org .apache.lo gging.log4 j.Logger; | |
| 39 | ||
| 40 | public cla ss Storage ServerData baseConfig uration | |
| 41 | { | |
| 42 | pr ivate stat ic Storage ServerData baseConfig uration st orageServe rConfigura tion = nul l; | |
| 43 | fi nal Logger logger = LogManager .getLogger (StorageSe rverDataba seConfigur ation.clas s); | |
| 44 | ||
| 45 | pr ivate stat ic Provide rFactory p roviderFac tory; | |
| 46 | pr ivate stat ic Configu rationData Source dat aSource; | |
| 47 | pr ivate stat ic Storage ServerData baseConfig uration co nfig; | |
| 48 | ||
| 49 | pu blic stati c void set ProviderFa ctory(Prov iderFactor y provider Factory) | |
| 50 | { | |
| 51 | Stor ageServerD atabaseCon figuration .providerF actory = p roviderFac tory; | |
| 52 | } | |
| 53 | ||
| 54 | pu blic stati c void set Configurat ionDataSou rce(Config urationDat aSource da taSource) | |
| 55 | { | |
| 56 | Stor ageServerD atabaseCon figuration .dataSourc e = dataSo urce; | |
| 57 | } | |
| 58 | ||
| 59 | pu blic stati c StorageS erverDatab aseConfigu ration get Configurat ion() | |
| 60 | { | |
| 61 | if ( config == null) | |
| 62 | { | |
| 63 | config = dataSou rce.getCon figuration FromDataSo urce(provi derFactory ); | |
| 64 | } | |
| 65 | retu rn config; | |
| 66 | } | |
| 67 | ||
| 68 | pu blic Stora geServerDa tabaseConf iguration( ) | |
| 69 | { | |
| 70 | } | |
| 71 | ||
| 72 | // Configura tion entit y lists | |
| 73 | pr ivate List <ArtifactD escriptor> artifactD escriptors ; | |
| 74 | pr ivate List <Retention Policy> re tentionPol icies; | |
| 75 | pr ivate List <Retention PolicyProv iderMappin g> retenti onPolicyPr oviderMapp ings; | |
| 76 | pr ivate List <Provider> providers ; | |
| 77 | pr ivate List <ProviderA vailabilit y> provide rAvailabil ityTimes; | |
| 78 | pr ivate List <Place> pl aces; | |
| 79 | pr ivate List <NetworkLo cationInfo > networkL ocations; | |
| 80 | ||
| 81 | // "Indexes" | |
| 82 | pr ivate Map< String, Ar tifactDesc riptor> ar tifactDesc riptorInde xByTypeAnd Format; | |
| 83 | pr ivate Map< Integer, A rtifactDes criptor> a rtifactDes criptorInd exById; | |
| 84 | pr ivate Map< Integer, R etentionPo licy> rete ntionPolic yIndexById ; | |
| 85 | pr ivate Map< Integer, P rovider> p roviderInd exById; | |
| 86 | pr ivate Map< Integer, P lace> plac eIndexById ; | |
| 87 | pr ivate Map< String, Pl ace> place IndexBySit eNumber; | |
| 88 | pr ivate Map< Integer, N etworkLoca tionInfo> networkLoc ationIndex ByIen; | |
| 89 | ||
| 90 | pr ivate List <String> v alidationE rrors = ne w ArrayLis t<String>( ); | |
| 91 | pr ivate bool ean isInit ialized = false; | |
| 92 | ||
| 93 | pu blic boole an isIniti alized() | |
| 94 | { | |
| 95 | retu rn isIniti alized; | |
| 96 | } | |
| 97 | ||
| 98 | pu blic boole an isValid () | |
| 99 | { | |
| 100 | retu rn (valida tionErrors .size() == 0); | |
| 101 | } | |
| 102 | ||
| 103 | pu blic List< String> ge tValidatio nErrors() | |
| 104 | { | |
| 105 | retu rn validat ionErrors; | |
| 106 | } | |
| 107 | ||
| 108 | pu blic Artif actDescrip tor getArt ifactDescr iptorByTyp eAndFormat (String ty pe, String format) | |
| 109 | { | |
| 110 | retu rn artifac tDescripto rIndexByTy peAndForma t.get(getA rtifactDes criptorInd exKey(type , format)) ; | |
| 111 | } | |
| 112 | ||
| 113 | pu blic Artif actDescrip tor getArt ifactDescr iptorById( int id) | |
| 114 | { | |
| 115 | retu rn artifac tDescripto rIndexById .get(id); | |
| 116 | } | |
| 117 | ||
| 118 | pu blic Reten tionPolicy getRetent ionPolicyB yId(int id ) | |
| 119 | { | |
| 120 | retu rn retenti onPolicyIn dexById.ge t(id); | |
| 121 | } | |
| 122 | ||
| 123 | pu blic Provi der getPro viderById( int id) | |
| 124 | { | |
| 125 | retu rn provide rIndexById .get(id); | |
| 126 | } | |
| 127 | ||
| 128 | pu blic Place getPlace( int placeI d) | |
| 129 | { | |
| 130 | retu rn this.pl aceIndexBy Id.get(pla ceId); | |
| 131 | } | |
| 132 | ||
| 133 | pu blic Netwo rkLocation Info getNe tworkLocat ion(int ne tworkLocat ionIen){ | |
| 134 | retu rn this.ne tworkLocat ionIndexBy Ien.get(ne tworkLocat ionIen); | |
| 135 | } | |
| 136 | ||
| 137 | pu blic Place getPlace( String sit eNumber) | |
| 138 | { | |
| 139 | retu rn this.pl aceIndexBy SiteNumber .get(siteN umber); | |
| 140 | } | |
| 141 | ||
| 142 | pu blic synch ronized vo id initial izeConfigu ration( | |
| 143 | Provid erFactory providerFa ctory, | |
| 144 | List<A rtifactDes criptor> a rtifactDes criptors, | |
| 145 | List<R etentionPo licy> rete ntionPolic ies, | |
| 146 | List<R etentionPo licyProvid erMapping> retention PolicyProv iderMappin gs, | |
| 147 | List<P rovider> p roviders, | |
| 148 | List<P roviderAva ilability> providerA vailabilit yTimes, | |
| 149 | List<P lace> plac es, | |
| 150 | List<N etworkLoca tionInfo> networkLoc ations) th rows Stora geConfigur ationExcep tion | |
| 151 | ||
| 152 | { | |
| 153 | // S et the var iables and create in dexes | |
| 154 | this .places = places; | |
| 155 | crea tePlaceInd exById(); | |
| 156 | crea tePlaceInd exBySiteNu mber(); | |
| 157 | ||
| 158 | this .networkLo cations = networkLoc ations; | |
| 159 | crea teNetworkL ocationInd exByIen(); | |
| 160 | ||
| 161 | this .artifactD escriptors = artifac tDescripto rs; | |
| 162 | crea teArtifact Descriptor IndexByTyp eAndFormat (); | |
| 163 | crea teArtifact Descriptor IndexById( ); | |
| 164 | ||
| 165 | this .retention Policies = retention Policies; | |
| 166 | crea teRetentio nPolicyInd exById(); | |
| 167 | ||
| 168 | crea teAndSortP roviderLis t(provider Factory, p roviders); | |
| 169 | crea teProvider IndexById( ); | |
| 170 | ||
| 171 | this .retention PolicyProv iderMappin gs = reten tionPolicy ProviderMa ppings; | |
| 172 | this .providerA vailabilit yTimes = p roviderAva ilabilityT imes; | |
| 173 | ||
| 174 | // | |
| 175 | // L ink up the objects i nto a conn ected obje ct graph | |
| 176 | // | |
| 177 | link ArtifactDe scriptorsT oRetention Policies() ; | |
| 178 | link RetentionP olicyProvi derMapping s(); | |
| 179 | link ProviderAn dProviderA vailabilit y(); | |
| 180 | ||
| 181 | // | |
| 182 | // V alidate th e configur ation | |
| 183 | // | |
| 184 | vali dateStorag eConfig(); | |
| 185 | ||
| 186 | isIn itialized = true; | |
| 187 | ||
| 188 | } | |
| 189 | ||
| 190 | pr ivate void createAnd SortProvid erList(Pro viderFacto ry provide rFactory, List<Provi der> baseP roviders) throws St orageConfi gurationEx ception | |
| 191 | { | |
| 192 | List <Provider> primarySt orageProvi ders = new ArrayList <Provider> (); | |
| 193 | List <Provider> archiveOn lyProvider s = new Ar rayList<Pr ovider>(); | |
| 194 | ||
| 195 | // S ort the pr oviders, a nd create their subc lasses | |
| 196 | for (Provider provider : baseProvi ders) | |
| 197 | { | |
| 198 | // Lin k the prov ider to a Place | |
| 199 | Place place = pl aceIndexBy Id.get(pro vider.getP laceId()); | |
| 200 | provid er.setPlac e(place); | |
| 201 | ||
| 202 | if (pr ovider.isP rimaryStor age()) | |
| 203 | { | |
| 204 | primaryS torageProv iders.add( providerFa ctory.crea teProvider (provider) ); | |
| 205 | } | |
| 206 | else | |
| 207 | { | |
| 208 | archiveO nlyProvide rs.add(pro viderFacto ry.createP rovider(pr ovider)); | |
| 209 | } | |
| 210 | } | |
| 211 | ||
| 212 | // C lear the c urrent pro vider list , and stor e the conf igured pro viders in primary st orage firs t order. | |
| 213 | prov iders = ne w ArrayLis t<Provider >(); | |
| 214 | prov iders.addA ll(primary StoragePro viders); | |
| 215 | prov iders.addA ll(archive OnlyProvid ers); | |
| 216 | ||
| 217 | // L ink each p rovider to its place record | |
| 218 | ||
| 219 | } | |
| 220 | ||
| 221 | pr ivate void createArt ifactDescr iptorIndex ByTypeAndF ormat() | |
| 222 | { | |
| 223 | arti factDescri ptorIndexB yTypeAndFo rmat = new HashMap<S tring, Art ifactDescr iptor>(); | |
| 224 | for (ArtifactD escriptor descriptor : artifac tDescripto rs) | |
| 225 | { | |
| 226 | String key = get ArtifactDe scriptorIn dexKey(des criptor); | |
| 227 | artifa ctDescript orIndexByT ypeAndForm at.put(key , descript or); | |
| 228 | } | |
| 229 | } | |
| 230 | ||
| 231 | pr ivate void createArt ifactDescr iptorIndex ById() | |
| 232 | { | |
| 233 | arti factDescri ptorIndexB yId = new HashMap<In teger, Art ifactDescr iptor>(); | |
| 234 | for (ArtifactD escriptor descriptor : artifac tDescripto rs) | |
| 235 | { | |
| 236 | String key = get ArtifactDe scriptorIn dexKey(des criptor); | |
| 237 | artifa ctDescript orIndexByI d.put(new Integer(de scriptor.g etId()), d escriptor) ; | |
| 238 | } | |
| 239 | } | |
| 240 | ||
| 241 | pr ivate void createRet entionPoli cyIndexByI d() | |
| 242 | { | |
| 243 | rete ntionPolic yIndexById = new Has hMap<Integ er, Retent ionPolicy> (); | |
| 244 | for (Retention Policy ret entionPoli cy: retent ionPolicie s) | |
| 245 | { | |
| 246 | retent ionPolicyI ndexById.p ut(new Int eger(reten tionPolicy .getId()), retention Policy); | |
| 247 | } | |
| 248 | } | |
| 249 | ||
| 250 | pr ivate void createPro viderIndex ById() | |
| 251 | { | |
| 252 | prov iderIndexB yId = new HashMap<In teger, Pro vider>(); | |
| 253 | for (Provider provider: providers) | |
| 254 | { | |
| 255 | provid erIndexByI d.put(new Integer(pr ovider.get Id()), pro vider); | |
| 256 | } | |
| 257 | } | |
| 258 | ||
| 259 | pr ivate void createPla ceIndexByI d() | |
| 260 | { | |
| 261 | plac eIndexById = new Has hMap<Integ er, Place> (); | |
| 262 | for (Place pla ce: places ) | |
| 263 | { | |
| 264 | placeI ndexById.p ut(new Int eger(place .getId()), place); | |
| 265 | } | |
| 266 | } | |
| 267 | ||
| 268 | pr ivate void createPla ceIndexByS iteNumber( ) | |
| 269 | { | |
| 270 | plac eIndexBySi teNumber = new HashM ap<String, Place>(); | |
| 271 | for (Place pla ce: places ) | |
| 272 | { | |
| 273 | placeI ndexBySite Number.put (place.get SiteNumber (), place) ; | |
| 274 | } | |
| 275 | } | |
| 276 | ||
| 277 | pr ivate void createNet workLocati onIndexByI en() | |
| 278 | { | |
| 279 | netw orkLocatio nIndexByIe n = new Ha shMap<Inte ger, Netwo rkLocation Info>(); | |
| 280 | for (NetworkLo cationInfo networkLo cation: ne tworkLocat ions) | |
| 281 | { | |
| 282 | networ kLocationI ndexByIen. put(new In teger(netw orkLocatio n.getNetwo rkLocation IEN()), ne tworkLocat ion); | |
| 283 | } | |
| 284 | } | |
| 285 | ||
| 286 | pr ivate void linkArtif actDescrip torsToRete ntionPolic ies() | |
| 287 | { | |
| 288 | for (ArtifactD escriptor descriptor : artifac tDescripto rs) | |
| 289 | { | |
| 290 | Retent ionPolicy intrinsicR etentionPo licy = ret entionPoli cyIndexByI d.get(new Integer(de scriptor.g etRetentio nPolicyId( ))); | |
| 291 | descri ptor.setRe tentionPol icy(intrin sicRetenti onPolicy); | |
| 292 | } | |
| 293 | } | |
| 294 | pr ivate void linkReten tionPolicy ProviderMa ppings() | |
| 295 | { | |
| 296 | // L ink to cor rect reten tionPolicy , Provider , and Plac e | |
| 297 | for (Retention PolicyProv iderMappin g mapping : retentio nPolicyPro viderMappi ngs) | |
| 298 | { | |
| 299 | Retent ionPolicy retentionP olicy = re tentionPol icyIndexBy Id.get(new Integer(m apping.get RetentionP olicyId()) ); | |
| 300 | mappin g.setReten tionPolicy (retention Policy); | |
| 301 | retent ionPolicy. getRetenti onPolicyPr oviderMapp ings().add (mapping); | |
| 302 | ||
| 303 | Provid er provide r = provid erIndexByI d.get(mapp ing.getPro viderId()) ; | |
| 304 | mappin g.setProvi der(provid er); | |
| 305 | ||
| 306 | Place place = pl aceIndexBy Id.get(map ping.getPl aceId()); | |
| 307 | mappin g.setPlace (place); | |
| 308 | ||
| 309 | } | |
| 310 | } | |
| 311 | pr ivate void linkProvi derAndProv iderAvaila bility() | |
| 312 | { | |
| 313 | // L ink the pr oviderAvai lability t o the corr ect provid er and pla ce | |
| 314 | for (ProviderA vailabilit y availabi lity : pro viderAvail abilityTim es) | |
| 315 | { | |
| 316 | Provid er provide r = provid erIndexByI d.get(new Integer(av ailability .getProvid erId())); | |
| 317 | availa bility.set Provider(p rovider); | |
| 318 | provid er.addProv iderAvaila bility(ava ilability) ; | |
| 319 | ||
| 320 | Place place = pl aceIndexBy Id.get(ava ilability. getPlaceId ()); | |
| 321 | availa bility.set Place(plac e); | |
| 322 | ||
| 323 | } | |
| 324 | ||
| 325 | } | |
| 326 | ||
| 327 | pr ivate List <String> v alidateSto rageConfig () | |
| 328 | { | |
| 329 | vali dationErro rs = new A rrayList<S tring>(); | |
| 330 | ||
| 331 | // C heck to ma ke sure no artifact descriptor s have nul l retentio n policies | |
| 332 | for (ArtifactD escriptor descriptor : artifac tDescripto rs) | |
| 333 | { | |
| 334 | if (de scriptor.g etRetentio nPolicy() == null) | |
| 335 | { | |
| 336 | validati onErrors.a dd("Artifa ctDescript or with Id '" + desc riptor.get Id() + "' has no Ret entionPoli cy assigne d."); | |
| 337 | } | |
| 338 | } | |
| 339 | ||
| 340 | // C heck Reten tionPolicy ProviderMa ppings hav e null pla ces | |
| 341 | for (Retention PolicyProv iderMappin g mapping : retentio nPolicyPro viderMappi ngs) | |
| 342 | { | |
| 343 | if (ma pping.getP laceId() = = 0) | |
| 344 | { | |
| 345 | validati onErrors.a dd("Retent ionPolicyP roviderMap ping with Id '" + ma pping.getI d() + "' h as no assi gned Place Id."); | |
| 346 | } | |
| 347 | } | |
| 348 | ||
| 349 | // C heck Provi ders have null place s | |
| 350 | for (Provider provider : providers ) | |
| 351 | { | |
| 352 | if (pr ovider.get PlaceId() == 0) | |
| 353 | { | |
| 354 | validati onErrors.a dd("Provid er with Id '" + prov ider.getId () + "' ha s no assig ned PlaceI d."); | |
| 355 | } | |
| 356 | } | |
| 357 | ||
| 358 | // C heck Provi derAvailab ilities ha ve null pl aces | |
| 359 | for (ProviderA vailabilit y availabi lity : pro viderAvail abilityTim es) | |
| 360 | { | |
| 361 | if (av ailability .getPlaceI d() == 0) | |
| 362 | { | |
| 363 | validati onErrors.a dd("Provid erAvailabi lity with Id '" + av ailability .getId() + "' has no assigned PlaceId.") ; | |
| 364 | } | |
| 365 | } | |
| 366 | ||
| 367 | // C heck to ma ke sure re tention po licies are met by th e assigned providers /mappings, and that at least | |
| 368 | // o ne provide r will by called syn chronously | |
| 369 | for (Retention Policy ret entionPoli cy : reten tionPolici es) | |
| 370 | { | |
| 371 | int nu mArchivePr oviders = 0; | |
| 372 | int nu mOffsitePr oviders = 0; | |
| 373 | boolea n atLeastO neSynchron ousProvide r = false; | |
| 374 | ||
| 375 | for(Re tentionPol icyProvide rMapping m apping : r etentionPo licyProvid erMappings ) | |
| 376 | { | |
| 377 | if (mapp ing.getPro vider().is Archive()) | |
| 378 | numArchive Providers+ +; | |
| 379 | ||
| 380 | if (mapp ing.isOffs ite()) | |
| 381 | numOffsite Providers+ +; | |
| 382 | ||
| 383 | if (mapp ing.isSync hronous()) | |
| 384 | atLeastOne Synchronou sProvider = true; | |
| 385 | } | |
| 386 | ||
| 387 | if (nu mArchivePr oviders < retentionP olicy.getM inimumArch iveCopies( )) | |
| 388 | { | |
| 389 | StringBu ffer buffe r = new St ringBuffer (); | |
| 390 | buffer.a ppend("Ret entionPoli cy with Id " + reten tionPolicy + " requi res at lea st "); | |
| 391 | buffer.a ppend(rete ntionPolic y.getMinim umArchiveC opies() + " archive copies, bu t is"); | |
| 392 | buffer.a ppend(" on ly configu red with " + numArch iveProvide rs + " arc hive provi ders."); | |
| 393 | validati onErrors.a dd(buffer. toString() ); | |
| 394 | } | |
| 395 | ||
| 396 | if (nu mOffsitePr oviders < retentionP olicy.getM inimumOffs iteCopies( )) | |
| 397 | { | |
| 398 | StringBu ffer buffe r = new St ringBuffer (); | |
| 399 | buffer.a ppend("Ret entionPoli cy with Id " + reten tionPolicy + " requi res at lea st "); | |
| 400 | buffer.a ppend(rete ntionPolic y.getMinim umOffsiteC opies() + " offsite copies, bu t is"); | |
| 401 | buffer.a ppend(" on ly configu red with " + numOffs iteProvide rs + " off site provi ders."); | |
| 402 | validati onErrors.a dd(buffer. toString() ); | |
| 403 | } | |
| 404 | ||
| 405 | if (!a tLeastOneS ynchronous Provider) | |
| 406 | { | |
| 407 | StringBu ffer buffe r = new St ringBuffer (); | |
| 408 | buffer.a ppend("Ret entionPoli cy with Id " + reten tionPolicy + " has n o synchron ous provid ers assign ed."); | |
| 409 | validati onErrors.a dd(buffer. toString() ); | |
| 410 | } | |
| 411 | } | |
| 412 | ||
| 413 | retu rn validat ionErrors; | |
| 414 | } | |
| 415 | ||
| 416 | pr ivate Stri ng getArti factDescri ptorIndexK ey(Artifac tDescripto r descript or) | |
| 417 | { | |
| 418 | retu rn getArti factDescri ptorIndexK ey(descrip tor.getArt ifactType( ), descrip tor.getArt ifactForma t()); | |
| 419 | } | |
| 420 | ||
| 421 | pr ivate Stri ng getArti factDescri ptorIndexK ey(String type, Stri ng format) | |
| 422 | { | |
| 423 | retu rn type + "_" + form at; | |
| 424 | } | |
| 425 | ||
| 426 | pu blic List< ArtifactIn stanceProv iderPair> getProvide rsForRetri eval(Artif act artifa ct) throws MethodExc eption, Co nnectionEx ception | |
| 427 | { | |
| 428 | List <ArtifactI nstancePro viderPair> artifactI nstancePro viderPairs = new Arr ayList<Art ifactInsta nceProvide rPair>(); | |
| 429 | ||
| 430 | // G et the art ifactInsta nces for t his artifa ct | |
| 431 | for (Provider provider : providers ) | |
| 432 | { | |
| 433 | for (A rtifactIns tance inst ance : art ifact.getA rtifactIns tances()) | |
| 434 | { | |
| 435 | if (prov ider.canRe trieveFrom ArtifactIn stance(ins tance)) | |
| 436 | { | |
| 437 | artifactIn stanceProv iderPairs. add(new Ar tifactInst anceProvid erPair(pro vider, ins tance)); | |
| 438 | } | |
| 439 | } | |
| 440 | } | |
| 441 | ||
| 442 | retu rn artifac tInstanceP roviderPai rs; | |
| 443 | } | |
| 444 | ||
| 445 | pu blic Provi der getPri maryStorag eProviderF orSite(Str ing siteNu mber) | |
| 446 | { | |
| 447 | for (Provider provider : providers ) | |
| 448 | { | |
| 449 | if (si teNumber.e quals(prov ider.getPl ace().getS iteNumber( )) && prov ider.isPri maryStorag e()) | |
| 450 | { | |
| 451 | return p rovider; | |
| 452 | } | |
| 453 | } | |
| 454 | ||
| 455 | retu rn null; | |
| 456 | } | |
| 457 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.