Produced by Araxis Merge on 1/4/2018 4:54:41 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.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | CHAMPVA_Benefit_Eligibility_v1.0.0.zip\webservice\champvapay-service\src\main\java\gov\va\med\mbcp\champva\dao\impl | ChampVAPayDAO.java | Thu Dec 21 19:52:28 2017 UTC |
| 2 | CHAMPVA_Benefit_Eligibility_v1.0.0.zip\webservice\champvapay-service\src\main\java\gov\va\med\mbcp\champva\dao\impl | ChampVAPayDAO.java | Thu Jan 4 20:59:05 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 280 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| 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 |
No regular expressions were active.
| 1 | /** | |
| 2 | * The pac kage gov.v a.med.mbcp .champva.d ao.impl co ntains the public Im plementati on for | |
| 3 | * retriev al of CHAM PVA CodeRe sults from the targe t VistA in stance. | |
| 4 | * | |
| 5 | */ | |
| 6 | package go v.va.med.m bcp.champv a.dao.impl ; | |
| 7 | ||
| 8 | import jav ax.naming. NamingExce ption; | |
| 9 | import jav ax.resourc e.Resource Exception; | |
| 10 | ||
| 11 | import gov .va.med.ex ception.Fo undationsE xception; | |
| 12 | import gov .va.med.mb ac.vlh.com mon.IVista LinkHelper ; | |
| 13 | import gov .va.med.mb cp.champva .dao.commo n.IChampVA PayDAO; | |
| 14 | import gov .va.med.mb cp.champva .domain.co mmon.ICode Result; | |
| 15 | import gov .va.med.mb cp.champva .domain.im pl.ChampVA Exception; | |
| 16 | import gov .va.med.mb cp.champva .domain.im pl.ChampVA Foundation sException ; | |
| 17 | import gov .va.med.mb cp.champva .domain.im pl.ChampVA NamingExce ption; | |
| 18 | import gov .va.med.mb cp.champva .domain.im pl.ChampVA ResourceEx ception; | |
| 19 | import gov .va.med.mb cp.champva .domain.im pl.ChampVA VLFaultExc eption; | |
| 20 | import gov .va.med.mb cp.champva .domain.im pl.CodeRes ult; | |
| 21 | import gov .va.med.vi stalink.ad apter.cci. VistaLinkC onnection; | |
| 22 | import gov .va.med.vi stalink.ad apter.reco rd.VistaLi nkFaultExc eption; | |
| 23 | import gov .va.med.vi stalink.rp c.RpcReque st; | |
| 24 | import gov .va.med.vi stalink.rp c.RpcRespo nse; | |
| 25 | ||
| 26 | /** | |
| 27 | * The Cha mpVAPayDAO Class imp lements th e Data Acc ess Object for the C HAMPVA Pay Service. | |
| 28 | * | |
| 29 | * @author PII | |
| 30 | * @versio n 1.0.0 | |
| 31 | */ | |
| 32 | public cla ss ChampVA PayDAO imp lements IC hampVAPayD AO { | |
| 33 | ||
| 34 | privat e static f inal Strin g RPC_NAME = "CHSRVL KP VALIDCD "; | |
| 35 | privat e IVistaLi nkHelper v lHelper; | |
| 36 | privat e RpcReque st vReq; | |
| 37 | privat e String s iteId; | |
| 38 | privat e String a ppProxyNam e; | |
| 39 | ||
| 40 | /** | |
| 41 | * Thi s class is lazily co nstructed and manage d as a sin gleton by Spring DI. The | |
| 42 | * Vis taLinkHelp er is inje cted into the constr uctor, whi le the sit eId and | |
| 43 | * app ProxyName are inject ed into th eir respec tive sette rs. | |
| 44 | * | |
| 45 | * @pa ram vistaL inkHelper - the Vist aLinkHelpe r to be in jected | |
| 46 | */ | |
| 47 | public ChampVAPa yDAO(IVist aLinkHelpe r vistaLin kHelper) { | |
| 48 | su per(); | |
| 49 | ||
| 50 | th is.vlHelpe r = vistaL inkHelper; | |
| 51 | th is.vReq = vistaLinkH elper.getR pcRequest( ); | |
| 52 | } | |
| 53 | ||
| 54 | /* | |
| 55 | * (no n-Javadoc) | |
| 56 | * | |
| 57 | * @se e | |
| 58 | * gov .va.med.mb cp.champva .dao.commo n.IChampVA PayDAO#get CodeResult (java.lang | |
| 59 | * .St ring, java .lang.Stri ng) | |
| 60 | */ | |
| 61 | @Overr ide | |
| 62 | public ICodeResu lt getCode Result(Str ing codeSy stem, Stri ng code) t hrows Cham pVAExcepti on { | |
| 63 | ||
| 64 | Vi staLinkCon nection co nnection = null; | |
| 65 | IC odeResult codeResult = null; | |
| 66 | St ring crStr ing; | |
| 67 | ||
| 68 | tr y { | |
| 69 | ||
| 70 | // set-u p the RPC Request | |
| 71 | vReq.set RpcName(RP C_NAME); | |
| 72 | vReq.cle arParams() ; | |
| 73 | ||
| 74 | // get t he VL conn ection | |
| 75 | connecti on = vlHel per.getApp ProxyConne ction(site Id, appPro xyName); | |
| 76 | ||
| 77 | if (conn ection != null) { | |
| 78 | ||
| 79 | // i ssue the R PC | |
| 80 | RpcR esponse vR esp = conn ection.exe cuteRPC(vR eq); | |
| 81 | ||
| 82 | crSt ring = vRe sp.getResu lts(); | |
| 83 | ||
| 84 | if ( crString.e quals("")) { | |
| 85 | throw new ResourceEx ception("I nvalid RPC Call Resu lt."); | |
| 86 | } | |
| 87 | ||
| 88 | code Result = n ew CodeRes ult(crStri ng); | |
| 89 | ||
| 90 | } | |
| 91 | ||
| 92 | return c odeResult; | |
| 93 | ||
| 94 | } catch (Vis taLinkFaul tException vlfe) { | |
| 95 | throw ne w ChampVAV LFaultExce ption(vlfe ); | |
| 96 | } catch (Fou ndationsEx ception fe ) { | |
| 97 | throw ne w ChampVAF oundations Exception( fe); | |
| 98 | } catch (Nam ingExcepti on ne) { | |
| 99 | throw ne w ChampVAN amingExcep tion(ne); | |
| 100 | } catch (Res ourceExcep tion re) { | |
| 101 | throw ne w ChampVAR esourceExc eption(re) ; | |
| 102 | } finally { | |
| 103 | if (conn ection != null) { | |
| 104 | try { | |
| 105 | connection .close(); | |
| 106 | } ca tch (Resou rceExcepti on re) { | |
| 107 | throw new ChampVARes ourceExcep tion(re); | |
| 108 | } | |
| 109 | } | |
| 110 | } | |
| 111 | } | |
| 112 | ||
| 113 | /** | |
| 114 | * @re turn the s iteId | |
| 115 | */ | |
| 116 | public String ge tSiteId() { | |
| 117 | re turn siteI d; | |
| 118 | } | |
| 119 | ||
| 120 | /** | |
| 121 | * @pa ram siteId the siteI d to set | |
| 122 | */ | |
| 123 | public void setS iteId(Stri ng siteId) { | |
| 124 | th is.siteId = siteId; | |
| 125 | } | |
| 126 | ||
| 127 | /** | |
| 128 | * @re turn the a ppProxyNam e | |
| 129 | */ | |
| 130 | public String ge tAppProxyN ame() { | |
| 131 | re turn appPr oxyName; | |
| 132 | } | |
| 133 | ||
| 134 | /** | |
| 135 | * @pa ram appPro xyName the appProxyN ame to set | |
| 136 | */ | |
| 137 | public void setA ppProxyNam e(String a ppProxyNam e) { | |
| 138 | th is.appProx yName = ap pProxyName ; | |
| 139 | } | |
| 140 | ||
| 141 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.