Produced by Araxis Merge on 7/10/2017 1:01:43 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\IV-ehmp_cif\CoreValueObjects\main\src\java\gov\va\med\imaging\monitorederrors | MonitoredErrorConfiguration.java | Thu Jun 29 17:22:21 2017 UTC |
| 2 | C:\AraxisMergeCompare\Pri_re\IV-ehmp_cif\CoreValueObjects\main\src\java\gov\va\med\imaging\monitorederrors | MonitoredErrorConfiguration.java | Thu Jul 6 15:00:12 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 312 |
| 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: Jan 28, 2013 | |
| 6 | Site Nam e: Washin gton OI Fi eld Office , Silver S pring, MD | |
| 7 | Developer:
|
|
| 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.mon itorederro rs; | |
| 27 | ||
| 28 | import jav a.util.Arr ayList; | |
| 29 | import jav a.util.Lis t; | |
| 30 | ||
| 31 | import gov .va.med.im aging.faca de.configu ration.Abs tractBaseF acadeConfi guration; | |
| 32 | import gov .va.med.im aging.faca de.configu ration.Fac adeConfigu rationFact ory; | |
| 33 | import gov .va.med.im aging.faca de.configu ration.exc eptions.Ca nnotLoadCo nfiguratio nException ; | |
| 34 | ||
| 35 | /** | |
| 36 | * @author
|
|
| 37 | * | |
| 38 | */ | |
| 39 | public cla ss Monitor edErrorCon figuration | |
| 40 | extends Ab stractBase FacadeConf iguration | |
| 41 | { | |
| 42 | pr ivate List <String> m onitoredEr rors; | |
| 43 | pr ivate bool ean enable d; | |
| 44 | ||
| 45 | pu blic Monit oredErrorC onfigurati on() | |
| 46 | { | |
| 47 | supe r(); | |
| 48 | moni toredError s = new Ar rayList<St ring>(); | |
| 49 | } | |
| 50 | ||
| 51 | /* * | |
| 52 | * @return t he monitor edErrors | |
| 53 | * / | |
| 54 | pu blic List< String> ge tMonitored Errors() | |
| 55 | { | |
| 56 | retu rn monitor edErrors; | |
| 57 | } | |
| 58 | ||
| 59 | /* * | |
| 60 | * Only adds the new m onitored e rror if it doesn't a lready exi st in the list. This is a case sensitive compariso n | |
| 61 | * @param ne wMonitored Error | |
| 62 | * @return T rue if it is added, false if i t already exists in the list. | |
| 63 | * / | |
| 64 | pu blic boole an addUniq ueMonitore dError(Str ing newMon itoredErro r) | |
| 65 | { | |
| 66 | for( String mon itoredErro r : monito redErrors) | |
| 67 | { | |
| 68 | if(mon itoredErro r.equals(n ewMonitore dError)) | |
| 69 | return f alse; | |
| 70 | } | |
| 71 | this .monitored Errors.add (newMonito redError); | |
| 72 | retu rn true; | |
| 73 | } | |
| 74 | ||
| 75 | /* * | |
| 76 | * @param mo nitoredErr ors the mo nitoredErr ors to set | |
| 77 | * / | |
| 78 | pu blic void setMonitor edErrors(L ist<String > monitore dErrors) | |
| 79 | { | |
| 80 | this .monitored Errors = m onitoredEr rors; | |
| 81 | } | |
| 82 | ||
| 83 | /* * | |
| 84 | * @return t he enabled | |
| 85 | * / | |
| 86 | pu blic boole an isEnabl ed() | |
| 87 | { | |
| 88 | retu rn enabled ; | |
| 89 | } | |
| 90 | ||
| 91 | /* * | |
| 92 | * @param en abled the enabled to set | |
| 93 | * / | |
| 94 | pu blic void setEnabled (boolean e nabled) | |
| 95 | { | |
| 96 | this .enabled = enabled; | |
| 97 | } | |
| 98 | ||
| 99 | /* (non-Java doc) | |
| 100 | * @see gov. va.med.ima ging.facad e.configur ation.Abst ractBaseFa cadeConfig uration#lo adDefaultC onfigurati on() | |
| 101 | * / | |
| 102 | @O verride | |
| 103 | pu blic Abstr actBaseFac adeConfigu ration loa dDefaultCo nfiguratio n() | |
| 104 | { | |
| 105 | this .enabled = false; | |
| 106 | retu rn this; | |
| 107 | } | |
| 108 | ||
| 109 | pu blic synch ronized st atic Monit oredErrorC onfigurati on getMoni toredConfi guration() | |
| 110 | { | |
| 111 | try | |
| 112 | { | |
| 113 | return FacadeCon figuration Factory.ge tConfigura tionFactor y().getCon figuration (Monitored ErrorConfi guration.c lass); | |
| 114 | } | |
| 115 | catc h(CannotLo adConfigur ationExcep tion clcX) | |
| 116 | { | |
| 117 | // no need to lo g, already logged | |
| 118 | return null; | |
| 119 | } | |
| 120 | } | |
| 121 | ||
| 122 | /* | |
| 123 | pu blic boole an isError Monitored( String err orMessage) | |
| 124 | { | |
| 125 | if(e nabled && errorMessa ge != null && errorM essage.len gth() > 0) | |
| 126 | { | |
| 127 | if(thi s.monitore dErrors != null) | |
| 128 | { | |
| 129 | for(Stri ng monitor edError : monitoredE rrors) | |
| 130 | { | |
| 131 | if(errorMe ssage.cont ains(monit oredError) ) | |
| 132 | re turn true; | |
| 133 | } | |
| 134 | } | |
| 135 | } | |
| 136 | retu rn false; | |
| 137 | }* / | |
| 138 | ||
| 139 | pu blic stati c void mai n(String [ ] args) | |
| 140 | { | |
| 141 | Moni toredError Configurat ion mec = getMonitor edConfigur ation(); | |
| 142 | bool ean enable d = false; | |
| 143 | if(a rgs.length > 0) | |
| 144 | { | |
| 145 | enable d = Boolea n.parseBoo lean(args[ 0]); | |
| 146 | } | |
| 147 | else | |
| 148 | { | |
| 149 | System .out.print ln("enable d true|fal se <monito red error 1> <monito red error 2> ..."); | |
| 150 | } | |
| 151 | mec. setEnabled (enabled); | |
| 152 | for( int i = 1; i < args. length; i+ +) | |
| 153 | { | |
| 154 | mec.mo nitoredErr ors.add(ar gs[i].trim ()); | |
| 155 | } | |
| 156 | mec. storeConfi guration() ; | |
| 157 | } | |
| 158 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.