3797. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 6/9/2017 3:50:36 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.

3797.1 Files compared

# Location File Last Modified
1 Fri Jun 9 19:50:36 2017 UTC
2 eHealth_Exch (eHealth Exchange Enhancements) Build 3 docs & code_May_2017.zip\VAP_CIF_CODE0502.zip\VAP_CIF_CODE0502\VAP_CIF_CODE0502\nvap-mock\src\main\java\gov\va\nvap\mock\endpoint\adapter MockAdapterDocRetrievePortImpl.java Fri Apr 21 20:03:28 2017 UTC

3797.2 Comparison summary

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

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

3797.4 Active regular expressions

No regular expressions were active.

3797.5 Comparison detail

        1   package go v.va.nvap. mock.endpo int.adapte r;
        2  
        3   import gov .hhs.fha.n hinc.commo n.nhinccom monadapter .Respondin gGatewayCr ossGateway RetrieveRe quest;
        4   import gov .va.nvap.c ommon.file .FileUtil;
        5   import gov .va.nvap.c ommon.tran sformer.Tr ansformerE xception;
        6   import gov .va.nvap.c ommon.tran sformer.xm l.XMLToStr ing;
        7   import gov .va.nvap.c ommon.vali dation.Nul lChecker;
        8   import ihe .iti.xds_b ._2007.Ret rieveDocum entSetRequ estType.Do cumentRequ est;
        9   import ihe .iti.xds_b ._2007.Ret rieveDocum entSetResp onse;
        10   import ihe .iti.xds_b ._2007.Ret rieveDocum entSetResp onseType.D ocumentRes ponse;
        11  
        12   import jav a.io.IOExc eption;
        13   import jav a.util.Arr ayList;
        14   import jav a.util.Lis t;
        15  
        16   import jav ax.xml.tra nsform.Res ult;
        17   import jav ax.xml.tra nsform.dom .DOMResult ;
        18  
        19   import org .apache.co mmons.logg ing.Log;
        20   import org .apache.co mmons.logg ing.LogFac tory;
        21   import org .springfra mework.bea ns.factory .annotatio n.Autowire d;
        22   import org .springfra mework.con text.Appli cationCont ext;
        23   import org .springfra mework.cor e.io.Resou rce;
        24   import org .springfra mework.oxm .Marshalle r;
        25   import org .springfra mework.ws. client.cor e.WebServi ceTemplate ;
        26   import org .springfra mework.ws. transport. WebService MessageSen der;
        27  
        28   public cla ss MockAda pterDocRet rievePortI mpl extend s WebServi ceTemplate  {
        29  
        30           pr ivate stat ic final L og LOG = L ogFactory
        31                             .getLo g(MockAdap terDocRetr ievePortIm pl.class);
        32  
        33           @A utowired
        34           Ap plicationC ontext app licationCo ntext;
        35  
        36           pr ivate int  randomC32C ount = 0;
        37           Li st<String>  randomC32 s;
        38           pr ivate int  randomDocC ount = 0;
        39           Li st<String>  randomDoc s;
        40  
        41           pu blic MockA dapterDocR etrievePor tImpl() {
        42           }
        43  
        44           @O verride
        45           pu blic void  afterPrope rtiesSet()  {
        46  
        47           }
        48  
        49           @O verride
        50           pr otected vo id initDef aultStrate gies() {
        51           }
        52  
        53           @O verride
        54           pu blic Objec t marshalS endAndRece ive(final  Object req uestPayloa d) {
        55                    if ( MockAdapte rDocRetrie vePortImpl .LOG.isInf oEnabled() ) {
        56                             try {
        57                                      final Re sult resul t = new DO MResult();
        58                                      final Ma rshaller m arshaller  = this.get Marshaller ();
        59                                      marshall er.marshal (requestPa yload, res ult);
        60                                      final St ring reque st = new X MLToString ()
        61                                                       .t ransform(( org.w3c.do m.Document ) ((DOMRes ult) resul t)
        62                                                                         .getNo de());
        63                                      MockAdap terDocRetr ievePortIm pl.LOG.inf o(request) ;
        64                             } catc h (final T ransformer Exception  ex) {
        65                                      throw ne w RuntimeE xception(e x);
        66                             } catc h (final I OException  ex) {
        67                                      throw ne w RuntimeE xception(e x);
        68                             }
        69                    }
        70  
        71                    retu rn this
        72                                      .respond ingGateway CrossGatew ayRetrieve ((Respondi ngGatewayC rossGatewa yRetrieveR equest) re questPaylo ad);
        73           }
        74  
        75           pu blic Retri eveDocumen tSetRespon se respond ingGateway CrossGatew ayRetrieve (
        76                             final  Responding GatewayCro ssGatewayR etrieveReq uest respo ndingGatew ayCrossGat ewayRetrie veRequest)  {
        77                    fina l Document Response d ocumentRes ponse = ne w Document Response() ;
        78                    fina l Document Request re quest = re spondingGa tewayCross GatewayRet rieveReque st
        79                                      .getRetr ieveDocume ntSetReque st().getDo cumentRequ est().get( 0);
        80                    Stri ng respons eDoc = "";
        81                    if ( NullChecke r.isNotEmp ty(request .getDocume ntUniqueId ())) {
        82                             if (th is.randomD ocs.size()  > this.ra ndomDocCou nt) {
        83                                      response Doc = this .randomDoc s.get(this .randomDoc Count);
        84                             } else  {
        85                                      this.ran domDocCoun t = 0;
        86                                      response Doc = this .randomDoc s.get(this .randomDoc Count);
        87                             }
        88                             this.r andomDocCo unt++;
        89                    } el se {
        90                             if (th is.randomC 32s.size()  > this.ra ndomC32Cou nt) {
        91                                      response Doc = this .randomC32 s.get(this .randomC32 Count);
        92                             } else  {
        93                                      this.ran domC32Coun t = 0;
        94                                      response Doc = this .randomC32 s.get(this .randomC32 Count);
        95                             }
        96                             this.r andomC32Co unt++;
        97                    }
        98                    docu mentRespon se.setDocu ment(respo nseDoc.get Bytes());
        99                    fina l Retrieve DocumentSe tResponse  retrieveDo cumentSetR esponse =  new Retrie veDocument SetRespons e();
        100                    retr ieveDocume ntSetRespo nse.getDoc umentRespo nse().add( documentRe sponse);
        101                    retu rn retriev eDocumentS etResponse ;
        102           }
        103  
        104           pu blic Strin g returnC3 2Response( ) throws I OException  {
        105                    fina l org.spri ngframewor k.core.io. Resource r esource =  this.appli cationCont ext
        106                                      .getReso urce("clas spath:gov/ va/nvap/mo ck/endpoin t/adapter/ doc/Utah 2 011 03 05  CCD.XML");
        107                    fina l String u tahC32 = F ileUtil.ge tResource( resource);
        108                    retu rn utahC32 ;
        109           }
        110  
        111           pu blic Strin g returnC6 2Response( ) throws I OException  {
        112                    fina l org.spri ngframewor k.core.io. Resource r esource =  this.appli cationCont ext
        113                                      .getReso urce("clas spath:gov/ va/nvap/mo ck/endpoin t/adapter/ report/Jos eph Nhinpa tient XDS- SD.xml");
        114                    fina l String j osephC62 =  FileUtil. getResourc e(resource );
        115                    retu rn josephC 62;
        116           }
        117  
        118           pu blic void  setRandomC 32s(final  List<Resou rce> rando mFiles)
        119                             throws  IOExcepti on {
        120                    this .randomC32 s = new Ar rayList<St ring>();
        121                    for  (final Res ource res  : randomFi les) {
        122                             final  String som eFile = Fi leUtil.get Resource(r es);
        123                             this.r andomC32s. add(someFi le);
        124                    }
        125           }
        126  
        127           pu blic void  setRandomF iles(final  List<Reso urce> rand omFiles)
        128                             throws  IOExcepti on {
        129                    this .randomDoc s = new Ar rayList<St ring>();
        130                    for  (final Res ource res  : randomFi les) {
        131                             final  String som eFile = Fi leUtil.get Resource(r es);
        132                             this.r andomDocs. add(someFi le);
        133                    }
        134           }
        135  
        136           @O verride
        137           pu blic void  setMessage Sender(Web ServiceMes sageSender  messageSe nder) {
        138                    // T ODO Auto-g enerated m ethod stub
        139                    supe r.setMessa geSender(m essageSend er);
        140           }
        141   }