Produced by Araxis Merge on 4/27/2018 2:59:09 PM Central 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.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | v2.0_Sprint_15_Build_5.zip\v2.0_Sprint_15_Build_5\Unredacted\ARS_Backend\ars_app\src\main\java\gov\va\med\ars\controller | RfaiController.java | Tue Apr 24 14:49:54 2018 UTC |
| 2 | v2.0_Sprint_15_Build_5..zip\v2.0_Sprint_15_Build_5\Unredacted\ARS_Backend\ars_app\src\main\java\gov\va\med\ars\controller | RfaiController.java | Thu Apr 26 15:04:04 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 140 |
| 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 | * | |
| 3 | */ | |
| 4 | package go v.va.med.a rs.control ler; | |
| 5 | ||
| 6 | import org .apache.lo gging.log4 j.LogManag er; | |
| 7 | import org .apache.lo gging.log4 j.Logger; | |
| 8 | import org .springfra mework.bea ns.factory .annotatio n.Autowire d; | |
| 9 | import org .springfra mework.htt p.HttpStat us; | |
| 10 | import org .springfra mework.htt p.Response Entity; | |
| 11 | import org .springfra mework.web .bind.anno tation.Get Mapping; | |
| 12 | import org .springfra mework.web .bind.anno tation.Pat hVariable; | |
| 13 | import org .springfra mework.web .bind.anno tation.Req uestMappin g; | |
| 14 | import org .springfra mework.web .bind.anno tation.Res tControlle r; | |
| 15 | ||
| 16 | import gov .va.med.ar s.exceptio ns.EntityN otFoundExc eption; | |
| 17 | import gov .va.med.ar s.exceptio ns.Generic Exception; | |
| 18 | import gov .va.med.ar s.exceptio ns.Validat ionExcepti on; | |
| 19 | import gov .va.med.ar s.model.re sponse.Rfa iResponse; | |
| 20 | import gov .va.med.ar s.service. IRfaiServi ce; | |
| 21 | import gov .va.med.ar s.validato rs.NumberV alidator; | |
| 22 | import net .minidev.j son.JSONOb ject; | |
| 23 | ||
| 24 | /** | |
| 25 | * @author PI I
|
|
| 26 | * | |
| 27 | */ | |
| 28 | @RestContr oller | |
| 29 | @RequestMa pping("api /v1/popula teClaim") | |
| 30 | public cla ss RfaiCon troller ex tends Numb erValidato r { | |
| 31 | ||
| 32 | pr ivate stat ic final L ogger logg er = LogMa nager.getL ogger(Rfai Controller .class); | |
| 33 | ||
| 34 | @A utowired | |
| 35 | IR faiService rfaiServi ce; | |
| 36 | ||
| 37 | @G etMapping( "/{id}") | |
| 38 | pu blic Respo nseEntity< ?> getClai m(@PathVar iable("id" ) String i d) | |
| 39 | throws Validatio nException , GenericE xception, EntityNotF oundExcept ion { | |
| 40 | JSON Object res ponse = nu ll; | |
| 41 | //Bo olean isVa lid; | |
| 42 | try { | |
| 43 | if(id != null && !id.isEmp ty()) { | |
| 44 | if (isVa lidNumber( id) != nul l) { | |
| 45 | logger.inf o("RfaiCon troller:ge tClaim() r eceived th e request for claim Number :" + Long.val ueOf(id)); | |
| 46 | ||
| 47 | logger.deb ug("RfaiCo ntroller:g etClaim() invoking t he rfaiSer vice.popul ateRfaiInf o() for cl aim index" | |
| 48 | + Lo ng.valueOf (id)); | |
| 49 | RfaiRespon se rfaiRes ponse = rf aiService. populateRf aiInfo(Lon g.valueOf( id)); | |
| 50 | if (rfaiRe sponse == null) { | |
| 51 | re turn new R esponseEnt ity<>("No Claim foun d for ID " + id, Htt pStatus.NO T_FOUND); | |
| 52 | } | |
| 53 | return new ResponseE ntity<>(rf aiResponse , HttpStat us.OK); | |
| 54 | } else { | |
| 55 | return new ResponseE ntity<>("N o Claim fo und for ID " + id, H ttpStatus. NOT_FOUND) ; | |
| 56 | } | |
| 57 | } else { | |
| 58 | response = new JSO NObject(); | |
| 59 | logger.w arn("getCl aim : no C laim Numbe r passed f or "+id); | |
| 60 | response .put("erro rCode", "U n-Authoriz ed"); | |
| 61 | response .put("mess age", "The entered u ser has no populate claims in the applic ation sinc e the clai m Number i s empty"); | |
| 62 | return n ew Respons eEntity<>( response,H ttpStatus. NOT_FOUND) ; | |
| 63 | } | |
| 64 | ||
| 65 | } ca tch (Gener icExceptio n e) { | |
| 66 | logger .error( | |
| 67 | "RfaiContr oller:getC laim() exc eption occ ured for c laim index : " + id + " - " + e.getMessa ge()); | |
| 68 | throw e; | |
| 69 | } | |
| 70 | } | |
| 71 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.