Produced by Araxis Merge on 6/5/2018 10:24:09 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.
# | Location | File | Last Modified |
---|---|---|---|
1 | patch_205_build_9.zip\Java\DxDataSourceProvider\main\src\java\gov\va\med\imaging\dx\datasource\interactive\commands | AddSiteCommand.java | Wed May 30 14:35:29 2018 UTC |
2 | patch_205_build_9.zip\Java\DxDataSourceProvider\main\src\java\gov\va\med\imaging\dx\datasource\interactive\commands | AddSiteCommand.java | Fri Jun 1 19:35:01 2018 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 230 |
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 go v.va.med.i maging.dx. datasource .interacti ve.command s; | |
4 | ||
5 | import jav a.net.URL; | |
6 | import gov .va.med.OI D; | |
7 | import gov .va.med.UR LComponent Merger; | |
8 | import gov .va.med.We llKnownOID ; | |
9 | import gov .va.med.im aging.dx.d atasource. DxDocument SetDataSou rceService ; | |
10 | import gov .va.med.im aging.dx.d atasource. configurat ion.DxData SourceConf iguration; | |
11 | import gov .va.med.im aging.dx.d atasource. configurat ion.DxSite Configurat ion; | |
12 | import gov .va.med.in teractive. Command; | |
13 | import gov .va.med.in teractive. CommandPar ametersDes cription; | |
14 | import gov .va.med.in teractive. CommandPro cessor; | |
15 | ||
16 | /** | |
17 | * @author PII | |
18 | * | |
19 | */ | |
20 | public cla ss AddSite Command | |
21 | extends Co mmand<DxDa taSourceCo nfiguratio n> | |
22 | { | |
23 | pr ivate fina l static S tring NULL _PARAMETER = "null"; | |
24 | ||
25 | pr ivate stat ic final C ommandPara metersDesc ription<?> [] command Parameters Descriptio n = | |
26 | new CommandPar ametersDes cription[] | |
27 | { | |
28 | new Co mmandParam etersDescr iption<Str ing>("home CommunityI d", String .class, tr ue), | |
29 | new Co mmandParam etersDescr iption<Str ing>("repo sitoryId", String.cl ass, true) , | |
30 | new Co mmandParam etersDescr iption<Str ing>("quer yProtocol" , String.c lass, true ), | |
31 | new Co mmandParam etersDescr iption<Str ing>("quer yUsername" , String.c lass, true ), | |
32 | new Co mmandParam etersDescr iption<Str ing>("quer yPassword" , String.c lass, true ), | |
33 | new Co mmandParam etersDescr iption<Str ing>("quer yHost", St ring.class , true), | |
34 | new Co mmandParam etersDescr iption<Int eger>("que ryPort", I nteger.cla ss, true), | |
35 | new Co mmandParam etersDescr iption<Str ing>("quer yFile", St ring.class , true), | |
36 | new Co mmandParam etersDescr iption<Str ing>("retr ieveProtoc ol", Strin g.class, t rue), | |
37 | new Co mmandParam etersDescr iption<Str ing>("retr ieveUserna me", Strin g.class, t rue), | |
38 | new Co mmandParam etersDescr iption<Str ing>("retr ievePasswo rd", Strin g.class, t rue), | |
39 | new Co mmandParam etersDescr iption<Str ing>("retr ieveHost", String.cl ass, true) , | |
40 | new Co mmandParam etersDescr iption<Int eger>("ret rievePort" , Integer. class, tru e), | |
41 | new Co mmandParam etersDescr iption<Str ing>("retr ieveFile", String.cl ass, true) | |
42 | }; | |
43 | pu blic stati c CommandP arametersD escription <?>[] getC ommandPara metersDesc ription() | |
44 | { | |
45 | retu rn command Parameters Descriptio n; | |
46 | } | |
47 | ||
48 | /* * | |
49 | * | |
50 | * / | |
51 | pu blic AddSi teCommand( ) | |
52 | { | |
53 | supe r(); | |
54 | } | |
55 | ||
56 | /* * | |
57 | * @param co mmandParam eterValues | |
58 | * / | |
59 | pu blic AddSi teCommand( String[] c ommandPara meterValue s) | |
60 | { | |
61 | supe r(commandP arameterVa lues); | |
62 | } | |
63 | ||
64 | @O verride | |
65 | pu blic void processCom mand(Comma ndProcesso r<DxDataSo urceConfig uration> p rocessor, DxDataSour ceConfigur ation conf ig) | |
66 | th rows Excep tion | |
67 | { | |
68 | Stri ng[] comma ndParamete rs = getCo mmandParam eterValues (); | |
69 | ||
70 | this .validateP arameters( commandPar ameters); | |
71 | ||
72 | Stri ng homeCom munity = c ommandPara meters[0]; | |
73 | Well KnownOID w ellKnownOI D = WellKn ownOID.get OrValueOf( homeCommun ity.toUppe rCase()); | |
74 | OID homeCommun ityOID = w ellKnownOI D == null ? OID.crea te(homeCom munity) : wellKnownO ID.getCano nicalValue (); | |
75 | ||
76 | Stri ng reposit oryId = co mmandParam eters[1]; | |
77 | ||
78 | Stri ng queryPr otocol = c ommandPara meters[2]; | |
79 | Stri ng queryUs ername = c ommandPara meters[3]; | |
80 | Stri ng queryPa ssword = c ommandPara meters[4]; | |
81 | Stri ng queryHo st = comma ndParamete rs[5]; | |
82 | Inte ger queryP ort = (Int eger)getCo mmandParam etersDescr iption("qu eryPort"). getValue( commandPar ameters[6] ); | |
83 | Stri ng queryFi le = comma ndParamete rs[7]; | |
84 | ||
85 | Stri ng retriev eProtocol = commandP arameters[ 8]; | |
86 | Stri ng retriev eUsername = commandP arameters[ 9]; | |
87 | Stri ng retriev ePassword = commandP arameters[ 10]; | |
88 | Stri ng retriev eHost = co mmandParam eters[11]; | |
89 | Inte ger retrie vePort = ( Integer)ge tCommandPa rametersDe scription( "retrieveP ort").getV alue( comm andParamet ers[12] ); | |
90 | Stri ng retriev eFile = co mmandParam eters[13]; | |
91 | ||
92 | URLC omponentMe rger query Merger = n ew URLComp onentMerge r( | |
93 | NULL_P ARAMETER.e quals(quer yProtocol) ? DxDocum entSetData SourceServ ice.SUPPOR TED_PROTOC OL : query Protocol, | |
94 | NULL_P ARAMETER.e quals(quer yUsername) ? null : queryUsern ame, | |
95 | NULL_P ARAMETER.e quals(quer yPassword) ? null : queryPassw ord, | |
96 | NULL_P ARAMETER.e quals(quer yHost) ? n ull : quer yHost, | |
97 | queryP ort.intVal ue(), | |
98 | NULL_P ARAMETER.e quals(quer yFile) ? n ull : quer yFile, | |
99 | URLCom ponentMerg er.URLComp onentMerge rPrecedenc e.MergerCo mponentsFi rst); | |
100 | ||
101 | URLC omponentMe rger retri eveMerger = new URLC omponentMe rger( | |
102 | NULL_P ARAMETER.e quals(retr ieveProtoc ol) ? DxDo cumentSetD ataSourceS ervice.SUP PORTED_PRO TOCOL : re trieveProt ocol, | |
103 | NULL_P ARAMETER.e quals(retr ieveUserna me) ? null : retriev eUsername, | |
104 | NULL_P ARAMETER.e quals(retr ievePasswo rd) ? null : retriev ePassword, | |
105 | NULL_P ARAMETER.e quals(retr ieveHost) ? null : r etrieveHos t, | |
106 | retrie vePort.int Value(), | |
107 | NULL_P ARAMETER.e quals(retr ieveFile) ? null : r etrieveFil e, | |
108 | URLCom ponentMerg er.URLComp onentMerge rPrecedenc e.MergerCo mponentsFi rst); | |
109 | ||
110 | DxSi teConfigur ation site Configurat ion = DxSi teConfigur ation.crea te( | |
111 | homeCo mmunityOID , reposito ryId, | |
112 | queryM erger, ret rieveMerge r ); | |
113 | ||
114 | conf ig.add(sit eConfigura tion); | |
115 | } | |
116 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.