6. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 12/8/2017 1:33:39 PM Central 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.

6.1 Files compared

# Location File Last Modified
1 PC_CP4_CiF.zip\FPPS_Backend\fpps_app\src\main\java\gov\va\med\fee\service\impl PrivacyRestrictionServiceImpl.java Fri Dec 8 17:53:48 2017 UTC
2 PC_CP4_CiF.zip\FPPS_Backend\fpps_app\src\main\java\gov\va\med\fee\service\impl PrivacyRestrictionServiceImpl.java Fri Dec 8 18:29:35 2017 UTC

6.2 Comparison summary

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

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

6.4 Active regular expressions

No regular expressions were active.

6.5 Comparison detail

  1   package go v.va.med.f ee.service .impl;
  2  
  3   import jav a.math.Big Decimal;
  4   import jav a.util.Arr ayList;
  5   import jav a.util.Ite rator;
  6   import jav a.util.Lis t;
  7  
  8   import org .apache.lo gging.log4 j.LogManag er;
  9   import org .apache.lo gging.log4 j.Logger;
  10   import org .springfra mework.bea ns.factory .annotatio n.Autowire d;
  11   import org .springfra mework.ste reotype.Se rvice;
  12   import org .springfra mework.tra nsaction.a nnotation. Transactio nal;
  13   import gov .va.med.do main.fee.P rivacyToPe rson;
  14   import gov .va.med.fe e.dao.IPri vacyRestri ctionRepo;
  15   import gov .va.med.fe e.dao.IPri vacyRestri ctionRepos itoryTempl ate;
  16   import gov .va.med.fe e.exceptio ns.Generic Exception;
  17   import gov .va.med.fe e.model.re quest.Priv acyRestric tionReques t;
  18   import gov .va.med.fe e.service. IPrivacyRe strictionS ervice;
  19  
  20  
  21   /**
  22    * 
  23    * @author   DN S      YIBRIK
  24    * email : yibriekedi r@gmail.co m
  25    */
  26  
  27   @Service
  28   @Transacti onal
  29   public cla ss Privacy Restrictio nServiceIm pl impleme nts IPriva cyRestrict ionService  {
  30  
  31           @A utowired
  32           pr ivate IPri vacyRestri ctionRepos itoryTempl ate privec yRestricti onRepoTemp late;
  33           
  34           @A utowired
  35           pr ivate IPri vacyRestri ctionRepo  privacyRes trictionRe po;
  36           
  37           
  38           pr ivate stat ic final L ogger logg er = LogMa nager.getL ogger(Priv acyRestric tionServic eImpl.clas s);
  39  
  40           
  41           
  42           /* *
  43            *  accept a  requestId  and return s boolean  if a priva cy
  44            *  Restricti on is remo ved from D B
  45            * /
  46           
  47           @O verride
  48           pu blic boole an deleteR estriction (long requ estId) thr ows Generi cException  {
  49  
  50                    bool ean result  =false;
  51                    logg er.info("E xcuting Me thod prive cyRestrict ionRepo.de leteRestri ction() To  delete re quest with  requestId  "+request Id);
  52                    
  53                    try  {
  54                             logger .info("Exc uting Meth od privecy Restrictio nRepo.dele teRestrict ion() with  requestID  "+request Id);                       
  55                             privac yRestricti onRepo.del ete(reques tId);
  56                             result  =true;
  57                             } 
  58                             catch  (Exception  ex) {
  59                                      logger.e rror("priv ecyRestric tionRepo.d eleteRestr iction()   got Except ion in per forming th e request  " + reques tId
  60                                                       +  " " + ex);
  61                             }
  62  
  63                    retu rn result;
  64           }
  65           /* *
  66            *  get all P rivacy Res trictions
  67            * /
  68  
  69           @O verride
  70           pu blic List< PrivacyToP erson> get AllRestric tions() th rows Gener icExceptio n {
  71  
  72                    List <PrivacyTo Person> re sult = new  ArrayList <>();
  73                    logg er.info("E xcuting Me thod prive cyRestrict ionRepo.ge tAllRestri ctions() T o get all  restrictio ns");
  74  
  75                    try  {
  76                             logger .info("Exc uting Meth od privecy Restrictio nRepo.getA llRestrict ions()");
  77                             result  = privecy Restrictio nRepoTempl ate.getAll Restrictio ns();
  78                             
  79  
  80                    } ca tch (Excep tion ex) {
  81                             logger .error("pr ivecyRestr ictionRepo .deleteRes triction()   got Exce ption for  getting al l Restrict ions " + "  "
  82                                               + ex);
  83                    }
  84  
  85                    retu rn result;
  86           }
  87  
  88           /* *
  89            *  add a new  Privacy R estriction  to a pers on
  90            * /
  91           
  92           @O verride
  93           pu blic boole an addPriv acyRestric tion(Priva cyRestrict ionRequest  request)  {
  94  
  95  
  96          boo lean resul t =false;
  97                    
  98                    try  {
  99                    logg er.info("E xcuting Me thod prive cyRestrict ionRepoTem plate.addR estriction () To save  request " +request.t oString()) ;
  100           
  101                     pri vacyRestri ctionRepo. addPrivacy Restrictio n(request. getNtName( ), request .getSsn(),  request.g etReason() , request. getType(), request.ge tAppuser() .getUserNa me());
  102                     res ult = true ;
  103                    } 
  104                    catc h (Excepti on ex) {
  105                             logger .error("pr ivecyRestr ictionRepo Template.a ddRestrict ion()  int ernal_serv er_error f or request  " + reque st.toStrin g()
  106                                               + " " + ex );
  107                    }
  108                    
  109                    logg er.info("p rivecyRest rictionRep oTemplate. addRestric tion() exc uted and r eturning b ack to the  controlle r");
  110                    retu rn result;
  111                    
  112           }
  113  
  114           @O verride
  115           pu blic Strin g checkCla im(String  ntName, St ring ssn)  {
  116                    
  117                    
  118                    
  119                    List <Integer>  listOfClai ms = priva cyRestrict ionRepo.ch eckClaimAs sociatedWi thTheUser( ntName, ss n);
  120  
  121                    Iter ator<?> it  = listOfC laims.iter ator();
  122                    logg er.info("p rivecyRest rictionRep o.checkCla imsAssigne dToUser()  checking i f User wit h Person_I d :" + ssn
  123                                      + " and  NtName:" +  ntName +  " has Clai ms assigne d");
  124  
  125                    Stri ngBuilder  res = new  StringBuil der();
  126                    whil e (it.hasN ext()) {
  127                             BigDec imal claim  = (BigDec imal) it.n ext();
  128                             res.ap pend(claim ).append(" , ");
  129                    }
  130  
  131                    if ( !res.toStr ing().equa lsIgnoreCa se("")) {
  132                             logger .info("pri vecyRestri ctionRepo. checkClaim sAssignedT oUser() --  > User ha s claims : " + res.to String()
  133                                               + " Associ ated with  him");
  134                    }
  135                    retu rn res.toS tring();
  136           
  137           }
  138  
  139           @O verride
  140           pu blic boole an checkEx ist(String  ntName, S tring ssn)  {
  141                      lo gger.info( "PrivecyRe strictionS erviceImpl .addRestri ction() ge tting the  Privecyres triction p erson_Id:" +ssn+"and  ntName:"+n tName);                       
  142                      in t recordCo unt = priv acyRestric tionRepo.c heckPrivac yRestricti onExistanc eInDB(ntNa me, ssn);
  143                             logger .info("pri vecyRestri ctionRepo. checkForEx istance()  checking i f PrivacyR estriction  for Perso n_Id :"+ss n+" and nt Name:"+ntN ame+" Alre dady exist ");
  144                             
  145                     if  (recordCou nt > 0) {
  146                              
  147  
  148               return tr ue;
  149          }el se {
  150               logger.er ror("Priva cyRestrict ion for Us er {person +Id:"+ssn+  "and ntNa me :"+ntNa me+"Info a lready Exi st in DB") ;
  151               return fa lse;
  152          }
  153           }
  154           
  155           
  156   }