59. EPMO Open Source Coordination Office Redaction File Detail Report

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

59.1 Files compared

# Location File Last Modified
1 C:\AraxisMergeCompare\Pri_un\ARS_Backend\ars_app\src\main\java\gov\va\med\ars\service\impl ArchiveServiceImpl.java Wed Mar 27 19:22:44 2019 UTC
2 C:\AraxisMergeCompare\Pri_re\ARS_Backend\ars_app\src\main\java\gov\va\med\ars\service\impl ArchiveServiceImpl.java Thu Mar 28 17:50:50 2019 UTC

59.2 Comparison summary

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

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

59.4 Active regular expressions

No regular expressions were active.

59.5 Comparison detail

  1   /**
  2    * 
  3    */
  4   package go v.va.med.a rs.service .impl;
  5  
  6   import jav a.util.Lis t;
  7   import jav a.util.Opt ional;
  8  
  9   import org .apache.co mmons.coll ections.Co llectionUt ils;
  10   import org .apache.co mmons.lang .ObjectUti ls;
  11   import org .apache.lo gging.log4 j.LogManag er;
  12   import org .apache.lo gging.log4 j.Logger;
  13   import org .springfra mework.bea ns.factory .annotatio n.Autowire d;
  14   import org .springfra mework.htt p.HttpStat us;
  15   import org .springfra mework.ste reotype.Se rvice;
  16  
  17   import gov .va.med.ar s.constant s.ErrorMes sages;
  18   import gov .va.med.ar s.dao.ars. IClaimAtta chmentsVie wRepositor y;
  19   import gov .va.med.ar s.dao.ars. ITransacti onsReposit ory;
  20   import gov .va.med.ar s.exceptio ns.Generic Exception;
  21   import gov .va.med.ar s.model.re quest.Json ArrayModel ;
  22   import gov .va.med.ar s.service. IArchiveSe rvice;
  23   import gov .va.med.do main.ars.C laimattach mentsView;
  24  
  25   /**
  26    * @author  
D NS     GANGAV
  27    *
  28    */
  29   @Service
  30   public cla ss Archive ServiceImp l implemen ts IArchiv eService {
  31  
  32           pr ivate stat ic final L ogger logg er = LogMa nager.getL ogger(Arch iveService Impl.class );
  33  
  34           @A utowired
  35           IC laimAttach mentsViewR epository  iClaimAtta chmentsVie wRepositor y;
  36  
  37           @A utowired
  38           IT ransaction sRepositor y transact ionsReposi tory;
  39  
  40           @O verride
  41           pu blic boole an archive Attachment s(JsonArra yModel arc hiveAttach ments) thr ows Generi cException  {
  42                    bool ean isArch ived = fal se;
  43                    arch iveAttachm ents = (Js onArrayMod el) Object Utils.defa ultIfNull( archiveAtt achments,  null);
  44                    try  {
  45                             if (ar chiveAttac hments !=  null && Co llectionUt ils.isNotE mpty(archi veAttachme nts.getAcc eptedValue s())) {
  46                                      List<Cla imattachme ntsView> a ttachmentI dLx = iCla imAttachme ntsViewRep ository
  47                                                       .f indByAttac hIdLxIn(ar chiveAttac hments.get AcceptedVa lues());
  48                                      if (atta chmentIdLx .size() ==  archiveAt tachments. getAccepte dValues(). size()) {
  49                                               String sta tus = gene rateStatus (archiveAt tachments) ;
  50                                               Integer ar chiveAttac hmentsInTr ansactions  = transac tionsRepos itory
  51                                                                .arc hiveAttach ments(arch iveAttachm ents.getAc ceptedValu es(), stat us);
  52                                               if (Option al.ofNulla ble(archiv eAttachmen tsInTransa ctions).or Else(0).in tValue() ! = 0) {
  53                                                       is Archived =  true;
  54                                               }
  55                                      } else {
  56                                               logger.err or("Attach ments sent  to archiv e do not m atch with  the values  in the da tabase "
  57                                                                + ar chiveAttac hments.get AcceptedVa lues());
  58                                               throw new  GenericExc eption(Err orMessages .DATA_ACCE SS_ERROR,
  59                                                                "A f ew Attachm ents Ids p assed didn 't match w ith the va lues in th e database ",
  60                                                                Http Status.INT ERNAL_SERV ER_ERROR);
  61                                      }
  62                             } else  {
  63                                      throw ne w GenericE xception(E rrorMessag es.BAD_REQ UEST, "Req uired Data  is missin g",
  64                                                       Ht tpStatus.B AD_REQUEST );
  65                             }
  66                    } ca tch (Excep tion e) {
  67                             throw  new Generi cException (ErrorMess ages.BAD_R EQUEST, e. getMessage (), HttpSt atus.BAD_R EQUEST);
  68                    }
  69                    retu rn isArchi ved;
  70           }
  71  
  72           pr ivate Stri ng generat eStatus(Js onArrayMod el archive Attachment s) {
  73                    if(a rchiveAtta chments.is Status())  {
  74                             return  "Inactive ";
  75                    } el se {
  76                             return  "Active";
  77                    }
  78           }
  79  
  80   }