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