21. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 4/2/2019 1:06:54 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.

21.1 Files compared

# Location File Last Modified
1 C:\AraxisMergeCompare\Pri_un\ARS_Backend\ars_app\src\main\java\gov\va\med\ars\controller RfaiPopulateClaimController.java Wed Mar 27 19:21:11 2019 UTC
2 C:\AraxisMergeCompare\Pri_re\ARS_Backend\ars_app\src\main\java\gov\va\med\ars\controller RfaiPopulateClaimController.java Thu Mar 28 17:50:40 2019 UTC

21.2 Comparison summary

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

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

21.4 Active regular expressions

No regular expressions were active.

21.5 Comparison detail

  1   /**
  2    * 
  3    */
  4   package go v.va.med.a rs.control ler;
  5  
  6   import jav a.math.Big Integer;
  7  
  8   import jav ax.validat ion.Valid;
  9  
  10   import org .apache.lo gging.log4 j.LogManag er;
  11   import org .apache.lo gging.log4 j.Logger;
  12   import org .springfra mework.bea ns.factory .annotatio n.Autowire d;
  13   import org .springfra mework.htt p.HttpStat us;
  14   import org .springfra mework.htt p.Response Entity;
  15   import org .springfra mework.web .bind.anno tation.Get Mapping;
  16   import org .springfra mework.web .bind.anno tation.Pat hVariable;
  17   import org .springfra mework.web .bind.anno tation.Req uestMappin g;
  18   import org .springfra mework.web .bind.anno tation.Res tControlle r;
  19  
  20   import gov .va.med.ar s.exceptio ns.EntityN otFoundExc eption;
  21   import gov .va.med.ar s.exceptio ns.Generic Exception;
  22   import gov .va.med.ar s.exceptio ns.Validat ionExcepti on;
  23   import gov .va.med.ar s.model.re sponse.Rfa iResponse;
  24   import gov .va.med.ar s.service. IRfaiPopul ateClaimSe rvice;
  25   import gov .va.med.ar s.validato rs.NumberV alidator;
  26   import net .minidev.j son.JSONOb ject;
  27  
  28   /**
  29    * @author  
D NS     GANGAV
  30    *
  31    */
  32   @RestContr oller
  33   @RequestMa pping("api /v1/popula teClaim")
  34   public cla ss RfaiPop ulateClaim Controller  extends N umberValid ator {
  35  
  36           pr ivate stat ic final L ogger logg er = LogMa nager.getL ogger(Rfai PopulateCl aimControl ler.class) ;
  37  
  38           @A utowired
  39           IR faiPopulat eClaimServ ice rfaiSe rvice;
  40  
  41           @G etMapping( "/{id}")
  42           pu blic Respo nseEntity< ?> getClai m(@Valid @ PathVariab le("id") S tring id)
  43                             throws  Validatio nException , GenericE xception,  EntityNotF oundExcept ion {
  44                    JSON Object res ponse = nu ll;
  45                    // B oolean isV alid;
  46                    try  {
  47                             if (id  != null & & !id.isEm pty()) {
  48                                      if (isVa lidNumber( id) != nul l) {
  49                                               logger.inf o("RfaiCon troller:ge tClaim() r eceived th e request  for claim  Number :"  + id);
  50  
  51                                               logger.deb ug("RfaiCo ntroller:g etClaim()  invoking t he rfaiSer vice.popul ateRfaiInf o() for cl aim index"
  52                                                                + id );
  53                                               RfaiRespon se rfaiRes ponse = rf aiService. populateRf aiInfo(new  BigIntege r(id));
  54                                               if (rfaiRe sponse ==  null) {
  55                                                       re turn new R esponseEnt ity<>("No  Claim foun d for ID "  + id, Htt pStatus.NO T_FOUND);
  56                                               }
  57                                               return new  ResponseE ntity<>(rf aiResponse , HttpStat us.OK);
  58                                      } else {
  59                                               return new  ResponseE ntity<>("N o Claim fo und for ID  " + id, H ttpStatus. NOT_FOUND) ;
  60                                      }
  61                             } else  {
  62                                      response  = new JSO NObject();
  63                                      logger.w arn("getCl aim : no C laim Numbe r passed f or  " + id );
  64                                      response .put("erro rCode", "U n-Authoriz ed");
  65                                      response .put("mess age",
  66                                                       "T he entered  user has  no populat e claims i n the appl ication si nce the cl aim Number  is empty" );
  67                                      return n ew Respons eEntity<>( response,  HttpStatus .NOT_FOUND );
  68                             }
  69  
  70                    } ca tch (Gener icExceptio n e) {
  71                             logger .error(
  72                                               "RfaiContr oller:getC laim() exc eption occ ured for c laim index  : " + id  + " - " +  e.getMessa ge());
  73                             throw  e;
  74                    }
  75           }
  76  
  77           @G etMapping( "pendingSu bmission/{ id}")
  78           pu blic Respo nseEntity< ?> checkPe ndingSubmi ssions(@Va lid @PathV ariable("i d") String  id)
  79                             throws  Validatio nException , GenericE xception,  EntityNotF oundExcept ion {
  80                    JSON Object res ponse = ne w JSONObje ct();
  81                    try  {
  82                             if (id  != null & & !id.isEm pty()) {
  83                                      if (isVa lidNumber( id) != nul l) {
  84                                               logger.inf o("checkPe ndingSubmi ssions() r eceived th e request  for claim  Number :"  + (id));
  85                                               Boolean pe ndingSubmi ssion = rf aiService. getClaimSu bmissionSt atus(new B igInteger( id));
  86                                               if (pendin gSubmissio n == true)  {
  87                                                       re sponse.put ("pendingS ubmission" , Boolean. TRUE);
  88                                               } else {
  89                                                       re sponse.put ("pendingS ubmission" , Boolean. FALSE);
  90                                               }
  91                                               return new  ResponseE ntity<>(re sponse, Ht tpStatus.O K);
  92                                      } else {
  93                                               return new  ResponseE ntity<>("N o Claim fo und for ID  " + id, H ttpStatus. NOT_FOUND) ;
  94                                      }
  95                             } else  {
  96                                      logger.w arn("check PendingSub missions() : no Claim  Number pa ssed for   " + id);
  97                                      response .put("erro rCode", "U n-Authoriz ed");
  98                                      response .put("mess age",
  99                                                       "T he entered  user has  no populat e claims i n the appl ication si nce the cl aim Number  is empty" );
  100                                      return n ew Respons eEntity<>( response,  HttpStatus .NOT_FOUND );
  101                             }
  102  
  103                    } ca tch (Gener icExceptio n e) {
  104                             logger .error(
  105                                               "checkPend ingSubmiss ions() exc eption occ ured for c laim index  : " + id  + " - " +  e.getMessa ge());
  106                             throw  e;
  107                    }
  108           }
  109  
  110   }