Produced by Araxis Merge on 12/5/2017 12:06:49 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\VistaDataSource\main\src\java\gov\va\med\imaging\vistadatasource | VistaDataSourceProvider.java | Mon Dec 4 21:34:34 2017 UTC |
| 2 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\VistaDataSource\main\src\java\gov\va\med\imaging\vistadatasource | VistaDataSourceProvider.java | Mon Dec 4 22:06:28 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 356 |
| 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 | */ | |
| 4 | package go v.va.med.i maging.vis tadatasour ce; | |
| 5 | ||
| 6 | import gov .va.med.im aging.data source.*; | |
| 7 | import gov .va.med.im aging.vist adatasourc e.configur ation.Vist aDataSourc eConfigura tion; | |
| 8 | ||
| 9 | import jav a.util.Col lections; | |
| 10 | import jav a.util.Sor tedSet; | |
| 11 | import jav a.util.Tre eSet; | |
| 12 | ||
| 13 | import org .apache.lo gging.log4 j.LogManag er; | |
| 14 | import org .apache.lo gging.log4 j.Logger; | |
| 15 | ||
| 16 | /** | |
| 17 | * @author
|
|
| 18 | * | |
| 19 | */ | |
| 20 | public cla ss VistaDa taSourcePr ovider | |
| 21 | extends Pr ovider | |
| 22 | { | |
| 23 | pr ivate stat ic final S tring PROV IDER_NAME = "VistaDa taSource"; | |
| 24 | pr ivate stat ic final d ouble PROV IDER_VERSI ON = 1.0d; | |
| 25 | pr ivate stat ic final S tring PROV IDER_INFO = | |
| 26 | "Imp lements: \ n" + | |
| 27 | "Pat ientDataSo urce SPI \ n" + | |
| 28 | "bac ked by a V istA data store."; | |
| 29 | ||
| 30 | pr ivate stat ic final l ong serial VersionUID = 1L; | |
| 31 | ||
| 32 | pr ivate fina l SortedSe t<Provider Service> s ervices; | |
| 33 | pr ivate stat ic VistaDa taSourceCo nfiguratio n vistaCon figuration = null; | |
| 34 | pr ivate fina l static L ogger logg er = LogMa nager.getL ogger(Vist aDataSourc eProvider. class); | |
| 35 | ||
| 36 | /* * | |
| 37 | * The publi c "nullary " construc tor that i s used by the Servic eLoader cl ass | |
| 38 | * to create instances . | |
| 39 | * / | |
| 40 | pu blic Vista DataSource Provider() | |
| 41 | { | |
| 42 | this (PROVIDER_ NAME, PROV IDER_VERSI ON, PROVID ER_INFO); | |
| 43 | } | |
| 44 | ||
| 45 | pu blic Vista DataSource Provider(V istaDataSo urceConfig uration vi staConfigu ration) | |
| 46 | { | |
| 47 | this (); | |
| 48 | Vist aDataSourc eProvider. vistaConfi guration = vistaConf iguration; | |
| 49 | } | |
| 50 | ||
| 51 | /* * | |
| 52 | * @param na me | |
| 53 | * @param ve rsion | |
| 54 | * @param in fo | |
| 55 | * / | |
| 56 | pr ivate Vist aDataSourc eProvider( String nam e, double version, S tring info ) | |
| 57 | { | |
| 58 | supe r(name, ve rsion, inf o); | |
| 59 | ||
| 60 | serv ices = new TreeSet<P roviderSer vice>(); | |
| 61 | serv ices.add( | |
| 62 | new Pr oviderServ ice( | |
| 63 | this, | |
| 64 | PatientD ataSourceS pi.class, | |
| 65 | VistaPat ientDataSo urceServic e.SUPPORTE D_PROTOCOL , | |
| 66 | 1.0F, | |
| 67 | VistaPat ientDataSo urceServic e.class) | |
| 68 | ); | |
| 69 | serv ices.add( | |
| 70 | new Pr oviderServ ice( | |
| 71 | this, | |
| 72 | UserAuth orizationD ataSourceS pi.class, | |
| 73 | VistaUse rAuthoriza tionDataSo urceProvid er.SUPPORT ED_PROTOCO L, | |
| 74 | 1.0F, | |
| 75 | VistaUse rAuthoriza tionDataSo urceProvid er.class) | |
| 76 | ); | |
| 77 | serv ices.add( | |
| 78 | new Pr oviderServ ice( | |
| 79 | this, | |
| 80 | UserAuth entication Spi.class, | |
| 81 | VistaUse rAuthentic ationDataS ourceProvi der.SUPPOR TED_PROTOC OL, | |
| 82 | 1.0F, | |
| 83 | VistaUse rAuthentic ationDataS ourceProvi der.class) | |
| 84 | ); | |
| 85 | serv ices.add( | |
| 86 | new Prov iderServic e( | |
| 87 | this, | |
| 88 | SiteDataSo urceSpi.cl ass, | |
| 89 | VistaSiteD ataSourceS ervice.SUP PORTED_PRO TOCOL, | |
| 90 | 1.0F, | |
| 91 | VistaSiteD ataSourceS ervice.cla ss) | |
| 92 | ); | |
| 93 | ||
| 94 | ||
| 95 | // V istaDelega teRedirect or is a "l ocal" serv ice, it ha s no proto col | |
| 96 | // o r protocol version a nd is inst antiated w ith the nu ll-arg | |
| 97 | // c onstructor | |
| 98 | serv ices.add( | |
| 99 | new Pr oviderServ ice( | |
| 100 | this, | |
| 101 | RoutingO verrideSpi .class, | |
| 102 | (byte)1, | |
| 103 | VistaDel egateRedir ector.clas s) | |
| 104 | ); | |
| 105 | ||
| 106 | // l oad the Ex changeConf iguration if it exis ts | |
| 107 | synchr onized(Vis taDataSour ceProvider .class) | |
| 108 | { | |
| 109 | try | |
| 110 | { | |
| 111 | if(vistaCo nfiguratio n == null) | |
| 112 | vi staConfigu ration = ( VistaDataS ourceConfi guration)l oadConfigu ration(); | |
| 113 | } | |
| 114 | catch(Cl assCastExc eption ccX ) | |
| 115 | { | |
| 116 | logger.err or("Unable to load c onfigurati on because the confi guration f ile is inv alid.", cc X); | |
| 117 | } | |
| 118 | } | |
| 119 | ||
| 120 | } | |
| 121 | ||
| 122 | ||
| 123 | @O verride | |
| 124 | pu blic Sorte dSet<Provi derService > getServi ces() | |
| 125 | { | |
| 126 | retu rn Collect ions.unmod ifiableSor tedSet(ser vices); | |
| 127 | } | |
| 128 | ||
| 129 | /* * | |
| 130 | * | |
| 131 | * / | |
| 132 | @O verride | |
| 133 | pu blic void storeConfi guration() | |
| 134 | { | |
| 135 | storeCon figuration (getVistaC onfigurati on()); | |
| 136 | } | |
| 137 | ||
| 138 | /* * | |
| 139 | * A package level met hod for SP I implemen tation to get the | |
| 140 | * Configura tion. | |
| 141 | * | |
| 142 | * @return | |
| 143 | * / | |
| 144 | st atic Vista DataSource Configurat ion getVis taConfigur ation() | |
| 145 | { | |
| 146 | if(v istaConfig uration == null) | |
| 147 | logger .error("Vi staDataSou rceConfigu ration is null, poss ibly calle d before V istaDataSo urceProvid er was ins tantiated. "); | |
| 148 | ||
| 149 | retu rn vistaCo nfiguratio n; | |
| 150 | } | |
| 151 | ||
| 152 | pu blic stati c void mai n(String [ ] args) | |
| 153 | { | |
| 154 | Syst em.out.pri ntln("Crea ting vista datasourc e configur ation file "); | |
| 155 | Vist aDataSourc eConfigura tion vista Configurat ion = null ; | |
| 156 | if(a rgs == nul l || args. length <= 0) | |
| 157 | { | |
| 158 | vistaC onfigurati on = Vista DataSource Configurat ion.create DefaultCon figuration (); | |
| 159 | } | |
| 160 | else | |
| 161 | { | |
| 162 | boolea n internal TestEnviro nment = fa lse; | |
| 163 | try | |
| 164 | { | |
| 165 | internal TestEnviro nment = Bo olean.pars eBoolean(a rgs[0]); | |
| 166 | } | |
| 167 | catch( Exception ex) | |
| 168 | { | |
| 169 | logger.e rror("Erro r parsing '" + args[ 0] + "', " + ex.getM essage()); | |
| 170 | } | |
| 171 | vistaC onfigurati on = new V istaDataSo urceConfig uration(); | |
| 172 | vistaC onfigurati on.setInte rnalTestEn vironment( internalTe stEnvironm ent); | |
| 173 | } | |
| 174 | ||
| 175 | Vist aDataSourc eProvider provider = new Vista DataSource Provider(v istaConfig uration); | |
| 176 | prov ider.store Configurat ion(); | |
| 177 | Syst em.out.pri ntln("Conf iguration file saved to '" + p rovider.ge tConfigura tionFileNa me() + "'. "); | |
| 178 | } | |
| 179 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.