14104. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 1/4/2018 4:54:42 PM Eastern 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.

14104.1 Files compared

# Location File Last Modified
1 CHAMPVA_Benefit_Eligibility_v1.0.0.zip\webservice\vlh\src\main\java\gov\va\med\mbac\vlh\impl VistaLinkHelper.java Thu Dec 21 19:52:28 2017 UTC
2 CHAMPVA_Benefit_Eligibility_v1.0.0.zip\webservice\vlh\src\main\java\gov\va\med\mbac\vlh\impl VistaLinkHelper.java Thu Jan 4 21:05:01 2018 UTC

14104.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 394
Changed 1 2
Inserted 0 0
Removed 0 0

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

14104.4 Active regular expressions

No regular expressions were active.

14104.5 Comparison detail

  1   /**
  2    * The pac kage gov.v a.med.mbac .vlh.impl  contains t he VistaLi nkHelper C lass,
  3    * which i mplements  the IVista LinkHelper  interface .
  4    * 
  5    */
  6   package go v.va.med.m bac.vlh.im pl;
  7  
  8   import gov .va.med.mb ac.vlh.com mon.IVista LinkHelper ;
  9   import gov .va.med.vi stalink.ad apter.cci. VistaLinkA ppProxyCon nectionSpe c;
  10   import gov .va.med.vi stalink.ad apter.cci. VistaLinkC onnection;
  11   import gov .va.med.vi stalink.ad apter.cci. VistaLinkC onnectionF actory;
  12   import gov .va.med.vi stalink.ad apter.cci. VistaLinkC onnectionS pec;
  13   import gov .va.med.vi stalink.ad apter.cci. VistaLinkD uzConnecti onSpec;
  14   import gov .va.med.vi stalink.in stitution. Institutio nMapNotIni tializedEx ception;
  15   import gov .va.med.vi stalink.in stitution. Institutio nMappingDe legate;
  16   import gov .va.med.vi stalink.in stitution. Institutio nMappingNo tFoundExce ption;
  17   import gov .va.med.vi stalink.rp c.RpcReque st;
  18  
  19   import jav ax.naming. InitialCon text;
  20   import jav ax.naming. NamingExce ption;
  21   import jav ax.resourc e.Resource Exception;
  22  
  23   import org .apache.lo g4j.Logger ;
  24   import org .springfra mework.bea ns.BeansEx ception;
  25   import org .springfra mework.con text.Appli cationCont ext;
  26   import org .springfra mework.con text.Appli cationCont extAware;
  27  
  28   /**
  29    * This is  the Vista LinkHelper  class, wh ich helps  preserve c oherence
  30    * and sin gle-respon sibility f or our DAO  classes b y handling  interacti ons
  31    * with Vi staLink on  their beh alf.
  32    * 
  33    * @author   PII
  34    * @versio n 1.0.0
  35    */
  36   public cla ss VistaLi nkHelper i mplements  IVistaLink Helper, Ap plicationC ontextAwar e {
  37  
  38           pr ivate stat ic final L ogger LOGG ER = Logge r.getLogge r(VistaLin kHelper.cl ass);
  39  
  40           pr ivate Appl icationCon text appCo ntext;
  41           pr ivate Init ialContext  initialCo ntext;
  42  
  43           /* *
  44            *  VistaLink Helper is  lazily ins tantiated  by Spring  DI
  45            *  
  46            *  @param In itialConte xt
  47            *  
  48            * /
  49           pu blic Vista LinkHelper (InitialCo ntext init ialContext ) {
  50                    supe r();
  51                    this .initialCo ntext = in itialConte xt;
  52           }
  53  
  54           /*
  55            *  (non-Java doc)
  56            *  
  57            *  @see gov. va.med.mba c.vpls.dao .common.IV istaLinkHe lper#getRp cRequest()
  58            * /
  59           @O verride
  60           pu blic RpcRe quest getR pcRequest( ) throws B eansExcept ion {
  61                    RpcR equest rpc Request;
  62                    
  63                    try  {
  64                             rpcReq uest = (Rp cRequest)  appContext .getBean(" rpcRequest ");
  65                             return  rpcReques t;                        
  66                    } ca tch (Beans Exception  be) {
  67                             LOGGER .fatal(be. getMessage ());
  68                             throw  be;
  69                    }
  70           }
  71  
  72           /*
  73            *  (non-Java doc)
  74            *  
  75            *  @see
  76            *  gov.va.me d.mbac.vpl s.dao.comm on.IVistaL inkHelper# getConnect ion(java.l ang.String
  77            *  , java.la ng.String)
  78            * /
  79           @O verride
  80           pu blic Vista LinkConnec tion getCo nnection(S tring site Id, String  duz)
  81                             throws  Instituti onMapNotIn itializedE xception,
  82                             Instit utionMappi ngNotFound Exception,  NamingExc eption,
  83                             Resour ceExceptio n {
  84  
  85                    Vist aLinkConne ction conn ection = n ull;
  86  
  87                    if ( (siteId ==  null) ||  siteId.equ als("")) {
  88                             throw  new Resour ceExceptio n("VistA S ite not id entified") ;
  89                    }
  90  
  91                    if ( (duz == nu ll) || duz .equals("" )) {
  92                             throw  new Resour ceExceptio n("User no t identifi ed");
  93                    }
  94  
  95                    Vist aLinkConne ctionSpec  connSpec =  new Vista LinkDuzCon nectionSpe c(
  96                                      siteId,  duz);
  97                    Stri ng jndiNam e;
  98  
  99                    try  {
  100                             jndiNa me = Insti tutionMapp ingDelegat e
  101                                               .getJndiCo nnectorNam eForInstit ution(site Id);
  102  
  103                             VistaL inkConnect ionFactory  connectio nFactory =  (VistaLin kConnectio nFactory)  initialCon text
  104                                               .lookup(jn diName);
  105                             connec tion = (Vi staLinkCon nection) c onnectionF actory.get Connection (connSpec) ;
  106                             /**
  107                              * Use  default t imeout for  now, cons ider imple menting de fault in
  108                              * pro perties fi le if need ed.
  109                              * 
  110                              * con nection.se tTimeOut(I nteger.par seInt(CRPr oServerPro ps.
  111                              * get Property(" vistalink_ socket_tim eout")));
  112                              */
  113  
  114                             return  connectio n;
  115  
  116                    } ca tch (Insti tutionMapN otInitiali zedExcepti on imnie)  {
  117                             LOGGER .fatal(imn ie.getMess age());
  118                             throw  imnie;
  119                    } ca tch (Insti tutionMapp ingNotFoun dException  imnfe) {
  120                             LOGGER .fatal(imn fe.getMess age());
  121                             throw  imnfe;
  122                    } ca tch (Namin gException  ne) {
  123                             LOGGER .fatal(ne. getMessage ());
  124                             throw  ne;
  125                    } ca tch (Resou rceExcepti on re) {
  126                             LOGGER .fatal(re. getMessage ());
  127                             throw  re;
  128                    }
  129  
  130           }
  131  
  132           /*  (non-Java doc)
  133            *  @see gov. va.med.mba c.vlh.comm on.IVistaL inkHelper# getAppProx yConnectio n(java.lan g.String,  java.lang. String)
  134            * /
  135           @O verride
  136           pu blic Vista LinkConnec tion getAp pProxyConn ection(Str ing siteId , String a ppProxyNam e)
  137                    thro ws Institu tionMapNot Initialize dException , Institut ionMapping NotFoundEx ception, N amingExcep tion,
  138                    Reso urceExcept ion {
  139  
  140                    Vist aLinkConne ction conn ection = n ull;
  141  
  142                    if ( (siteId ==  null) ||  siteId.equ als("")) {
  143                             throw  new Resour ceExceptio n("VistA S ite not id entified") ;
  144                    }
  145  
  146                    if ( (appProxyN ame == nul l) || appP roxyName.e quals(""))  {
  147                             throw  new Resour ceExceptio n("Applica tion Proxy  not ident ified");
  148                    }
  149  
  150                    Vist aLinkConne ctionSpec  connSpec =  new Vista LinkAppPro xyConnecti onSpec(
  151                                      siteId,  appProxyNa me);
  152  
  153                    Stri ng jndiNam e;
  154  
  155                    try  {
  156                             jndiNa me = Insti tutionMapp ingDelegat e
  157                                               .getJndiCo nnectorNam eForInstit ution(site Id);
  158  
  159                             VistaL inkConnect ionFactory  connectio nFactory =  (VistaLin kConnectio nFactory)  initialCon text
  160                                               .lookup(jn diName);
  161                             connec tion = (Vi staLinkCon nection) c onnectionF actory.get Connection (connSpec) ;
  162                             /**
  163                              * Use  default t imeout for  now, cons ider imple menting de fault in
  164                              * pro perties fi le if need ed.
  165                              * 
  166                              * con nection.se tTimeOut(I nteger.par seInt(CRPr oServerPro ps.
  167                              * get Property(" vistalink_ socket_tim eout")));
  168                              */
  169  
  170                             return  connectio n;
  171  
  172                    } ca tch (Insti tutionMapN otInitiali zedExcepti on imnie)  {
  173                             LOGGER .fatal(imn ie.getMess age());
  174                             throw  imnie;
  175                    } ca tch (Insti tutionMapp ingNotFoun dException  imnfe) {
  176                             LOGGER .fatal(imn fe.getMess age());
  177                             throw  imnfe;
  178                    } ca tch (Namin gException  ne) {
  179                             LOGGER .fatal(ne. getMessage ());
  180                             throw  ne;
  181                    } ca tch (Resou rceExcepti on re) {
  182                             LOGGER .fatal(re. getMessage ());
  183                             throw  re;
  184                    }
  185  
  186           }
  187  
  188           /*  (non-Java doc)
  189            *  @see org. springfram ework.cont ext.Applic ationConte xtAware#se tApplicati onContext( org.spring framework. context.Ap plicationC ontext)
  190            * /
  191           @O verride
  192           pu blic void  setApplica tionContex t(Applicat ionContext  ac)
  193                             throws  BeansExce ption {
  194                    this .appContex t = ac;
  195                    
  196           }
  197  
  198   }