68. EPMO Open Source Coordination Office Redaction File Detail Report

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.

68.1 Files compared

# 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 UpdateRfaiController.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 UpdateRfaiController.java Thu Apr 26 15:04:51 2018 UTC

68.2 Comparison summary

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

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

68.4 Active regular expressions

No regular expressions were active.

68.5 Comparison detail

  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.Pos tMapping;
  12   import org .springfra mework.web .bind.anno tation.Req uestBody;
  13   import org .springfra mework.web .bind.anno tation.Req uestMappin g;
  14   import org .springfra mework.web .bind.anno tation.Req uestParam;
  15   import org .springfra mework.web .bind.anno tation.Res tControlle r;
  16  
  17   import gov .va.med.ar s.constant s.ErrorMes sages;
  18   import gov .va.med.ar s.exceptio ns.Generic Exception;
  19   import gov .va.med.ar s.model.re quest.Rfai LookupRequ est;
  20   import gov .va.med.ar s.model.re quest.Upda teRfaiRequ est;
  21   import gov .va.med.ar s.model.re sponse.Gen ericRespon se;
  22   import gov .va.med.ar s.service. IRfaiLooku pService;
  23   import gov .va.med.ar s.service. IUpdateRfa iService;
  24   import net .minidev.j son.JSONOb ject;
  25  
  26   /**
  27    * @author   PI I
  28    *
  29    */
  30   @RestContr oller
  31   @RequestMa pping("api /v1/update Rfai")
  32   public cla ss UpdateR faiControl ler {
  33  
  34           pr ivate stat ic final L ogger logg er = LogMa nager.getL ogger(Upda teRfaiCont roller.cla ss);
  35  
  36           @A utowired
  37           IU pdateRfaiS ervice upd ateService ;
  38  
  39           /* *
  40            *  @throws E xception 
  41            *  
  42            * /
  43           @P ostMapping (value = " /submitSim pleUpdate" )
  44           pu blic Respo nseEntity< ?> postSub mitSimpleU pdate(@Req uestBody U pdateRfaiR equest upd ateRfaiReq uest)
  45                             throws  Exception  {
  46  
  47                    if ( updateRfai Request ==  null || u pdateRfaiR equest.get Submission Id() == nu ll
  48                                      || updat eRfaiReque st.getSubm issionStat us() == nu ll
  49                                      || updat eRfaiReque st.getSubm issionStat us().trim( ).isEmpty( )
  50                                      || updat eRfaiReque st.getResp onseDate()  == null
  51                                      || updat eRfaiReque st.getResp onseDate() .trim().is Empty()) {
  52  
  53                             throw  new Generi cException (ErrorMess ages.INVAL ID_REQUEST , "Invalid  request",  HttpStatu s.NOT_FOUN D);
  54                    }
  55  
  56                    try  {
  57  
  58                             boolea n updateRe sult = upd ateService .submitSim pleUpdate( updateRfai Request);
  59  
  60                             if (up dateResult ) {
  61  
  62                                      JSONObje ct jsonRes ponse = ne w JSONObje ct();
  63                                      jsonResp onse.put(" result", t rue);
  64  
  65                                      Response Entity<?>  response =  new Respo nseEntity< >(jsonResp onse, Http Status.OK) ;
  66                                      logger.i nfo(
  67                                                       St ring.forma t("Success fully upda ted RFAI s ubmission  %s", updat eRfaiReque st.getSubm issionId() ));
  68  
  69                                      return r esponse;
  70  
  71                             } else  {
  72                                      return n ew Respons eEntity<>(
  73                                                       St ring.forma t("Error i n updating  RFAI Subm ission %s" , updateRf aiRequest. getSubmiss ionId()),
  74                                                       Ht tpStatus.B AD_REQUEST );
  75                             }
  76  
  77                    } ca tch (Excep tion e) {
  78                             logger .error("Up dateRfaiCo ntroller:p ostSubmitS impleUpdat e() except ion occure d " + e.ge tMessage() );
  79                             throw  e;
  80                    }
  81           }
  82   }