150. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 3/8/2018 10:11:37 AM 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.

150.1 Files compared

# Location File Last Modified
1 PRE_PPS-N_v3.0.1.zip\PS_PPS_domain\src\main\java\gov\va\med\pharmacy\peps\service\common\update\impl PackageTypeNdfFileSyncProcessor.java Fri Jan 12 15:42:32 2018 UTC
2 PRE_PPS-N_v3.0.1.zip\PS_PPS_domain\src\main\java\gov\va\med\pharmacy\peps\service\common\update\impl PackageTypeNdfFileSyncProcessor.java Wed Mar 7 01:52:37 2018 UTC

150.2 Comparison summary

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

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

150.4 Active regular expressions

No regular expressions were active.

150.5 Comparison detail

  1   package go v.va.med.p harmacy.pe ps.service .common.up date.impl;
  2  
  3  
  4   import jav a.util.Arr ays;
  5   import jav a.util.Col lection;
  6   import jav a.util.Col lections;
  7   import jav a.util.Lin kedHashSet ;
  8   import jav a.util.Map ;
  9   import jav a.util.Set ;
  10  
  11   import gov .va.med.ph armacy.pep s.common.u tility.Mum psConverte r;
  12   import gov .va.med.ph armacy.pep s.common.v ista.Vista File;
  13   import gov .va.med.ph armacy.pep s.common.v o.FieldKey ;
  14   import gov .va.med.ph armacy.pep s.common.v o.ManagedI temVo;
  15   import gov .va.med.ph armacy.pep s.common.v o.PackageT ypeVo;
  16   import gov .va.med.ph armacy.pep s.common.v o.RequestI temStatus;
  17   import gov .va.med.ph armacy.pep s.common.v o.UserVo;
  18   import gov .va.med.ph armacy.pep s.common.v o.diff.Dif ference;
  19   import gov .va.med.ph armacy.pep s.domain.c ommon.mode l.EplNdfOu tgoingDiff erences;
  20   import gov .va.med.ph armacy.pep s.external .common.pr eencapsula tion.utili ty.update. item.Packa geTypeConv erter;
  21   import gov .va.med.ph armacy.pep s.external .common.vo .outbound. common.Ite mAction;
  22   import gov .va.med.ph armacy.pep s.service. common.cap ability.Nd fFileSyncC apability;
  23   import gov .va.med.ph armacy.pep s.service. common.upd ate.NdfFil eSyncProce ssor;
  24  
  25  
  26   /**
  27    * A NdfFi leSyncProc essor impl ementation  that hand les Packag eTypeVo ob jects.
  28    * 
  29    * @author   DNS     DNS
  30    *
  31    */
  32   public cla ss Package TypeNdfFil eSyncProce ssor exten ds Abstrac tSimpleNdf FileSyncPr ocessor im plements N dfFileSync Processor  {
  33  
  34       /** Fi eldKeys of  the field s that, if  modified,  would be  processed  by the mod ification  logic of t his proces sor. */
  35       public  static fi nal Set<Fi eldKey> FI ELDS = Col lections.u nmodifiabl eSet(new L inkedHashS et<FieldKe y>(Arrays
  36           .a sList(
  37                FieldKey .VALUE, 
  38                FieldKey .INACTIVAT ION_DATE, 
  39                FieldKey .ITEM_STAT US
  40                )));
  41       
  42       privat e static f inal Strin g FILE_NUM BER = "50. 608";
  43       privat e static f inal Strin g PACKAGE_ TYPE_IEN_F IELD_NUMBE R = ".01";
  44       privat e static f inal Strin g INACTIVA TION_DATE_ FIELD_NUMB ER = "1";
  45       
  46       /**
  47        * Ins tantiates  a new Pack ageTypeNdf FileSyncPr ocessor.
  48        *
  49        * @pa ram pNdfFi leSyncCapa bility the  ndf file  sync capab ility
  50        * @se e Abstract SimpleNdfF ileSyncPro cessor#Abs tractSimpl eNdfFileSy ncProcesso r(Set, Str ing, Strin g)
  51        */
  52       public  PackageTy peNdfFileS yncProcess or(NdfFile SyncCapabi lity pNdfF ileSyncCap ability) {
  53           su per(FIELDS , FILE_NUM BER, PACKA GE_TYPE_IE N_FIELD_NU MBER, pNdf FileSyncCa pability);         
  54       }
  55       
  56  
  57       @Overr ide
  58       public  void proc essNew(Man agedItemVo  managedIt em, UserVo  user) {
  59           Pa ckageTypeV o packageT ypeVo = (P ackageType Vo) manage dItem;
  60           
  61           if  (RequestI temStatus. APPROVED.e quals(pack ageTypeVo. getRequest ItemStatus ()) && pac kageTypeVo .getValue( ) != null)  {
  62                EplNdfOu tgoingDiff erences di ffObj = ne w EplNdfOu tgoingDiff erences();
  63  
  64                // IEN
  65                diffObj. setVistaIe n(packageT ypeVo.getP ackagetype Ien());
  66                diffObj. setNewValu e(packageT ypeVo.getV alue()); 
  67                diffObj. setCreated By(user.ge tUsername( ));
  68                processI nsert(diff Obj); 
  69           }
  70       }
  71  
  72       @Overr ide
  73       public  void proc essModifie d(ManagedI temVo mana gedItem, U serVo user , Collecti on<Differe nce> diffe rences) {
  74          
  75        Map<F ieldKey, D ifference>  setDiffer ence =  Di fference.t oDifferenc eMap(diffe rences);
  76        boole an hasDiff erence = P ackageType Converter. hasNewOrMo difiedFiel ds(super.g etFields() , setDiffe rence, Ite mAction.MO DIFY);
  77  
  78        Packa geTypeVo p ackageType Vo = (Pack ageTypeVo)  managedIt em;
  79  
  80        if (h asDifferen ce) {
  81            i f (Request ItemStatus .APPROVED. equals(pac kageTypeVo .getReques tItemStatu s()) && pa ckageTypeV o.getValue () != null ) {
  82                 EplNdfO utgoingDif ferences d iffObj = n ew EplNdfO utgoingDif ferences() ;
  83  
  84                 diffObj .setVistaI en(package TypeVo.get Packagetyp eIen());
  85                 diffObj .setVistaF ieldNumber (INACTIVAT ION_DATE_F IELD_NUMBE R);
  86                 if(pack ageTypeVo. getInactiv ationDate( ) != null) {
  87                     dif fObj.setNe wValue(Mum psConverte r.convertD ate(packag eTypeVo.ge tInactivat ionDate()) );                  
  88                 }  
  89                 else{
  90                     //p assing an  empty stri ng because  this is a  non null  field
  91                     dif fObj.setNe wValue(Vis taFile.BLA NK);                    
  92                 }
  93                 diffObj .setCreate dBy(user.g etUsername ());
  94                 process Update(dif fObj);
  95            }
  96  
  97        }
  98  
  99           
  100       } 
  101   }