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

402.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 VistaImagingUserAuthenticationDataSourceService.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 VistaImagingUserAuthenticationDataSourceService.java Mon Dec 4 22:06:54 2017 UTC

402.2 Comparison summary

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

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

402.4 Active regular expressions

No regular expressions were active.

402.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  21, 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 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.im aging.arti factsource .ResolvedA rtifactSou rce;
  34   import gov .va.med.im aging.core .interface s.exceptio ns.Connect ionExcepti on;
  35   import gov .va.med.im aging.core .interface s.exceptio ns.Credent ialsExpire dException ;
  36   import gov .va.med.im aging.core .interface s.exceptio ns.Invalid UserCreden tialsExcep tion;
  37   import gov .va.med.im aging.core .interface s.exceptio ns.MethodE xception;
  38   import gov .va.med.im aging.data source.Use rAuthentic ationSpi;
  39   import gov .va.med.im aging.data source.exc eptions.In validCrede ntialsExce ption;
  40   import gov .va.med.im aging.exch ange.busin ess.Resolv edSite;
  41   import gov .va.med.im aging.tran sactioncon text.Trans actionCont ext;
  42   import gov .va.med.im aging.tran sactioncon text.Trans actionCont extFactory ;
  43   import gov .va.med.im aging.vist adatasourc e.common.V istaCommon Utilities;
  44   import gov .va.med.im aging.vist adatasourc e.session. VistaSessi on;
  45  
  46   /**
  47    * @author         
WERFEJ
  48    *
  49    */
  50   public cla ss VistaIm agingUserA uthenticat ionDataSou rceService
  51   extends Vi staImaging UserAuthor izationDat aSourceSer vice
  52   implements  UserAuthe nticationS pi
  53   {
  54  
  55           pr ivate Logg er logger  = LogManag er.getLogg er(VistaIm agingUserA uthenticat ionDataSou rceService .class);
  56           
  57           pu blic final  static St ring SUPPO RTED_PROTO COL = "vis taimaging" ;
  58           
  59       /**
  60            *  @param re solvedArti factSource
  61            *  @param pr otocol
  62            * /
  63           pu blic Vista ImagingUse rAuthentic ationDataS ourceServi ce(Resolve dArtifactS ource reso lvedArtifa ctSource,  String pro tocol)
  64           {
  65                    supe r(resolved ArtifactSo urce, prot ocol);
  66                    if(!  (resolved ArtifactSo urce insta nceof Reso lvedSite)  )
  67                             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() +  "'.");
  68           }
  69           
  70           /*  (non-Java doc)
  71            *  @see gov. va.med.ima ging.datas ource.User Authentica tionDataSo urce#isVer sionCompat ible()
  72            * /
  73           @O verride
  74           pu blic boole an isVersi onCompatib le() 
  75           {
  76                    retu rn true;
  77           }
  78  
  79           /*  (non-Java doc)
  80            *  @see gov. va.med.ima ging.datas ource.User Authentica tionSpi#au thenticate User(java. lang.Strin g, java.la ng.String)
  81            * /
  82           @O verride
  83           pu blic void  authentica teUser()
  84           th rows Metho dException , Connecti onExceptio n
  85           {
  86                    Vist aCommonUti lities.set DataSource MethodAndV ersion("au thenticate User", get DataSource Version()) ;
  87                    logg er.info("a uthenticat eUser Tran sactionCon text (" +  Transactio nContextFa ctory.get( ).getTrans actionId()  + ").");
  88                    try
  89                    {
  90                             VistaS ession.aut henticateU ser(getMet adataUrl() , getSite( ));
  91                             Transa ctionConte xt transac tionContex t = Transa ctionConte xtFactory. get(); 
  92                             String  applicati onName = t ransaction Context.ge tBrokerSec urityAppli cationName ();
  93                             if(app licationNa me == null  || applic ationName. length() < = 0)
  94                             {
  95                                      logger.w arn("No ap plication  name speci fied, cann ot generat e BSE toke n");
  96                             }
  97                             else
  98                             {
  99                                      String b seToken = 
  100                                               getUserTok en(transac tionContex t.getBroke rSecurityA pplication Name());
  101                                      transact ionContext .setBroker SecurityTo ken(bseTok en);
  102                             }        
  103                    }
  104                    catc h(InvalidC redentials Exception  icX)
  105                    {                         
  106                             // con vert from  a Connecti onExceptio n base to  a MethodEx ception (s o that it  is fatal a nd no othe r path is  attempted)
  107                             
  108                             // klu dgey way t o get prop er excepti on thrown  so it is a vailable t o users
  109                             if(icX .getMessag e() != nul l && icX.g etMessage( ).contains ("Expired  Verify Cod e"))
  110                             {
  111                                      throw ne w Credenti alsExpired Exception( icX.getMes sage(), ic X);
  112                             }
  113                             else
  114                             {                         
  115                                      throw ne w InvalidU serCredent ialsExcept ion(icX.ge tMessage() , icX);
  116                             }
  117                    }
  118                    catc h(IOExcept ion ioX)
  119                    {
  120                             throw  new Connec tionExcept ion(ioX);
  121                    }
  122           }
  123           
  124           pr otected St ring getDa taSourceVe rsion()
  125           {
  126                    retu rn "1";
  127           }
  128   }