1974. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 4/18/2019 5:56:03 PM Eastern Daylight 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.

1974.1 Files compared

# Location File Last Modified
1 MCCF_EDI_TAS_TASCore v2.0_Build_10.zip\MCCF_EDI_TAS_Vistalink\VistaLink\src\main\java\gov\va\med\vistalink\rpc RpcXmlRequestFactory.java Wed Apr 3 02:27:44 2019 UTC
2 MCCF_EDI_TAS_TASCore v2.0_Build_10.zip\MCCF_EDI_TAS_Vistalink\VistaLink\src\main\java\gov\va\med\vistalink\rpc RpcXmlRequestFactory.java Mon Apr 15 17:37:58 2019 UTC

1974.2 Comparison summary

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

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

1974.4 Active regular expressions

No regular expressions were active.

1974.5 Comparison detail

  1   package go v.va.med.v istalink.r pc;
  2  
  3   import gov .va.med.ex ception.Ex ceptionUti ls;
  4   import gov .va.med.ex ception.Fo undationsE xception;
  5   import gov .va.med.vi stalink.ad apter.spi. VistaLinkM anagedConn ectionFact ory;
  6   import gov .va.med.xm l.XmlUtili ties;
  7   import io. netty.util .internal. logging.In ternalLogg er;
  8   import io. netty.util .internal. logging.Lo g4JLoggerF actory;
  9  
  10   /**
  11    * Factory  class to  creates in stances of  RpcXmlReq uest from  an RpcRequ est, used  when in no n-propriet ary (XML)
  12    * communi cation mod e.
  13    * 
  14    * <p>
  15    * J2SE Ex ample:
  16    * <p>
  17    * <code>
  18    *    //re quest  and  response  objects <b r>
  19    *   RpcRe quest vReq  = null; < br>
  20    *   RpcRe sponse vRe sp = null;
  21    * <p>   
  22    *   //The  Rpc Conte xt<br>
  23    *   Strin g rpcConte xt = &quot ;XOBV VIST ALINK TEST ER&quot;;
  24    * <p>   
  25    *   //The  Rpc to ca ll<br>
  26    *   Strin g rpcName  = &quot;XO BV TEST PI NG&quot;;
  27    * <p>   
  28    *   //Con struct  th e request  object <br >
  29    *   vReq  = RpcReque stFactory. getRpcRequ est(rpcCon text, rpcN ame);
  30    * <p>   
  31    *   //Exe cute the R pc and get  the respo nse<br>
  32    *   vResp  = myConne ction.exec uteRPC(vRe q);
  33    * <p>   
  34    *   //Wor k with the  response  ...
  35    * </code>
  36    * 
  37    */
  38   class RpcX mlRequestF actory {
  39  
  40           /* *
  41            *  the logge r used by  this class
  42            * /
  43           pr ivate stat ic final I nternalLog ger LOGGER  = Log4JLo ggerFactor y.getInsta nce(RpcXml RequestFac tory.class );
  44  
  45           /* *
  46            *  Creates a  RpcXmlReq uest with  a null Rpc Context an d RpcName
  47            *  
  48            *  @return R pcXmlReque st
  49            *  @throws F oundations Exception
  50            * /
  51           st atic RpcXm lRequest g etRpcXmlRe quest(RpcR equest rpc Request) t hrows Foun dationsExc eption {
  52                    try  {
  53                             RpcXml Request rp cXmlReques t = new Rp cXmlReques t(XmlUtili ties.getDo cumentForX mlString(g etBaseXml( )));
  54  
  55                             if (rp cRequest.g etRpcName( ) != null)  {
  56                                      rpcXmlRe quest.setR pcName(rpc Request.ge tRpcName() );
  57                             }
  58                             if (rp cRequest.g etRpcConte xt() != nu ll) {
  59                                      rpcXmlRe quest.setR pcContext( rpcRequest .getRpcCon text());
  60                             }
  61                             if (rp cRequest.g etRpcClien tTimeOut()  > 0) {
  62                                      rpcXmlRe quest.setR pcClientTi meOut(rpcR equest.get RpcClientT imeOut());
  63                             }
  64                             rpcXml Request.se tRpcVersio n(rpcReque st.getRpcV ersion());
  65                             if (rp cRequest.g etVlConnSp ec() != nu ll) {
  66                                      rpcXmlRe quest.setR eAuthentic ateInfo(rp cRequest.g etVlConnSp ec());
  67                             }
  68                             buildP arams(rpcR equest.get Params(),  rpcXmlRequ est.getPar ams());
  69                             return  rpcXmlReq uest;
  70                    } ca tch (Found ationsExce ption e) {
  71                             if (LO GGER.isErr orEnabled( )) {
  72                                      LOGGER.e rror((new  StringBuff er()).appe nd("Can no t create R pcXmlReque st.").appe nd("\n\t") .append(
  73                                                       Ex ceptionUti ls.getFull StackTrace (e)).toStr ing());
  74                             }
  75                             throw  e;
  76                    }
  77           }
  78  
  79           pr ivate stat ic void bu ildParams( RpcRequest Params par ams, RpcXm lRequestPa rams xmlPa rams) {
  80                    // g et number  of paramet ers
  81                    int  paramCount  = params. getParams( ).size();
  82                    // i f no param eters exit
  83                    if ( paramCount  == 0)
  84                             return ;
  85                    // b uild param eters
  86                    RpcR equestPara m param =  null;
  87                    int  posNumber  = 0;
  88                    Stri ng posStri ng;
  89                    for  (int i = 0 ; i < para mCount; i+ +) {
  90                             posNum ber = i +  1;
  91                             posStr ing = Stri ng.valueOf (posNumber );
  92                             if (pa rams.getPa rams().con tainsKey(S tring.valu eOf(posStr ing))) {
  93                                      param =  (RpcReques tParam) pa rams.getPa rams().get (posString );
  94                                      xmlParam s.setParam (posNumber , param.ge tType(), p aram.getVa lue());
  95                             }
  96                    }
  97           }
  98  
  99           /* *
  100            *  Returns t he base xm l string u sed to con struct a R pcRequest.
  101            *  
  102            *  @return S tring
  103            * /
  104           pr ivate stat ic String  getBaseXml () {
  105                    retu rn XmlUtil ities.XML_ HEADER + " <VistaLink  messageTy pe='" + Rp cXmlReques t.GOV_VA_M ED_RPC_REQ UEST + "'"
  106                                      + " mode ='singleto n'" + " ve rsion='"
  107                                      + VistaL inkManaged Connection Factory.AD APTER_VERS ION
  108                                      + "'"
  109                                      + " xmln s:xsi='htt p://www.w3 .org/2001/ XMLSchema- instance'"
  110                                      + " xsi: noNamespac eSchemaLoc ation='rpc Request.xs d'"
  111                                       // + " xml ns='http:/ / URL         /Foundatio ns'"
  112                                      + ">" +  "  <RpcHan dler versi on='" + Rp cRequest.R PC_HANDLER _VERSION +  "'/>"
  113                                      + "  <Re quest rpcN ame='' rpc ClientTime Out='600'  rpcVersion ='0' >"
  114                                      + "    < Security t ype='' sta te='virgin ' division =''></Secu rity>" + "     <RpcCo ntext></Rp cContext>"
  115                                      + "    < Params></P arams>" +  "  </Reque st>" + "</ VistaLink> ";
  116           }
  117   }