Produced by Araxis Merge on 12/5/2017 12:06:35 PM Central Standard 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 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\BaseWebFacade\main\src\java\gov\va\med\imaging\webapp | ImageExchangeApplicationContext.java | Mon Dec 4 21:34:50 2017 UTC |
| 2 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\BaseWebFacade\main\src\java\gov\va\med\imaging\webapp | ImageExchangeApplicationContext.java | Mon Dec 4 21:57:21 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 226 |
| 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: Augu st 6, 2006 | |
| 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 | package go v.va.med.i maging.web app; | |
| 26 | ||
| 27 | import org .apache.lo gging.log4 j.Logger; | |
| 28 | import org .apache.lo gging.log4 j.LogManag er; | |
| 29 | ||
| 30 | import org .springfra mework.con text.suppo rt.ClassPa thXmlAppli cationCont ext; | |
| 31 | ||
| 32 | /** | |
| 33 | * @author
|
|
| 34 | * | |
| 35 | * This st atic class is respon sible for holding th e single i nstance of the sprin g factory that will be used by | |
| 36 | * the exc hange appl ications. | |
| 37 | * | |
| 38 | * This cl ass implem ents a Sin gleton pat tern, but allows for an initia lization p arameter. | |
| 39 | * The one -arg form of the sta tic getSin gleton() m ethod shou ld be call ed only on ce, though it | |
| 40 | * may be safely cal led multip le times i f the sing le-arg is identical to the ori ginal call . If | |
| 41 | * the sin gle-arg ge tSingleton () called and the si ngle-arg i s not iden tical to t hat on the original | |
| 42 | * call th en getSing leton() wi ll throw a runtime e xception ( i.e. unche cked, stop the VM ki nd of erro r). | |
| 43 | * | |
| 44 | * Once in itialized, the no-ar g version of getSing leton() sh ould be ca lled. | |
| 45 | * | |
| 46 | * If the no-arg ver sion of ge tSingleton () is call ed before the single ton is ini tialized t hen this c lass | |
| 47 | * will be initializ ed using t he default context f ile - "app licationCo ntext.xml" | |
| 48 | */ | |
| 49 | public cla ss ImageEx changeAppl icationCon text | |
| 50 | extends Cl assPathXml Applicatio nContext | |
| 51 | { | |
| 52 | pr ivate stat ic String[ ] effectiv eApplicati onContext = null; | |
| 53 | pr ivate stat ic ImageEx changeAppl icationCon text singl eton = nul l; | |
| 54 | pr ivate stat ic Logger log = LogM anager.get Logger(Ima geExchange Applicatio nContext.c lass); | |
| 55 | ||
| 56 | pu blic stati c synchron ized Image ExchangeAp plicationC ontext get Singleton( String[] c ontexts) | |
| 57 | { | |
| 58 | if(s ingleton = = null && contexts = = null) | |
| 59 | throw new ImageE xchangeApp licationCo ntextIniti alizationE rror("Imag eExchangeA pplication Context ma y not be e xplicitly initialize d with a n ull contex t."); | |
| 60 | ||
| 61 | if(s ingleton ! = null) | |
| 62 | { | |
| 63 | if(con texts.leng th != effe ctiveAppli cationCont ext.length ) | |
| 64 | throw ne w ImageExc hangeAppli cationCont extInitial izationErr or("ImageE xchangeApp licationCo ntext may not be re- initialize d with a d ifferent c ontext."); | |
| 65 | ||
| 66 | for(in t index=0; index < c ontexts.le ngth; ++in dex) | |
| 67 | if(! con texts[inde x].equalsI gnoreCase( effectiveA pplication Context[in dex])) | |
| 68 | throw new ImageExcha ngeApplica tionContex tInitializ ationError ("ImageExc hangeAppli cationCont ext may no t be re-in itialized with a dif ferent con text."); | |
| 69 | log.wa rn("ImageE xchangeApp licationCo ntext.getS ingleton w as called twice with the same context.") ; | |
| 70 | } | |
| 71 | ||
| 72 | if( singleton == null ) | |
| 73 | { | |
| 74 | effect iveApplica tionContex t = contex ts; | |
| 75 | single ton = new ImageExcha ngeApplica tionContex t(); | |
| 76 | } | |
| 77 | ||
| 78 | retu rn singlet on; | |
| 79 | } | |
| 80 | ||
| 81 | pu blic stati c ImageExc hangeAppli cationCont ext getSin gleton() / / used to be synchro nized - DK B | |
| 82 | { | |
| 83 | if ( singleton == null) | |
| 84 | { | |
| 85 | log.er ror("Image ExchangeAp plicationC ontext was not initi alized whe n getSingl eton() was called.") ; | |
| 86 | throw new ImageE xchangeApp licationCo ntextIniti alizationE rror("Imag eExchangeA pplication Context wa s not init ialized wh en getSing leton() wa s called." ); | |
| 87 | } | |
| 88 | ||
| 89 | retu rn singlet on; | |
| 90 | } | |
| 91 | ||
| 92 | /* | |
| 93 | * ========= ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== ==== | |
| 94 | * Instance Fields/Met hods/Const ructors | |
| 95 | * ========= ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== ========== ==== | |
| 96 | * / | |
| 97 | ||
| 98 | /* * | |
| 99 | * | |
| 100 | * | |
| 101 | * / | |
| 102 | pr ivate Imag eExchangeA pplication Context() | |
| 103 | { | |
| 104 | supe r( effecti veApplicat ionContext ); | |
| 105 | } | |
| 106 | ||
| 107 | // pu blic IMana ger getVAM anager() { | |
| 108 | // retu rn (IManag er) getBea n("vaManag er"); | |
| 109 | // } | |
| 110 | // | |
| 111 | // pu blic IMana ger getDOD Manager() { | |
| 112 | // retu rn (IManag er) getBea n("dodMana ger"); | |
| 113 | // } | |
| 114 | ||
| 115 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.