399. 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.

399.1 Files compared

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

399.2 Comparison summary

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

399.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

399.4 Active regular expressions

No regular expressions were active.

399.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: Jul  8, 2011
  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 taimagingd atasource;
  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    * @author         
WERFEJ
  52    *
  53    */
  54   public cla ss VistaIm agingSiteD ataSourceS ervice
  55   extends Ab stractVers ionableDat aSource
  56   implements  SiteDataS ourceSpi
  57   {
  58  
  59           /*  ========= ========== ========== ========== ========== ========== ==========
  60            *  Instance  fields and  methods
  61            *  ========= ========== ========== ========== ========== ========== ==========  */
  62           pr ivate fina l static L ogger logg er = 
  63                    LogM anager.get Logger(Vis taImagingS iteDataSou rceService .class);
  64           
  65           pu blic final  static St ring SUPPO RTED_PROTO COL = "vis taimaging" ;
  66           pu blic final  static St ring MAG_R EQUIRED_VE RSION = "3 .0P45";
  67           
  68           /* *
  69            *  @param re solvedArti factSource
  70            *  @param pr otocol
  71            * /
  72           pu blic Vista ImagingSit eDataSourc eService(R esolvedArt ifactSourc e resolved ArtifactSo urce,
  73                    Stri ng protoco l)
  74           {
  75                    supe r(resolved ArtifactSo urce, prot ocol);
  76                    if(!  (resolved ArtifactSo urce insta nceof Reso lvedSite)  )
  77                             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() +  "'.");
  78           }
  79  
  80           /* *
  81            *  The artif act source  must be c hecked in  the constr uctor to a ssure that  it is an  instance
  82            *  of Resolv edSite.
  83            *  
  84            *  @return
  85            * /
  86           pr otected Re solvedSite  getResolv edSite()
  87           {
  88                    retu rn (Resolv edSite)get ResolvedAr tifactSour ce();
  89           }
  90           
  91           pr otected Si te getSite ()
  92           {
  93                    retu rn getReso lvedSite() .getSite() ;
  94           }
  95  
  96           @O verride
  97           pu blic Welco meMessage  getWelcome Message(Ro utingToken  globalRou tingToken)
  98           th rows Metho dException , Connecti onExceptio n
  99           {
  100                    Vist aCommonUti lities.set DataSource MethodAndV ersion("ge tWelcomeMe ssage", ge tDataSourc eVersion() );
  101                    logg er.info("g etWelcomeM essage Tra nsactionCo ntext (" +  Transacti onContextF actory.get ().getTran sactionId( ) + ").");
  102                    try
  103                    {
  104                             String  welcomeMe ssage = Vi staSession .getWelcom eMessage(g etMetadata Url(), get Site());
  105                             return  new Welco meMessage( welcomeMes sage);
  106                    }
  107                    catc h(VistaMet hodExcepti on vmX)
  108                    {
  109                             throw  new Method Exception( vmX);
  110                    }
  111                    catc h(InvalidV istaCreden tialsExcep tion icX)
  112                    {
  113                             throw  new Invali dCredentia lsExceptio n(icX);
  114                    }
  115                    catc h(IOExcept ion ioX)
  116                    {
  117                             throw  new Connec tionExcept ion(ioX);
  118                    }
  119           }
  120           
  121           @O verride
  122           pu blic boole an isVersi onCompatib le() 
  123           th rows Secur ityExcepti on
  124           {
  125                    
  126                    // T his SPI co ntains a m ethod (get WelcomeMes sage) that  is called  from an u nauthentic ated conne ction.
  127                    // T his preven ts us from  calling M AG_REQUIRE D_VERSION,  which doe s require  authentica tion.
  128                    // T hese RPCs  (get user  keys, and  get welcom e message)  should be  safely av ailable ev erywhere,
  129                    // s o just ret urn true.
  130                    retu rn true;
  131           }
  132           
  133           pr otected St ring getDa taSourceVe rsion()
  134           {
  135                    retu rn "1";
  136           }
  137   }