Produced by Araxis Merge on 12/5/2017 12:06:38 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\CoreValueObjects\main\src\java\gov\va\med\imaging\exchange\business | ResolvedSiteImpl.java | Mon Dec 4 21:35:00 2017 UTC |
| 2 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\CoreValueObjects\main\src\java\gov\va\med\imaging\exchange\business | ResolvedSiteImpl.java | Mon Dec 4 21:58:47 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 362 |
| 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 | * Package : MAG - Vi stA Imagin g | |
| 3 | * WARNING : Per VHA Directive 2004-038, this routi ne should not be mod ified. | |
| 4 | * Date Cr eated: Jan 15, 2008 | |
| 5 | * Site Na me: Washi ngton OI F ield Offic e, Silver Spring, MD | |
| 6 | * @author
|
|
| 7 | * @versio n 1.0 | |
| 8 | * | |
| 9 | * ------- ---------- ---------- ---------- ---------- ---------- ------- | |
| 10 | * Propert y of the U S Governme nt. | |
| 11 | * No perm ission to copy or re distribute this soft ware is gi ven. | |
| 12 | * Use of unreleased versions of this so ftware req uires the user | |
| 13 | * to exec ute a writ ten test a greement w ith the Vi stA Imagin g | |
| 14 | * Develop ment Offic e of the D epartment of Veteran s Affairs, | |
| 15 | * telepho ne (301) 7 34-0100. | |
| 16 | * | |
| 17 | * The Foo d and Drug Administr ation clas sifies thi s software as | |
| 18 | * a Class II medica l device. As such, it may not be change d | |
| 19 | * in any way. Modi fications to this so ftware may result in an | |
| 20 | * adulter ated medic al device under 21CF R820, the use of whi ch | |
| 21 | * is cons idered to be a viola tion of US Federal S tatutes. | |
| 22 | * ------- ---------- ---------- ---------- ---------- ---------- ------- | |
| 23 | */ | |
| 24 | package go v.va.med.i maging.exc hange.busi ness; | |
| 25 | ||
| 26 | import gov .va.med.im aging.arti factsource .ResolvedA rtifactSou rceImpl; | |
| 27 | import jav a.io.Seria lizable; | |
| 28 | import jav a.net.Malf ormedURLEx ception; | |
| 29 | import jav a.net.URL; | |
| 30 | import jav a.util.Arr ayList; | |
| 31 | import jav a.util.Lis t; | |
| 32 | import org .apache.lo gging.log4 j.LogManag er; | |
| 33 | import org .apache.lo gging.log4 j.Logger; | |
| 34 | ||
| 35 | /** | |
| 36 | * A value object to contain a Site and the associ ated URLs to contact that Site . | |
| 37 | * The URL S are the URL of the complete path to th e needed e ndpoint. Proxies us ing | |
| 38 | * these U RLs may no t use all of the pat h informat ion but th ey should use | |
| 39 | * the hos t and port informati on. | |
| 40 | * | |
| 41 | * @author
|
|
| 42 | * | |
| 43 | */ | |
| 44 | public cla ss Resolve dSiteImpl | |
| 45 | extends Re solvedArti factSource Impl | |
| 46 | implements ResolvedS ite, Seria lizable | |
| 47 | { | |
| 48 | pr ivate stat ic final l ong serial VersionUID = 1L; | |
| 49 | ||
| 50 | // ========= ========== ========== ========== ========== ========== ========== ========== | |
| 51 | // Factory M ethods and related h elpers | |
| 52 | // ========= ========== ========== ========== ========== ========== ========== ========== | |
| 53 | ||
| 54 | /* * | |
| 55 | * A conveni ence const ructor to create an instance w ith a | |
| 56 | * Site and any number of associ ated URL i nstances i n a Sorted Set. | |
| 57 | * | |
| 58 | * @param si te | |
| 59 | * @param ur ls | |
| 60 | * / | |
| 61 | pu blic stati c Resolved SiteImpl c reate( | |
| 62 | Site site, | |
| 63 | bool ean localS ite, | |
| 64 | bool ean alienS ite, | |
| 65 | bool ean enable d, | |
| 66 | List <URL> meta dataUrls, | |
| 67 | List <URL> arti factUrls) | |
| 68 | { | |
| 69 | retu rn new Res olvedSiteI mpl(site, localSite, alienSite , enabled, metadataU rls, artif actUrls); | |
| 70 | } | |
| 71 | ||
| 72 | pr ivate stat ic Resolve dSiteImpl localResol vedTestSit e = null; | |
| 73 | pu blic stati c synchron ized Resol vedSiteImp l createLo calResolve dTestSite( ) | |
| 74 | th rows Malfo rmedURLExc eption | |
| 75 | { | |
| 76 | if(l ocalResolv edTestSite == null) | |
| 77 | { | |
| 78 | SiteIm pl localTe stSite = S iteImpl.cr eateLocalT estSite(); | |
| 79 | List<U RL> metada taUrls = n ew ArrayLi st<URL>(); | |
| 80 | List<U RL> artifa ctUrls = n ew ArrayLi st<URL>(); | |
| 81 | ||
| 82 | metada taUrls.add (new URL(" vista://12 7.0.0.1:90 03")); | |
| 83 | metada taUrls.add (new URL(" vftp://127 .0.0.1:808 0/")); | |
| 84 | ||
| 85 | artifa ctUrls.add (new URL(" vista://12 7.0.0.1:90 03")); | |
| 86 | artifa ctUrls.add (new URL(" vftp://127 .0.0.1:808 0/")); | |
| 87 | ||
| 88 | localR esolvedTes tSite = Re solvedSite Impl.creat e(localTes tSite, tru e, true, t rue, | |
| 89 | metadata Urls, | |
| 90 | artifact Urls | |
| 91 | ); | |
| 92 | } | |
| 93 | ||
| 94 | retu rn localRe solvedTest Site; | |
| 95 | } | |
| 96 | ||
| 97 | // ========= ========== ========== ========== ========== ========== ========== ========== | |
| 98 | // Instance Members | |
| 99 | // ========= ========== ========== ========== ========== ========== ========== ========== | |
| 100 | pr ivate bool ean localS ite; | |
| 101 | pr ivate bool ean alienS ite; | |
| 102 | pr ivate bool ean enable d; | |
| 103 | ||
| 104 | pr ivate stat ic transie nt Logger logger = L ogManager. getLogger( ResolvedSi teImpl.cla ss); | |
| 105 | ||
| 106 | /* * | |
| 107 | * Construct a Resolve dSite with a Site an d a Sorted Set | |
| 108 | * of associ ated URL i nstances. | |
| 109 | * | |
| 110 | * @param si te | |
| 111 | * @param ar tifactUrls | |
| 112 | * @param me tadataUrls | |
| 113 | * @param ur ls | |
| 114 | * / | |
| 115 | pr ivate Reso lvedSiteIm pl( | |
| 116 | Site s ite, | |
| 117 | boolea n localSit e, | |
| 118 | boolea n alienSit e, | |
| 119 | boolea n enabled, | |
| 120 | List<U RL> metada taUrls, | |
| 121 | List<U RL> artifa ctUrls) | |
| 122 | { | |
| 123 | super(si te, metada taUrls, ar tifactUrls ); | |
| 124 | this.loc alSite = l ocalSite; | |
| 125 | this.ali enSite = a lienSite; | |
| 126 | this.ena bled = ena bled; | |
| 127 | } | |
| 128 | ||
| 129 | /* * | |
| 130 | * @se e gov.va.m ed.imaging .exchange. business.R esolvedSit e#getSite( ) | |
| 131 | */ | |
| 132 | @O verride | |
| 133 | pu blic Site getSite() | |
| 134 | { | |
| 135 | re turn (Site )getArtifa ctSource() ; | |
| 136 | } | |
| 137 | ||
| 138 | @O verride | |
| 139 | public boolean i sLocalSite () | |
| 140 | { | |
| 141 | return l ocalSite; | |
| 142 | } | |
| 143 | ||
| 144 | @O verride | |
| 145 | pu blic boole an isAlien Site() | |
| 146 | { | |
| 147 | re turn alien Site; | |
| 148 | } | |
| 149 | ||
| 150 | @O verride | |
| 151 | pu blic boole an isAlien () | |
| 152 | { | |
| 153 | retu rn isAlien Site(); | |
| 154 | } | |
| 155 | ||
| 156 | @O verride | |
| 157 | pu blic boole an isLocal () | |
| 158 | { | |
| 159 | retu rn isLocal Site(); | |
| 160 | } | |
| 161 | ||
| 162 | @O verride | |
| 163 | pu blic boole an isEnabl ed() | |
| 164 | { | |
| 165 | retu rn enabled ; | |
| 166 | } | |
| 167 | ||
| 168 | @O verride | |
| 169 | pu blic Strin g toString () | |
| 170 | { | |
| 171 | Stri ngBuilder sb = new S tringBuild er(); | |
| 172 | ||
| 173 | sb.a ppend( sup er.toStrin g() ); | |
| 174 | sb.a ppend( ' ' ); | |
| 175 | sb.a ppend( isL ocal() ? " LOCAL SITE " : "REMOT E SITE"); | |
| 176 | sb.a ppend( ' ' ); | |
| 177 | sb.a ppend( isA lien() ? " ALIEN SITE " : "NATIV E SITE"); | |
| 178 | sb.a ppend( ' ' ); | |
| 179 | sb.a ppend( isE nabled() ? "SITE ENA BLED" : "S ITE DISABL ED"); | |
| 180 | ||
| 181 | retu rn sb.toSt ring(); | |
| 182 | } | |
| 183 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.