Produced by Araxis Merge on 12/5/2017 12:06:34 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\exchange\business\taglib\artifactsource | AbstractSiteCollectionTag.java | Mon Dec 4 21:35:32 2017 UTC |
| 2 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\BaseWebFacade\main\src\java\gov\va\med\imaging\exchange\business\taglib\artifactsource | AbstractSiteCollectionTag.java | Mon Dec 4 21:57:12 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 282 |
| 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: Mar 18, 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.tagli b.artifact source; | |
| 25 | ||
| 26 | import gov .va.med.im aging.exch ange.busin ess.Site; | |
| 27 | import gov .va.med.im aging.exch ange.busin ess.taglib .exception s.MissingR equiredArg umentExcep tion; | |
| 28 | ||
| 29 | import jav a.io.IOExc eption; | |
| 30 | import jav a.util.Col lection; | |
| 31 | import jav a.util.Ite rator; | |
| 32 | ||
| 33 | import jav ax.servlet .jsp.JspEx ception; | |
| 34 | import jav ax.servlet .jsp.tagex t.BodyTag; | |
| 35 | import jav ax.servlet .jsp.tagex t.BodyTagS upport; | |
| 36 | import jav ax.servlet .jsp.tagex t.Iteratio nTag; | |
| 37 | ||
| 38 | import org .apache.lo gging.log4 j.Logger; | |
| 39 | import org .apache.lo gging.log4 j.LogManag er; | |
| 40 | ||
| 41 | /** | |
| 42 | * An abst ract base class for a collecti on of Site instances . | |
| 43 | * Derived class mus t implemen t the getS ites() met hod, which | |
| 44 | * is call ed once pe r use of t his tag (o n doStartT ag()). | |
| 45 | * Child t ags, displ aying the Site insta nces, shou ld call th e | |
| 46 | * getCurr entSite() method to get the si te to disp lay. | |
| 47 | * | |
| 48 | * @author
|
|
| 49 | * | |
| 50 | */ | |
| 51 | public abs tract clas s Abstract SiteCollec tionTag | |
| 52 | extends Bo dyTagSuppo rt | |
| 53 | { | |
| 54 | pr ivate stat ic final l ong serial VersionUID = 1L; | |
| 55 | pr ivate Logg er logger = LogManag er.getLogg er(this.ge tClass()); | |
| 56 | pr ivate Stri ng emptyRe sultMessag e = null; | |
| 57 | ||
| 58 | pr ivate Coll ection<Sit e> sites; | |
| 59 | pr ivate Iter ator<Site> siteItera tor; | |
| 60 | pr ivate Site currentSi te; | |
| 61 | ||
| 62 | pr otected ab stract Col lection<Si te> getSit es() | |
| 63 | th rows JspEx ception, M issingRequ iredArgume ntExceptio n; | |
| 64 | ||
| 65 | /* * | |
| 66 | * The messa ge to show if the si te list is empty | |
| 67 | * @return | |
| 68 | * / | |
| 69 | pu blic Strin g getEmpty ResultMess age() | |
| 70 | { | |
| 71 | re turn empty ResultMess age; | |
| 72 | } | |
| 73 | ||
| 74 | pu blic void setEmptyRe sultMessag e(String e mptyResult Message) | |
| 75 | { | |
| 76 | th is.emptyRe sultMessag e = emptyR esultMessa ge; | |
| 77 | } | |
| 78 | ||
| 79 | // ========= ========== ========== ========== ========== ========== ========== ========= | |
| 80 | // JSP Tag L ifecycle E vents | |
| 81 | // ========= ========== ========== ========== ========== ========== ========== ========= | |
| 82 | ||
| 83 | /* * | |
| 84 | * Create an d expose t he current RequestCo ntext. Del egates to | |
| 85 | * {@link #d oStartTagI nternal()} for actua l work. | |
| 86 | * | |
| 87 | * @see #REQ UEST_CONTE XT_PAGE_AT TRIBUTE | |
| 88 | * @see org. springfram ework.web. servlet.su pport.JspA wareReques tContext | |
| 89 | * / | |
| 90 | pu blic final int doSta rtTag() | |
| 91 | th rows JspEx ception | |
| 92 | { | |
| 93 | try | |
| 94 | { | |
| 95 | site s = getSit es(); | |
| 96 | } | |
| 97 | catc h (Missing RequiredAr gumentExce ption e) | |
| 98 | { | |
| 99 | try{pa geContext. getOut().w rite(e.get Message()) ;} | |
| 100 | catch (IOExcepti on ioX){th row new Js pException (ioX);} | |
| 101 | ||
| 102 | return BodyTag.S KIP_BODY; | |
| 103 | } | |
| 104 | ||
| 105 | if(s ites == nu ll || site s.size() < 1) | |
| 106 | { | |
| 107 | if(g etEmptyRes ultMessage () != null ) | |
| 108 | try{pa geContext. getOut().w rite(getEm ptyResultM essage()); } | |
| 109 | catch( IOExceptio n ioX){log ger.error( "Unable to write emp ty result set messag e.");} | |
| 110 | ||
| 111 | return BodyTag.S KIP_BODY; | |
| 112 | } | |
| 113 | ||
| 114 | site Iterator = sites.ite rator(); | |
| 115 | curr entSite = siteIterat or.next(); | |
| 116 | retu rn BodyTag .EVAL_BODY _INCLUDE; | |
| 117 | } | |
| 118 | ||
| 119 | /* * | |
| 120 | * | |
| 121 | * @return | |
| 122 | * / | |
| 123 | pu blic Site getCurrent Site() | |
| 124 | { | |
| 125 | retu rn current Site; | |
| 126 | } | |
| 127 | ||
| 128 | @O verride | |
| 129 | public int doAft erBody() | |
| 130 | th rows JspEx ception | |
| 131 | { | |
| 132 | if(s iteIterato r.hasNext( )) | |
| 133 | { | |
| 134 | curren tSite = si teIterator .next(); | |
| 135 | return Iteration Tag.EVAL_B ODY_AGAIN; | |
| 136 | } | |
| 137 | else | |
| 138 | { | |
| 139 | curren tSite = nu ll; | |
| 140 | return Iteration Tag.SKIP_B ODY; | |
| 141 | } | |
| 142 | } | |
| 143 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.