Produced by Araxis Merge on 3/25/2019 8:58:03 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\ROICommands\main\src\java\gov\va\med\imaging\roi\commands\periodic | PeriodicROICommandEngineAdapter.java | Mon Mar 18 20:39:14 2019 UTC |
2 | C:\AraxisMergeCompare\Pri_re\IMAG_Source\VISA\Java\ROICommands\main\src\java\gov\va\med\imaging\roi\commands\periodic | PeriodicROICommandEngineAdapter.java | Tue Mar 19 12:04:02 2019 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 3 | 228 |
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: Mar 29, 2012 | |
6 | Site Nam e: Washin gton OI Fi eld Office , Silver S pring, MD | |
7 | Developer: DN S WERFEJ | |
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.roi .commands. periodic; | |
27 | ||
28 | import gov .va.med.se rver.Serve rAgnosticE ngine; | |
29 | import gov .va.med.se rver.Serve rAgnosticE ngineAdapt er; | |
30 | import gov .va.med.se rver.Serve rLifecycle Event; | |
31 | ||
32 | /** | |
33 | * @author DN S WERFEJ | |
34 | * | |
35 | */ | |
36 | public cla ss Periodi cROIComman dEngineAda pter | |
37 | extends go v.va.med.i maging.cor e.interfac es.router. AbstractFa cadeRouter Impl | |
38 | implements ServerAgn osticEngin e | |
39 | { | |
40 | ||
41 | /* (non-Java doc) | |
42 | * @see gov. va.med.ser ver.Server AgnosticEn gine#setSe rverAgnost icEngineAd apter(gov. va.med.ser ver.Server AgnosticEn gineAdapte r) | |
43 | * / | |
44 | @O verride | |
45 | pu blic void setServerA gnosticEng ineAdapter ( | |
46 | Server AgnosticEn gineAdapte r engineAd apter) | |
47 | { | |
48 | Peri odicROICom mandStarte r.setEngin eAdapter(e ngineAdapt er); | |
49 | } | |
50 | ||
51 | /* (non-Java doc) | |
52 | * @see gov. va.med.ser ver.Server AgnosticEn gine#serve rEvent(gov .va.med.se rver.Serve rLifecycle Event) | |
53 | * / | |
54 | @O verride | |
55 | pu blic void serverEven t(ServerLi fecycleEve nt event) | |
56 | { | |
57 | if ( event.getE ventType() .equals(Se rverLifecy cleEvent.E ventType.S TART)) | |
58 | { | |
59 | Period icROIComma ndStarter. startROIPe riodicComm ands(); | |
60 | /* | |
61 | logger .info("Ini tializing ROI period ic command s"); | |
62 | // set up a secu rity realm for the c ommands | |
63 | ROIPer iodicComma ndConfigur ation conf ig = ROIPe riodicComm andConfigu ration.get ROIPeriodi cCommandCo nfiguratio n(); | |
64 | ||
65 | //Peri odicROICom mandRunSta tus.getPer iodicComma ndRunStatu s().setPer iodicROIPr ocessingEn abled(conf ig.isPerio dicROIProc essingEnab led()); | |
66 | ROICom mandsStati stics stat s = ROICom mandsStati stics.getR oiCommands Statistics (); | |
67 | ||
68 | if(con fig.isPeri odicROIPro cessingEna bled()) | |
69 | { | |
70 | String s iteId = ge tRouter(). getAppConf iguration( ).getLocal SiteNumber (); | |
71 | String a ccessCode = config.g etAccessCo de().getVa lue(); | |
72 | String v erifyCode = config.g etVerifyCo de().getVa lue(); | |
73 | if(siteI d == null || siteId. length() < =0) | |
74 | { | |
75 | logger.err or("Missin g site ID, disabling periodic commands." ); | |
76 | return; | |
77 | } | |
78 | if(acces sCode == n ull || acc essCode.le ngth() <=0 ) | |
79 | { | |
80 | logger.err or("Missin g access c ode, disab ling perio dic comman ds."); | |
81 | return; | |
82 | } | |
83 | if(verif yCode == n ull || ver ifyCode.le ngth() <=0 ) | |
84 | { | |
85 | logger.err or("Missin g verify c ode, disab ling perio dic comman ds."); | |
86 | return; | |
87 | } | |
88 | ||
89 | // Authe nticate on the main thread. | |
90 | if(engin eAdapter.a uthenticat e(accessCo de, verify Code.getBy tes()) == null) | |
91 | { | |
92 | stats.setR oiPeriodic Processing (false); | |
93 | stats.setR oiPeriodic Processing Error("Inv alid crede ntials for ROI perio dic proces sing, cann ot process requests" ); | |
94 | // if null is return ed that me ans the au thenticati on failed, do not st art the pe riodic com mand and s end out an email not ification | |
95 | logger.err or("Authen tication o f user for ROI Perio dic comman d failed, cannot sta rt periodi c command! "); | |
96 | // send an email not ification | |
97 | } | |
98 | else | |
99 | { | |
100 | stats.setR oiPeriodic Processing (true); | |
101 | ROICommand sContext.g etROIPerio dicRouter( ).processR OIPeriodic Requests() ; | |
102 | } | |
103 | // Clear out conte xt on main thread | |
104 | Transact ionContext Factory.ge t().clear( ); | |
105 | } | |
106 | else | |
107 | { | |
108 | stats.se tRoiPeriod icProcessi ng(false); | |
109 | stats.se tRoiPeriod icProcessi ngError("R OI Periodi c processi ng disable d"); | |
110 | }*/ | |
111 | } | |
112 | ||
113 | } | |
114 | } | |
115 | ||
116 |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.