Produced by Araxis Merge on 3/25/2019 8:58:06 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 | C:\AraxisMergeCompare\Pri_un\IMAG_Source\VISA\Java\ViewerImagingWebApp\main\src\java\gov\va\med\imaging\viewer\rest | ViewerImagingService.java | Mon Mar 18 20:39:08 2019 UTC |
2 | C:\AraxisMergeCompare\Pri_re\IMAG_Source\VISA\Java\ViewerImagingWebApp\main\src\java\gov\va\med\imaging\viewer\rest | ViewerImagingService.java | Tue Mar 19 12:04:14 2019 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 3 | 396 |
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 | * Date Cr eated: Apr 22, 2018 | |
3 | * Develop er: DNS tjahjb | |
4 | */ | |
5 | package go v.va.med.i maging.vie wer.rest; | |
6 | ||
7 | import gov .va.med.im aging.core .interface s.exceptio ns.Connect ionExcepti on; | |
8 | import gov .va.med.im aging.core .interface s.exceptio ns.MethodE xception; | |
9 | import gov .va.med.im aging.rest .types.Res tBooleanRe turnType; | |
10 | import gov .va.med.im aging.tran sactioncon text.Trans actionCont ext; | |
11 | import gov .va.med.im aging.tran sactioncon text.Trans actionCont extFactory ; | |
12 | import gov .va.med.im aging.tran sactioncon text.Trans actionCont extHttpHea ders; | |
13 | import gov .va.med.im aging.view er.ViewerI magingCont extHolder; | |
14 | import gov .va.med.im aging.view er.command s.DeleteIm agesComman d; | |
15 | import gov .va.med.im aging.view er.command s.FlagImag esAsSensit iveCommand ; | |
16 | import gov .va.med.im aging.view er.command s.GetDelet eReasonsCo mmand; | |
17 | import gov .va.med.im aging.view er.command s.GetPrint ReasonsCom mand; | |
18 | import gov .va.med.im aging.view er.command s.GetStatu sReasonsCo mmand; | |
19 | import gov .va.med.im aging.view er.command s.GetTreat ingFacilit iesCommand ; | |
20 | import gov .va.med.im aging.view er.command s.GetUserI nformation ByUserIdCo mmand; | |
21 | import gov .va.med.im aging.view er.command s.LogAcces sImageUrns Command; | |
22 | import gov .va.med.im aging.view er.command s.LogPrint ImageAcces sCommand; | |
23 | import gov .va.med.im aging.view er.rest.en dpoints.Vi ewerImagin gRestUri; | |
24 | import gov .va.med.im aging.view er.rest.ty pes.Delete ImageUrnsT ype; | |
25 | import gov .va.med.im aging.view er.rest.ty pes.FlagSe nsitiveIma geUrnsType ; | |
26 | import gov .va.med.im aging.view er.rest.ty pes.LogAcc essImageUr nsType; | |
27 | import gov .va.med.im aging.web. rest.excep tions.Abst ractRestSe rvice; | |
28 | ||
29 | import jav ax.ws.rs.C onsumes; | |
30 | import jav ax.ws.rs.G ET; | |
31 | import jav ax.ws.rs.P OST; | |
32 | import jav ax.ws.rs.P ath; | |
33 | import jav ax.ws.rs.P roduces; | |
34 | import jav ax.ws.rs.Q ueryParam; | |
35 | import jav ax.ws.rs.c ore.MediaT ype; | |
36 | import jav ax.ws.rs.c ore.Respon se; | |
37 | import jav ax.ws.rs.c ore.Respon se.Status; | |
38 | ||
39 | /** | |
40 | * @author DNS tjahjb | |
41 | * | |
42 | */ | |
43 | @Path(View erImagingR estUri.vie werImaging ServicePat h) | |
44 | public cla ss ViewerI magingServ ice | |
45 | extends Ab stractRest Service | |
46 | { | |
47 | @GET | |
48 | @P ath(Viewer ImagingRes tUri.viewe rImagingGe tUserInfor mationMeth odPath) | |
49 | @Produ ces(MediaT ype.APPLIC ATION_XML) | |
50 | pu blic Respo nse getUse rInformati on( | |
51 | @QueryPa ram("siteI d") String siteId, | |
52 | @QueryPa ram("userI d") String userId) | |
53 | throws MethodExc eption, Co nnectionEx ception | |
54 | { | |
55 | // GetUserInf ormationBy UserIdComm and comman d = new Ge tUserInfor mationByUs erIdComman d(siteId, userId, "1 .0"); | |
56 | // return com mand.execu te(); | |
57 | ||
58 | retu rn wrapRes ultWithUse rResponseH eaders( | |
59 | new GetU serInforma tionByUser IdCommand( | |
60 | si teId, | |
61 | us erId, | |
62 | ge tInterface Version()) .execute() ); | |
63 | } | |
64 | ||
65 | pr ivate Resp onse wrapR esultWithU serRespons eHeaders(O bject resu lt) | |
66 | { | |
67 | Tran sactionCon text trans actionCont ext = Tran sactionCon textFactor y.get(); | |
68 | retu rn Respons e.status(S tatus.OK). | |
69 | header (Transacti onContextH ttpHeaders .httpHeade rMachineNa me, transa ctionConte xt.getMach ineName()) . | |
70 | header (Transacti onContextH ttpHeaders .httpHeade rDuz, tran sactionCon text.getDu z()). | |
71 | header (Transacti onContextH ttpHeaders .httpHeade rFullName, transacti onContext. getFullNam e()). | |
72 | header (Transacti onContextH ttpHeaders .httpHeade rSiteNumbe r, transac tionContex t.getSiteN umber()). | |
73 | header (Transacti onContextH ttpHeaders .httpHeade rSiteName, transacti onContext. getSiteNam e()). | |
74 | entity (result).b uild(); | |
75 | } | |
76 | ||
77 | ||
78 | @P OST | |
79 | @P ath(Viewer ImagingRes tUri.viewe rImagingDe leteImages MethodPath ) | |
80 | @P roduces(Me diaType.AP PLICATION_ XML) | |
81 | @C onsumes(Me diaType.AP PLICATION_ XML) | |
82 | pu blic Respo nse delete Images(Del eteImageUr nsType ima geUrns) | |
83 | th rows Metho dException , Connecti onExceptio n | |
84 | { | |
85 | retu rn wrapRes ultWithRes ponseHeade rs( | |
86 | new Dele teImagesCo mmand( | |
87 | ge tLocalSite Number(), | |
88 | im ageUrns, | |
89 | ge tInterface Version()) .execute() ); | |
90 | } | |
91 | ||
92 | @G ET | |
93 | @P ath(Viewer ImagingRes tUri.viewe rImagingGe tDeleteRea sonsMethod Path) | |
94 | @P roduces(Me diaType.AP PLICATION_ XML) | |
95 | pu blic Respo nse getDel eteReasons () | |
96 | th rows Metho dException , Connecti onExceptio n | |
97 | { | |
98 | retu rn wrapRes ultWithRes ponseHeade rs( | |
99 | new GetD eleteReaso nsCommand( | |
100 | ge tLocalSite Number(), | |
101 | ge tInterface Version()) .execute() ); | |
102 | } | |
103 | ||
104 | @G ET | |
105 | @P ath(Viewer ImagingRes tUri.viewe rImagingGe tPrintReas onsMethodP ath) | |
106 | @P roduces(Me diaType.AP PLICATION_ XML) | |
107 | pu blic Respo nse getPri ntReasons( ) | |
108 | th rows Metho dException , Connecti onExceptio n | |
109 | { | |
110 | retu rn wrapRes ultWithRes ponseHeade rs( | |
111 | new GetP rintReason sCommand( | |
112 | ge tLocalSite Number(), | |
113 | ge tInterface Version()) .execute() ); | |
114 | } | |
115 | ||
116 | @G ET | |
117 | @P ath(Viewer ImagingRes tUri.viewe rImagingGe tStatusRea sonsMethod Path) | |
118 | @P roduces(Me diaType.AP PLICATION_ XML) | |
119 | pu blic Respo nse getSta tusReasons () | |
120 | th rows Metho dException , Connecti onExceptio n | |
121 | { | |
122 | retu rn wrapRes ultWithRes ponseHeade rs( | |
123 | new GetS tatusReaso nsCommand( | |
124 | ge tLocalSite Number(), | |
125 | ge tInterface Version()) .execute() ); | |
126 | } | |
127 | ||
128 | @P OST | |
129 | @P ath(Viewer ImagingRes tUri.viewe rImagingFl agImagesAs SensitiveM ethodPath) | |
130 | @P roduces(Me diaType.AP PLICATION_ XML) | |
131 | @C onsumes(Me diaType.AP PLICATION_ XML) | |
132 | pu blic Respo nse flagIm agesAsSens itive(Flag SensitiveI mageUrnsTy pe imageUr ns) | |
133 | th rows Metho dException , Connecti onExceptio n | |
134 | { | |
135 | retu rn wrapRes ultWithRes ponseHeade rs( | |
136 | new Flag ImagesAsSe nsitiveCom mand( | |
137 | ge tLocalSite Number(), | |
138 | im ageUrns, | |
139 | ge tInterface Version()) .execute() ); | |
140 | } | |
141 | ||
142 | @P OST | |
143 | @P ath(Viewer ImagingRes tUri.viewe rImagingLo gImageAcce ssMethodPa th) | |
144 | @P roduces(Me diaType.AP PLICATION_ XML) | |
145 | @C onsumes(Me diaType.AP PLICATION_ XML) | |
146 | pu blic Respo nse logIma geAccess( | |
147 | @Query Param("icn ") String patientIcn , | |
148 | @Query Param("dfn ") String patientDfn , | |
149 | LogAcc essImageUr nsType ima geUrns) | |
150 | th rows Metho dException , Connecti onExceptio n | |
151 | { | |
152 | retu rn wrapRes ultWithRes ponseHeade rs( | |
153 | new LogA ccessImage UrnsComman d( | |
154 | ge tLocalSite Number(), | |
155 | pa tientIcn, | |
156 | pa tientDfn, | |
157 | im ageUrns, | |
158 | ge tInterface Version()) .execute() ); | |
159 | } | |
160 | ||
161 | @GET | |
162 | @P ath(Viewer ImagingRes tUri.viewe rImagingLo gPrintImag eAccessMet hodPath) | |
163 | @Produ ces(MediaT ype.APPLIC ATION_XML) | |
164 | pu blic RestB ooleanRetu rnType log PrintImage AccessEven t( | |
165 | @QueryPa ram("siteI d") String siteId, | |
166 | @QueryPa ram("image Urn") Stri ng imageUr n, | |
167 | @QueryPa ram("reaso n") String printReas on) | |
168 | throws MethodExc eption, Co nnectionEx ception | |
169 | { | |
170 | Log PrintImage AccessComm and comman d = new Lo gPrintImag eAccessCom mand(siteI d, imageUr n, printRe ason, "1.0 "); | |
171 | ret urn comman d.execute( ); | |
172 | } | |
173 | ||
174 | ||
175 | @GET | |
176 | @P ath(Viewer ImagingRes tUri.viewe rImagingGe tTreatingF acilitiesM ethodPath) | |
177 | @Produ ces(MediaT ype.APPLIC ATION_XML) | |
178 | pu blic Respo nse getTre atingFacil ities( | |
179 | @QueryPa ram("siteI d") String siteId, | |
180 | @Query Param("icn ") String patientIcn , | |
181 | @Query Param("dfn ") String patientDfn ) | |
182 | throws MethodExc eption, Co nnectionEx ception | |
183 | { | |
184 | re turn wrapR esultWithR esponseHea ders(new G etTreating Facilities Command( | |
185 | s iteId, | |
186 | p atientIcn, | |
187 | p atientDfn, | |
188 | g etInterfac eVersion() ).execute( )); | |
189 | } | |
190 | ||
191 | pr otected St ring getIn terfaceVer sion() | |
192 | { | |
193 | retu rn "V1"; | |
194 | } | |
195 | ||
196 | pr otected St ring getLo calSiteNum ber() | |
197 | { | |
198 | retu rn ViewerI magingCont extHolder. getViewerI magingCont ext().getA ppConfigur ation().ge tLocalSite Number(); | |
199 | } | |
200 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.