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\DataDictionaryRouter\main\src\java\gov\va\med\imaging\router\commands\dd\provider | DataDictionaryCommandContext.java | Mon Dec 4 21:35:28 2017 UTC |
| 2 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\DataDictionaryRouter\main\src\java\gov\va\med\imaging\router\commands\dd\provider | DataDictionaryCommandContext.java | Mon Dec 4 21:59:05 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 338 |
| Changed | 2 | 4 |
| 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: May 4, 2011 | |
| 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.rou ter.comman ds.dd.prov ider; | |
| 27 | ||
| 28 | import jav a.lang.ref lect.Metho d; | |
| 29 | ||
| 30 | import org .apache.lo gging.log4 j.LogManag er; | |
| 31 | import org .apache.lo gging.log4 j.Logger; | |
| 32 | ||
| 33 | import gov .va.med.Ro utingToken ; | |
| 34 | import gov .va.med.im aging.arti factsource .ResolvedA rtifactSou rce; | |
| 35 | import gov .va.med.im aging.core .interface s.Router; | |
| 36 | import gov .va.med.im aging.core .interface s.exceptio ns.Connect ionExcepti on; | |
| 37 | import gov .va.med.im aging.core .interface s.exceptio ns.MethodE xception; | |
| 38 | import gov .va.med.im aging.core .interface s.router.C ommandCont ext; | |
| 39 | import gov .va.med.im aging.core .interface s.router.C ommandFact ory; | |
| 40 | import gov .va.med.im aging.data source.Dat aDictionar yDataSourc eSpi; | |
| 41 | import gov .va.med.im aging.data source.Dat aSourcePro vider; | |
| 42 | import gov .va.med.im aging.data source.Sit eResolutio nDataSourc eSpi; | |
| 43 | import gov .va.med.im aging.data source.Tra nsactionLo ggerDataSo urceSpi; | |
| 44 | import gov .va.med.im aging.data source.Ver sionableDa taSourceSp i; | |
| 45 | import gov .va.med.im aging.exch ange.busin ess.Resolv edSite; | |
| 46 | ||
| 47 | /** | |
| 48 | * @author
|
|
| 49 | * | |
| 50 | */ | |
| 51 | public cla ss DataDic tionaryCom mandContex t | |
| 52 | implements CommandCo ntext | |
| 53 | { | |
| 54 | pr ivate fina l CommandC ontext com mandContex t; | |
| 55 | pr ivate fina l DataDict ionaryData SourceSpi dataDictio naryServic e; | |
| 56 | ||
| 57 | pu blic DataD ictionaryC ommandCont ext(Comman dContext c ommandCont ext) | |
| 58 | { | |
| 59 | LogM anager.get Logger(Dat aDictionar yCommandCo ntext.clas s).info("C reating ne w DataDict ionaryComm andContext instance" ); | |
| 60 | this .commandCo ntext = co mmandConte xt; | |
| 61 | Reso lvedArtifa ctSource r esolvedArt ifactSourc e = null; | |
| 62 | if(g etLocalSit e() != nul l) | |
| 63 | { | |
| 64 | try | |
| 65 | { | |
| 66 | resolved ArtifactSo urce = | |
| 67 | getSiteRes olver().re solveArtif actSource( getLocalSi te().getAr tifactSour ce().creat eRoutingTo ken()); | |
| 68 | } | |
| 69 | catch (MethodExc eption e) | |
| 70 | { | |
| 71 | String m sg = "Fail ed to crea te resolve dArtifactS ource to c reate loca l services during Da taDictiona ryCommandC ontext ini tializatio n, " + e.g etMessage( ); | |
| 72 | LogManag er.getLogg er(DataDic tionaryCom mandContex t.class).e rror(msg, e); | |
| 73 | throw ne w Exceptio nInInitial izerError( msg); | |
| 74 | } | |
| 75 | catch (Connectio nException e) | |
| 76 | { | |
| 77 | String m sg = "Fail ed to crea te resolve dArtifactS ource to c reate loca l services during Da taDictiona ryCommandC ontext ini tializatio n, " + e.g etMessage( ); | |
| 78 | LogManag er.getLogg er(DataDic tionaryCom mandContex t.class).e rror(msg, e); | |
| 79 | throw ne w Exceptio nInInitial izerError( msg); | |
| 80 | } | |
| 81 | } | |
| 82 | ||
| 83 | if(r esolvedArt ifactSourc e != null) | |
| 84 | { | |
| 85 | ||
| 86 | try | |
| 87 | { | |
| 88 | this.dat aDictionar yService = getProvid er().creat eLocalData Source(Dat aDictionar yDataSourc eSpi.class , resolved ArtifactSo urce); | |
| 89 | } | |
| 90 | catch( Connection Exception x) | |
| 91 | { | |
| 92 | String m sg = "Fail ed to get Data Dicti onary serv ices durin g DataDict ionaryComm andContext initializ ation, " + x.getMess age(); | |
| 93 | LogManag er.getLogg er(DataDic tionaryCom mandContex t.class).e rror(msg); | |
| 94 | throw ne w Exceptio nInInitial izerError( msg); | |
| 95 | } | |
| 96 | } | |
| 97 | else | |
| 98 | { | |
| 99 | // if everything is config ured prope rly this s hould not happen. If this does happen ve rify VixCo nfig.xml i s availabl e - this i s | |
| 100 | // the site numb er used to get the l ocal site | |
| 101 | LogMan ager.getLo gger(DataD ictionaryC ommandCont ext.class) .error("Co uld not in itialize l ocal servi ces in Dat aDictionar yCommandCo ntext, lik ely cannot find loca l site"); | |
| 102 | dataDi ctionarySe rvice = nu ll; | |
| 103 | } | |
| 104 | } | |
| 105 | ||
| 106 | @O verride | |
| 107 | pu blic Route r getRoute r() | |
| 108 | { | |
| 109 | retu rn command Context.ge tRouter(); | |
| 110 | } | |
| 111 | ||
| 112 | @O verride | |
| 113 | pu blic DataS ourceProvi der getPro vider() | |
| 114 | { | |
| 115 | retu rn command Context.ge tProvider( ); | |
| 116 | } | |
| 117 | ||
| 118 | @O verride | |
| 119 | pu blic SiteR esolutionD ataSourceS pi getSite Resolver() | |
| 120 | { | |
| 121 | retu rn command Context.ge tSiteResol ver(); | |
| 122 | } | |
| 123 | ||
| 124 | @O verride | |
| 125 | pu blic Comma ndFactory getCommand Factory() | |
| 126 | { | |
| 127 | retu rn command Context.ge tCommandFa ctory(); | |
| 128 | } | |
| 129 | ||
| 130 | @O verride | |
| 131 | pu blic Trans actionLogg erDataSour ceSpi getT ransaction LoggerServ ice() | |
| 132 | { | |
| 133 | retu rn command Context.ge tTransacti onLoggerSe rvice(); | |
| 134 | } | |
| 135 | ||
| 136 | @O verride | |
| 137 | pu blic boole an isCachi ngEnabled( ) | |
| 138 | { | |
| 139 | retu rn command Context.is CachingEna bled(); | |
| 140 | } | |
| 141 | ||
| 142 | @O verride | |
| 143 | pu blic Resol vedSite ge tLocalSite () | |
| 144 | { | |
| 145 | retu rn command Context.ge tLocalSite (); | |
| 146 | } | |
| 147 | ||
| 148 | @O verride | |
| 149 | pu blic Resol vedArtifac tSource ge tResolvedA rtifactSou rce( | |
| 150 | Routin gToken rou tingToken) | |
| 151 | th rows Metho dException | |
| 152 | { | |
| 153 | retu rn command Context.ge tResolvedA rtifactSou rce(routin gToken); | |
| 154 | } | |
| 155 | ||
| 156 | @O verride | |
| 157 | pu blic Resol vedArtifac tSource ge tResolvedA rtifactSou rce( | |
| 158 | Routin gToken rou tingToken, | |
| 159 | Class< ? extends Versionabl eDataSourc eSpi> spi, Method me thod, | |
| 160 | Object [] paramet ers) | |
| 161 | th rows Metho dException | |
| 162 | { | |
| 163 | retu rn command Context.ge tResolvedA rtifactSou rce(routin gToken, sp i, method, parameter s); | |
| 164 | } | |
| 165 | ||
| 166 | pu blic DataD ictionaryD ataSourceS pi getData Dictionary Service() | |
| 167 | { | |
| 168 | retu rn dataDic tionarySer vice; | |
| 169 | } | |
| 170 | ||
| 171 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.