Produced by Araxis Merge on 4/2/2019 1:06:56 PM 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\ARS_Backend\ars_app\src\main\java\gov\va\med\ewv\model\response | EwdPdfReferencesFileUploadResponse.java | Wed Mar 27 19:22:50 2019 UTC |
2 | C:\AraxisMergeCompare\Pri_re\ARS_Backend\ars_app\src\main\java\gov\va\med\ewv\model\response | EwdPdfReferencesFileUploadResponse.java | Thu Mar 28 17:51:00 2019 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 572 |
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 | package go v.va.med.e wv.model.r esponse; | |
2 | ||
3 | import jav a.util.Arr ayList; | |
4 | import jav a.util.Lis t; | |
5 | import jav a.util.Map ; | |
6 | import jav a.util.Has hMap; | |
7 | ||
8 | import org .springfra mework.web .multipart .Multipart File; | |
9 | ||
10 | import gov .va.med.do main.ewv.E wvReferenc es; | |
11 | ||
12 | /** | |
13 | * This is the Respo nse object that is u sed to ret urn back t he Result of | |
14 | * calling the File Upload "ap i/v1/fileu pload" RES Tful Web S ervice. Th e | |
15 | * actual RESTFul We b Service will place in its Re sponse Bod y a JSON f ormatted | |
16 | * version of an ins tance of t his class. | |
17 | * | |
18 | * @author DN S PEREZF | |
19 | * | |
20 | */ | |
21 | public cla ss EwdPdfR eferencesF ileUploadR esponse { | |
22 | ||
23 | /* * | |
24 | * Contains the list o f Successf ul File Up loads. Suc cess in th is context means tha t | |
25 | * the File Upload rec ord's file contents were succe ssfully up loaded int o the serv er | |
26 | * and its P DF Referen ce informa tion was s uccessfull y inserted into the database. | |
27 | * | |
28 | * Each File Upload re cord is a HashMap ob ject that contains t he followi ng | |
29 | * propertie s/values: | |
30 | * 1) "name" | |
31 | * 2) "origi nalName" | |
32 | * 3) "conte ntType" | |
33 | * 4) "empty " | |
34 | * 5) "size" | |
35 | * / | |
36 | pr ivate List <HashMap<S tring, Str ing>> succ essfulFile UploadsLis t = new Ar rayList<Ha shMap<Stri ng, String >>(); | |
37 | ||
38 | /* * | |
39 | * Contains the list o f EwvRefer ences obje cts that w ere insert ed success fully into the | |
40 | * database and whose file conte nts were s uccessfull y uploaded into the server. Ea ch | |
41 | * EwvRefere nces objec t refers t o the PDF Reference of the fil e that was successfu lly | |
42 | * uploaded and contai ns the inf ormation f or that PD F Referenc e that was successfu lly | |
43 | * inserted into the d atabase. | |
44 | * | |
45 | * There is a one-to-o ne element correspon dence betw een the "s uccessfulF ileUploads List" and the | |
46 | * "ewvRefer encesList" . For each successfu l File Upl oad in the "successf ulFileUplo adsList", there | |
47 | * is a corr esponding EwvReferen ces object in the "e wvReferenc esList". S o, the n't h element in the | |
48 | * "successf ulFileUplo adsList" c orresponds to the n' th element in the "e wvReferenc esList". T he n'th | |
49 | * successfu l File Upl oad mentio ned in the "successf ulFileUplo adsList" s uccessfull y had the | |
50 | * correspon ding PDF R eference i nformation in the n' th element of the "e wvReferenc esList" | |
51 | * inserted successful ly into th e database . This wou ld even in clude the unique GUI D that was generated | |
52 | * for the E wvReferenc es record that was g enerated i nto the da tabase. | |
53 | * / | |
54 | privat e List<Ewv References > ewvRefer encesList = new Arra yList<EwvR eferences> (); | |
55 | ||
56 | /** | |
57 | * Con tains the list of Un -Successfu l (i.e,, F ailed) Fil e Uploads. Failure i n this con text means that | |
58 | * the File Upload rec ord's file contents were NOT s uccessfull y uploaded into the server | |
59 | * and/or it s PDF Refe rence info rmation wa s NOT succ essfully i nserted in to the dat abase. | |
60 | * | |
61 | * Each File Upload re cord is a HashMap ob ject that contains t he followi ng | |
62 | * propertie s/values: | |
63 | * 1) "name" | |
64 | * 2) "origi nalName" | |
65 | * 3) "conte ntType" | |
66 | * 4) "empty " | |
67 | * 5) "size" | |
68 | * / | |
69 | pr ivate List <HashMap<S tring, Str ing>> unSu ccessfulFi leUploadsL ist = new ArrayList< HashMap<St ring, Stri ng>>(); | |
70 | ||
71 | /* * | |
72 | * Contains the list o f Error Me ssages des cribing th e reason w hy each fa iled File Upload in the | |
73 | * "unSucces sfulFileUp loadsList" failed. | |
74 | * | |
75 | * There is a one-to-o ne element correspon dence betw een the "u nSuccessfu lFileUploa dsList" an d the | |
76 | * "errorMes sagesList" . For each un-succes sful File Upload in the "unSuc cessfulFil eUploadsLi st", there | |
77 | * is a corr esponding Error Mess age string in the "e rrorMessag esList". S o, the n't h element in the | |
78 | * "unSucces sfulFileUp loadsList" correspon ds to the n'th eleme nt in the "errorMess agesList" describing | |
79 | * why the f ile upload mentioned in the n' th element of the "u nSuccessfu lFileUploa dsList" fa iled. | |
80 | * / | |
81 | pr ivate List <String> e rrorMessag esList = n ew ArrayLi st<String> (); | |
82 | ||
83 | /* * | |
84 | * Construct or. | |
85 | * / | |
86 | pu blic EwdPd fReference sFileUploa dResponse( ) { } | |
87 | ||
88 | /* * | |
89 | * Gets the list of Su ccessful F ile Upload s. Success in this c ontext mea ns that | |
90 | * the File Upload rec ord's file contents were succe ssfully up loaded int o the serv er | |
91 | * and its P DF Referen ce informa tion was s uccessfull y inserted into the database. | |
92 | * | |
93 | * Each File Upload re cord is a HashMap ob ject that contains t he followi ng | |
94 | * propertie s/values: | |
95 | * 1) "name" | |
96 | * 2) "origi nalName" | |
97 | * 3) "conte ntType" | |
98 | * 4) "empty " | |
99 | * 5) "size" | |
100 | * | |
101 | * @return - the list of Success ful File U ploads | |
102 | * / | |
103 | pu blic List< HashMap<St ring, Stri ng>> getSu ccessfulFi leUploadsL ist() { | |
104 | retu rn success fulFileUpl oadsList; | |
105 | } | |
106 | ||
107 | /* * | |
108 | * Gets the list of Ew vReference s objects that were inserted s uccessfull y into the | |
109 | * database and whose file conte nts were s uccessfull y uploaded into the server. Ea ch | |
110 | * EwvRefere nces objec t refers t o the PDF Reference of the fil e that was successfu lly | |
111 | * uploaded and contai ns the inf ormation f or that PD F Referenc e that was successfu lly | |
112 | * inserted into the d atabase. | |
113 | * | |
114 | * @return - the list of EwvRefe rences obj ects that were inser ted succes sfully int o the | |
115 | * database and whose file conte nts were s uccessfull y loaded i nto the se rver | |
116 | * / | |
117 | pu blic List< EwvReferen ces> getEw vReference sList() { | |
118 | retu rn ewvRefe rencesList ; | |
119 | } | |
120 | ||
121 | /* * | |
122 | * Gets . Fa ilure in t his contex t means th at | |
123 | * the File Upload rec ord's file contents were NOT s uccessfull y uploaded into the server | |
124 | * and/or it s PDF Refe rence info rmation wa s NOT succ essfully i nserted in to the dat abase. | |
125 | * | |
126 | * Each File Upload re cord is a HashMap ob ject that contains t he followi ng | |
127 | * propertie s/values: | |
128 | * 1) "name" | |
129 | * 2) "origi nalName" | |
130 | * 3) "conte ntType" | |
131 | * 4) "empty " | |
132 | * 5) "size" | |
133 | * | |
134 | * @return - the list of Un-Succ essful (i. e,, Failed ) File Upl oads | |
135 | * / | |
136 | pu blic List< HashMap<St ring, Stri ng>> getUn Successful FileUpload sList() { | |
137 | retu rn unSucce ssfulFileU ploadsList ; | |
138 | } | |
139 | ||
140 | /* * | |
141 | * Gets the list of Er ror Messag es describ ing the re ason why e ach failed File Uplo ad in the | |
142 | * "unSucces sfulFileUp loadsList" failed. | |
143 | * | |
144 | * @return - the list of Error M essages de scribing t he reason why each f ailed File Upload in the | |
145 | * "unSucces sfulFileUp loadsList" failed. | |
146 | * / | |
147 | pu blic List< String> ge tErrorMess agesList() { | |
148 | retu rn errorMe ssagesList ; | |
149 | } | |
150 | ||
151 | /* * | |
152 | * Sets list of Succes sful File Uploads. S uccess in this conte xt means t hat | |
153 | * the File Upload rec ord's file contents were succe ssfully up loaded int o the serv er | |
154 | * and its P DF Referen ce informa tion was s uccessfull y inserted into the database. | |
155 | * | |
156 | * Each File Upload re cord is a HashMap ob ject that contains t he followi ng | |
157 | * propertie s/values: | |
158 | * 1) "name" | |
159 | * 2) "origi nalName" | |
160 | * 3) "conte ntType" | |
161 | * 4) "empty " | |
162 | * 5) "size" | |
163 | * | |
164 | * @param su ccessfulFi leUploadsL ist - the list of Su ccessful F ile Upload s | |
165 | * / | |
166 | pu blic void setSuccess fulFileUpl oadsList(L ist<HashMa p<String, String>> successful FileUpload sList) { | |
167 | if ( successful FileUpload sList != n ull) { | |
168 | this.s uccessfulF ileUploads List = suc cessfulFil eUploadsLi st; | |
169 | } | |
170 | } | |
171 | ||
172 | /* * | |
173 | * Sets the list of Ew vReference s objects that were inserted s uccessfull y into the | |
174 | * database and whose file conte nts were s uccessfull y uploaded into the server. Ea ch | |
175 | * EwvRefere nces objec t refers t o the PDF Reference of the fil e that was successfu lly | |
176 | * uploaded and contai ns the inf ormation f or that PD F Referenc e that was successfu lly | |
177 | * inserted into the d atabase. | |
178 | * | |
179 | * @param ew vReference sList - th e list of EwvReferen ces object s | |
180 | * / | |
181 | pu blic void setEwvRefe rencesList (List <Ewv References > ewvRefer encesList) { | |
182 | if ( ewvReferen cesList != null) { | |
183 | this.e wvReferenc esList = e wvReferenc esList; | |
184 | } | |
185 | } | |
186 | ||
187 | /* * | |
188 | * Sets the list of Un -Successfu l (i.e,, F ailed) Fil e Uploads. Failure i n this con text means that | |
189 | * the File Upload rec ord's file contents were NOT s uccessfull y uploaded into the server | |
190 | * and/or it s PDF Refe rence info rmation wa s NOT succ essfully i nserted in to the dat abase. | |
191 | * | |
192 | * Each File Upload re cord is a HashMap ob ject that contains t he followi ng | |
193 | * propertie s/values: | |
194 | * 1) "name" | |
195 | * 2) "origi nalName" | |
196 | * 3) "conte ntType" | |
197 | * 4) "empty " | |
198 | * 5) "size" | |
199 | * | |
200 | * @param un Successful FileUpload sList - th e list of Un-Success ful (i.e,, Failed) F ile Upload s | |
201 | * / | |
202 | pu blic void setUnSucce ssfulFileU ploadsList (List<Hash Map<String , String>> unSucces sfulFileUp loadsList) { | |
203 | if ( unSuccessf ulFileUplo adsList != null) { | |
204 | this.u nSuccessfu lFileUploa dsList = u nSuccessfu lFileUploa dsList; | |
205 | } | |
206 | } | |
207 | ||
208 | /* * | |
209 | * Sets the list of Er ror Messag es describ ing the re ason why e ach failed File Uplo ad in the | |
210 | * "unSucces sfulFileUp loadsList" failed. | |
211 | * | |
212 | * @param er rorMessage sList - li st of Erro r Messages describin g the reas on why eac h failed | |
213 | * Fi le Upload in the "un Successful FileUpload sList" fai led | |
214 | * / | |
215 | pu blic void setErrorMe ssagesList (List<Stri ng> errorM essagesLis t) { | |
216 | if ( errorMessa gesList != null) { | |
217 | this.e rrorMessag esList = e rrorMessag esList; | |
218 | } | |
219 | } | |
220 | ||
221 | /* * | |
222 | * Inserts a File Uplo ad record informatio n into the "successf ulFileUplo adsList" | |
223 | * whose Fil e Upload w as success ful. | |
224 | * | |
225 | * @param mu ltipartFil e - the Fi le Upload informatio n to inser t; none in serted if this | |
226 | * input parameter is NULL | |
227 | * / | |
228 | pu blic void addSuccess fulFileUpl oad(Multip artFile mu ltipartFil e) { | |
229 | if ( multipartF ile != nul l) { | |
230 | HashMa p<String, String> aM ultipartFi le = new H ashMap<Str ing, Strin g>(); | |
231 | aMulti partFile.p ut("name", multipart File.getNa me()); | |
232 | aMulti partFile.p ut("origin alName", m ultipartFi le.getOrig inalFilena me()); | |
233 | aMulti partFile.p ut("conten tType", mu ltipartFil e.getConte ntType()); | |
234 | aMulti partFile.p ut("empty" , Boolean. toString(m ultipartFi le.isEmpty ())); | |
235 | aMulti partFile.p ut("size", Long.toSt ring(multi partFile.g etSize())) ; | |
236 | succes sfulFileUp loadsList. add(aMulti partFile); | |
237 | } | |
238 | } | |
239 | ||
240 | /* * | |
241 | * Inserts a n EwvRefer ence objec t into the "ewvRefer encesList" that was successful ly | |
242 | * inserted into the d atabase an d whose Fi le Upload was succes sful. Each | |
243 | * EwvRefere nces objec t refers t o the PDF Reference of the fil e that was successfu lly | |
244 | * uploaded and contai ns the inf ormation f or that PD F Referenc e that was successfu lly | |
245 | * inserted into the d atabase. | |
246 | * | |
247 | * @param ew vReference s - the Ew vReference object to insert; n one insert ed if this | |
248 | * input parameter is NULL | |
249 | * / | |
250 | pu blic void addEwvRefe rences(Ewv References ewvRefere nces) { | |
251 | if ( ewvReferen ces != nul l) { | |
252 | ewvRef erencesLis t.add(ewvR eferences) ; | |
253 | } | |
254 | } | |
255 | ||
256 | /* * | |
257 | * Inserts a File Uplo ad record informatio n into the "unSucces sfulFileUp loadsList" | |
258 | * whose Fil e Upload w as NOT suc cessful. | |
259 | * | |
260 | * @param mu ltipartFil e - the Fi le Upload informatio n to inser t; none in serted if this | |
261 | * input parameter is NULL | |
262 | * / | |
263 | pu blic void addUnSucce ssfulFileU ploadsList (Multipart File multi partFile) { | |
264 | if ( multipartF ile != nul l) { | |
265 | HashMa p<String, String> aM ultipartFi le = new H ashMap<Str ing, Strin g>(); | |
266 | aMulti partFile.p ut("name", multipart File.getNa me()); | |
267 | aMulti partFile.p ut("origin alName", m ultipartFi le.getOrig inalFilena me()); | |
268 | aMulti partFile.p ut("conten tType", mu ltipartFil e.getConte ntType()); | |
269 | aMulti partFile.p ut("empty" , Boolean. toString(m ultipartFi le.isEmpty ())); | |
270 | aMulti partFile.p ut("size", Long.toSt ring(multi partFile.g etSize())) ; | |
271 | unSucc essfulFile UploadsLis t.add(aMul tipartFile ); | |
272 | } | |
273 | } | |
274 | ||
275 | /* * | |
276 | * Inserts a n Error Me ssage stri ng into th e "errorMe ssagesList " describi ng the rea son | |
277 | * why a fai led File U pload in t he "unSucc essfulFile UploadsLis t" failed. | |
278 | * | |
279 | * @param er rorMessage - the Err or Message string to insert; n one insert ed if this | |
280 | * input p arameter i s NULL or is an empt y string | |
281 | * / | |
282 | pu blic void addErrorMe ssage(Stri ng errorMe ssage) { | |
283 | if ( errorMessa ge != null && !error Message.is Empty()) { | |
284 | errorM essagesLis t.add(erro rMessage); | |
285 | } | |
286 | } | |
287 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.