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\HDIGManagementWebApp\main\src\java\gov\va\med\imaging\hdigmanagement\web | UpdateServiceAccountCredentialsServlet.java | Wed May 30 14:35:25 2018 UTC |
2 | patch_205_build_9.zip\Java\HDIGManagementWebApp\main\src\java\gov\va\med\imaging\hdigmanagement\web | UpdateServiceAccountCredentialsServlet.java | Fri Jun 1 20:14:35 2018 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 3 | 224 |
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 | * | |
3 | Package: MAG - Vis tA Imaging | |
4 | WARNING: Per VHA D irective 2 004-038, t his routin e should n ot be modi fied. | |
5 | Date Cre ated: Apr 25, 2012 | |
6 | Site Nam e: Washin gton OI Fi eld Office , Silver S pring, MD | |
7 | Developer: PI I
|
|
8 | Descript ion: | |
9 | ||
10 | ;; +-------- ---------- ---------- ---------- ---------- ---------- ---------- + | |
11 | ;; Property of the US Government . | |
12 | ;; No permis sion to co py or redi stribute t his softwa re is give n. | |
13 | ;; Use of un released v ersions of this soft ware requi res the us er | |
14 | ;; to execu te a writt en test ag reement wi th the Vis tA Imaging | |
15 | ;; Developm ent Office of the De partment o f Veterans Affairs, | |
16 | ;; telephon e (301) 73 4-0100. | |
17 | ;; | |
18 | ;; The Food and Drug A dministrat ion classi fies this software a s | |
19 | ;; a Class I I medical device. A s such, it may not b e changed | |
20 | ;; in any wa y. Modifi cations to this soft ware may r esult in a n | |
21 | ;; adulterat ed medical device un der 21CFR8 20, the us e of which | |
22 | ;; is consid ered to be a violati on of US F ederal Sta tutes. | |
23 | ;; +-------- ---------- ---------- ---------- ---------- ---------- ---------- + | |
24 | ||
25 | */ | |
26 | package go v.va.med.i maging.hdi gmanagemen t.web; | |
27 | ||
28 | import gov .va.med.im aging.core .router.Pe riodicComm andList; | |
29 | import gov .va.med.im aging.core .router.co mmands.Pro cessAsyncS torageQueu eSendEmail CommandImp l; | |
30 | import gov .va.med.im aging.core .router.co mmands.Pro cessEmailQ ueueComman dImpl; | |
31 | import gov .va.med.im aging.core .router.co mmands.Pro cessIconIm ageCreatio nQueueComm andImpl; | |
32 | import gov .va.med.im aging.core .router.co mmands.dic om.Process DicomCorre ctCommandI mpl; | |
33 | import gov .va.med.im aging.core .router.pe riodiccomm ands.Perio dicCommand EngineAdap ter; | |
34 | import gov .va.med.im aging.dico m.dcftoolk it.startup .DicomEngi neAdapter; | |
35 | import gov .va.med.im aging.exch ange.busin ess.dicom. DicomServe rConfigura tion; | |
36 | import gov .va.med.im aging.faca de.configu ration.Enc ryptedConf igurationP ropertyStr ing; | |
37 | import gov .va.med.im aging.faca de.configu ration.Fac adeConfigu rationFact ory; | |
38 | ||
39 | import jav a.io.IOExc eption; | |
40 | ||
41 | import jav ax.servlet .ServletEx ception; | |
42 | import jav ax.servlet .http.Http Servlet; | |
43 | import jav ax.servlet .http.Http ServletReq uest; | |
44 | import jav ax.servlet .http.Http ServletRes ponse; | |
45 | ||
46 | import org .apache.lo gging.log4 j.LogManag er; | |
47 | import org .apache.lo gging.log4 j.Logger; | |
48 | ||
49 | /** | |
50 | * @author PI I
|
|
51 | * | |
52 | */ | |
53 | public cla ss UpdateS erviceAcco untCredent ialsServle t | |
54 | extends Ht tpServlet | |
55 | { | |
56 | pr ivate stat ic final l ong serial VersionUID = -185097 6585167762 873L; | |
57 | pr ivate fina l static L ogger logg er = LogMa nager.getL ogger(Upda teServiceA ccountCred entialsSer vlet.class ); | |
58 | ||
59 | @O verride | |
60 | pr otected vo id doPost( HttpServle tRequest r equest, Ht tpServletR esponse re sponse) | |
61 | th rows Servl etExceptio n, IOExcep tion | |
62 | { | |
63 | Stri ng action = request. getParamet er("action "); | |
64 | if ( action.equ als("Cance l")) | |
65 | { | |
66 | respon se.sendRed irect("..\ \ViewHDIGS tats.jsp") ; | |
67 | } | |
68 | else | |
69 | { | |
70 | try | |
71 | { | |
72 | String a ccessCode = request. getParamet er("access Code"); | |
73 | String v erifyCode = request. getParamet er("verify Code"); | |
74 | ||
75 | // Check the crede ntials to see if the y're valid . If so, u pdate conf ig, restar t | |
76 | // liste ners and k ill and re start peri odic comma nds | |
77 | if (Dico mEngineAda pter.isVal idCredenti als(access Code, veri fyCode)) | |
78 | { | |
79 | // Update the Access /Verify Co des and sa ve the con fig file | |
80 | DicomServe rConfigura tion dicom ServerConf iguration = DicomSer verConfigu ration.get Configurat ion(); | |
81 | dicomServe rConfigura tion.setAc cessCode(n ew Encrypt edConfigur ationPrope rtyString( accessCode )); | |
82 | dicomServe rConfigura tion.setVe rifyCode(n ew Encrypt edConfigur ationPrope rtyString( verifyCode )); | |
83 | logger.inf o("Updatin g DICOMSer verConfigu ration wit h new acce ss and ver ify codes" ); | |
84 | dicomServe rConfigura tion.store Configurat ion(); | |
85 | FacadeConf igurationF actory.get Configurat ionFactory ().clearCo nfiguratio n(DicomSer verConfigu ration.cla ss); | |
86 | ||
87 | // Start t he DICOM s ervices | |
88 | DicomEngin eAdapter.s tartDicomS ervices(); | |
89 | ||
90 | // Kill an y existing periodic commands | |
91 | PeriodicCo mmandList. get().term inateSched uledPeriod icCommand( ProcessDic omCorrectC ommandImpl .class); | |
92 | PeriodicCo mmandList. get().term inateSched uledPeriod icCommand( ProcessIco nImageCrea tionQueueC ommandImpl .class); | |
93 | PeriodicCo mmandList. get().term inateSched uledPeriod icCommand( ProcessAsy ncStorageQ ueueSendEm ailCommand Impl.class ); | |
94 | PeriodicCo mmandList. get().term inateSched uledPeriod icCommand( ProcessEma ilQueueCom mandImpl.c lass); | |
95 | ||
96 | // Start n ew periodi c commands | |
97 | PeriodicCo mmandEngin eAdapter.i nitializeA ndStartPer iodicComma nds(); | |
98 | ||
99 | response.s endRedirec t("..\\Vie wHDIGStats .jsp"); | |
100 | } | |
101 | else | |
102 | { | |
103 | response.s endRedirec t("updateS erviceAcco untCredent ials.jsp?e rror=Inval id access/ verify cod es. Please try again ."); | |
104 | } | |
105 | } | |
106 | catch( Exception ex) | |
107 | { | |
108 | logger.e rror("Erro r updating DICOM Ser ver Config uration, " + ex.getM essage(), ex); | |
109 | response .sendRedir ect("updat eServiceAc countCrede ntials.jsp ?error=The re was an error rest arting DIC OM service s ( " + ex .getMessag e() + "). The Tomcat service o n the HDIG should be restarted ."); | |
110 | } | |
111 | } | |
112 | } | |
113 | ||
114 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.