386. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 12/5/2017 12:06:50 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.

386.1 Files compared

# Location File Last Modified
1 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\VistaDataSource\main\src\java\gov\va\med\imaging\vistadatasource VistaSiteDataSourceService.java Mon Dec 4 21:34:34 2017 UTC
2 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\VistaDataSource\main\src\java\gov\va\med\imaging\vistadatasource VistaSiteDataSourceService.java Mon Dec 4 22:06:29 2017 UTC

386.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 268
Changed 2 4
Inserted 0 0
Removed 0 0

386.3 Comparison options

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

386.4 Active regular expressions

No regular expressions were active.

386.5 Comparison detail

  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: Feb  24, 2012
  6     Site Nam e:  Washin gton OI Fi eld Office , Silver S pring, MD
  7       Developer:          
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.vis tadatasour ce;
  27  
  28   import jav a.io.IOExc eption;
  29  
  30   import org .apache.lo gging.log4 j.LogManag er;
  31   import org .apache.lo gging.log4 j.Logger;
  32  
  33   import gov .va.med.Ro utingToken ;
  34   import gov .va.med.im aging.arti factsource .ResolvedA rtifactSou rce;
  35   import gov .va.med.im aging.core .interface s.exceptio ns.Connect ionExcepti on;
  36   import gov .va.med.im aging.core .interface s.exceptio ns.MethodE xception;
  37   import gov .va.med.im aging.core .interface s.exceptio ns.Securit yException ;
  38   import gov .va.med.im aging.data source.Abs tractVersi onableData Source;
  39   import gov .va.med.im aging.data source.Sit eDataSourc eSpi;
  40   import gov .va.med.im aging.data source.exc eptions.In validCrede ntialsExce ption;
  41   import gov .va.med.im aging.exch ange.busin ess.Resolv edSite;
  42   import gov .va.med.im aging.exch ange.busin ess.Site;
  43   import gov .va.med.im aging.exch ange.busin ess.Welcom eMessage;
  44   import gov .va.med.im aging.tran sactioncon text.Trans actionCont extFactory ;
  45   import gov .va.med.im aging.url. vista.exce ptions.Inv alidVistaC redentials Exception;
  46   import gov .va.med.im aging.url. vista.exce ptions.Vis taMethodEx ception;
  47   import gov .va.med.im aging.vist adatasourc e.common.V istaCommon Utilities;
  48   import gov .va.med.im aging.vist adatasourc e.session. VistaSessi on;
  49  
  50   /**
  51    * This im plementati on is for  site speci fic method s from a s ite withou t VistA Im aging inst alled
  52    * 
  53    * @author         
WERFEJ
  54    *
  55    */
  56   public cla ss VistaSi teDataSour ceService
  57   extends Ab stractVers ionableDat aSource
  58   implements  SiteDataS ourceSpi
  59   {
  60           
  61           /*  ========= ========== ========== ========== ========== ========== ==========
  62            *  Instance  fields and  methods
  63            *  ========= ========== ========== ========== ========== ========== ==========  */
  64           pr ivate fina l static L ogger logg er = 
  65                    LogM anager.get Logger(Vis taSiteData SourceServ ice.class) ;
  66           
  67           pu blic final  static St ring SUPPO RTED_PROTO COL = "vis ta";
  68           
  69           /* *
  70            *  @param re solvedArti factSource
  71            *  @param pr otocol
  72            * /
  73           pu blic Vista SiteDataSo urceServic e(Resolved ArtifactSo urce resol vedArtifac tSource,
  74                    Stri ng protoco l)
  75           {
  76                    supe r(resolved ArtifactSo urce, prot ocol);
  77                    if(!  (resolved ArtifactSo urce insta nceof Reso lvedSite)  )
  78                             throw  new Unsupp ortedOpera tionExcept ion("The a rtifact so urce must  be an inst ance of Re solvedSite  and it is  a '" + re solvedArti factSource .getClass( ).getSimpl eName() +  "'.");
  79           }
  80  
  81           /* *
  82            *  The artif act source  must be c hecked in  the constr uctor to a ssure that  it is an  instance
  83            *  of Resolv edSite.
  84            *  
  85            *  @return
  86            * /
  87           pr otected Re solvedSite  getResolv edSite()
  88           {
  89                    retu rn (Resolv edSite)get ResolvedAr tifactSour ce();
  90           }
  91           
  92           pr otected Si te getSite ()
  93           {
  94                    retu rn getReso lvedSite() .getSite() ;
  95           }
  96  
  97           @O verride
  98           pu blic Welco meMessage  getWelcome Message(Ro utingToken  globalRou tingToken)
  99           th rows Metho dException , Connecti onExceptio n
  100           {
  101                    Vist aCommonUti lities.set DataSource MethodAndV ersion("ge tWelcomeMe ssage", ge tDataSourc eVersion() );
  102                    logg er.info("g etWelcomeM essage Tra nsactionCo ntext (" +  Transacti onContextF actory.get ().getTran sactionId( ) + ").");
  103                    try
  104                    {
  105                             String  welcomeMe ssage = Vi staSession .getWelcom eMessage(g etMetadata Url(), get Site());
  106                             return  new Welco meMessage( welcomeMes sage);
  107                    }
  108                    catc h(VistaMet hodExcepti on vmX)
  109                    {
  110                             throw  new Method Exception( vmX);
  111                    }
  112                    catc h(InvalidV istaCreden tialsExcep tion icX)
  113                    {
  114                             throw  new Invali dCredentia lsExceptio n(icX);
  115                    }
  116                    catc h(IOExcept ion ioX)
  117                    {
  118                             throw  new Connec tionExcept ion(ioX);
  119                    }
  120           }
  121           
  122           @O verride
  123           pu blic boole an isVersi onCompatib le() 
  124           th rows Secur ityExcepti on
  125           {
  126                    
  127                    // T his SPI co ntains a m ethod (get WelcomeMes sage) that  is called  from an u nauthentic ated conne ction.
  128                    // T his method  should be  available  to all si tes
  129                    retu rn true;
  130           }
  131           
  132           pr otected St ring getDa taSourceVe rsion()
  133           {
  134                    retu rn "1";
  135           }
  136   }