356. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 12/5/2017 12:06:48 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.

356.1 Files compared

# Location File Last Modified
1 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\ROIWebApp\main\src\java\gov\va\med\imaging\roi\web UpdateROIConfigurationServlet.java Mon Dec 4 21:35:06 2017 UTC
2 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\ROIWebApp\main\src\java\gov\va\med\imaging\roi\web UpdateROIConfigurationServlet.java Mon Dec 4 22:05:30 2017 UTC

356.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 248
Changed 2 4
Inserted 0 0
Removed 0 0

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

356.4 Active regular expressions

No regular expressions were active.

356.5 Comparison detail

  1   /**
  2    * 
  3     Package:  MAG - Vis tA Imaging
  4     WARNING:  Per VHA D irective 2 004-038, t his routin e should n ot be modi fied.
  5     Date Cre ated: Apr  27, 2012
  6     Site Nam e:  Washin gton OI Fi eld Office , Silver S pring, MD
  7       Developer:          
WERFEJ
  8     Descript ion: 
  9  
  10           ;;  +-------- ---------- ---------- ---------- ---------- ---------- ---------- +
  11           ;;  Property  of the US  Government .
  12           ;;  No permis sion to co py or redi stribute t his softwa re is give n.
  13           ;;  Use of un released v ersions of  this soft ware requi res the us er
  14           ;;   to execu te a writt en test ag reement wi th the Vis tA Imaging
  15           ;;   Developm ent Office  of the De partment o f Veterans  Affairs,
  16           ;;   telephon e (301) 73 4-0100.
  17           ;;
  18           ;;  The Food  and Drug A dministrat ion classi fies this  software a s
  19           ;;  a Class I I medical  device.  A s such, it  may not b e changed
  20           ;;  in any wa y.  Modifi cations to  this soft ware may r esult in a n
  21           ;;  adulterat ed medical  device un der 21CFR8 20, the us e of which
  22           ;;  is consid ered to be  a violati on of US F ederal Sta tutes.
  23           ;;  +-------- ---------- ---------- ---------- ---------- ---------- ---------- +
  24  
  25    */
  26   package go v.va.med.i maging.roi .web;
  27  
  28   import gov .va.med.im aging.core .router.Pe riodicComm andList;
  29   import gov .va.med.im aging.faca de.configu ration.Enc ryptedConf igurationP ropertyStr ing;
  30   import gov .va.med.im aging.faca de.configu ration.Fac adeConfigu rationFact ory;
  31   import gov .va.med.im aging.roi. commands.p eriodic.De leteOldCom pletedROIW orkItemsCo mmandImpl;
  32   import gov .va.med.im aging.roi. commands.p eriodic.Pe riodicROIC ommandStar ter;
  33   import gov .va.med.im aging.roi. commands.p eriodic.Pr ocessROIPe riodicRequ estsComman dImpl;
  34   import gov .va.med.im aging.roi. commands.p eriodic.co nfiguratio n.ROIPerio dicCommand Configurat ion;
  35  
  36   import jav a.io.IOExc eption;
  37  
  38   import jav ax.servlet .ServletEx ception;
  39   import jav ax.servlet .http.Http Servlet;
  40   import jav ax.servlet .http.Http ServletReq uest;
  41   import jav ax.servlet .http.Http ServletRes ponse;
  42  
  43   import org .apache.lo gging.log4 j.LogManag er;
  44   import org .apache.lo gging.log4 j.Logger;
  45  
  46   /**
  47    * @author         
WERFEJ
  48    *
  49    */
  50   public cla ss UpdateR OIConfigur ationServl et
  51   extends Ht tpServlet
  52   {
  53           pr ivate stat ic final l ong serial VersionUID  = 3551154 2864780439 2L;
  54           pr ivate fina l static L ogger logg er = LogMa nager.getL ogger(Upda teROIConfi gurationSe rvlet.clas s);
  55  
  56           @O verride
  57           pr otected vo id doPost( HttpServle tRequest r equest, Ht tpServletR esponse re sponse)
  58           th rows Servl etExceptio n, IOExcep tion
  59           {
  60                    try
  61                    {
  62                             String  accessCod e = reques t.getParam eter("acce ssCode");
  63                             String  verifyCod e = reques t.getParam eter("veri fyCode");
  64                             
  65                             String  periodicP rocessingE nabled = r equest.get Parameter( "periodicP rocessingE nabled");
  66                             String  completed ItemPurgeP rocessingE nabled = r equest.get Parameter( "completed ItemPurgeP rocessingE nabled");
  67                             String  expiredCo mpletedIte msAfterDay s = reques t.getParam eter("expi redComplet edItemsAft erDays");
  68                             String  processDi sclosuresI mmediately  = request .getParame ter("proce ssDisclosu resImmedia tely");
  69                             String  processin gWorkItemW aitTime =  request.ge tParameter ("processi ngWorkItem WaitTime") ;
  70                             
  71                             
  72                             ROIPer iodicComma ndConfigur ation conf iguration  = ROIPerio dicCommand Configurat ion.getROI PeriodicCo mmandConfi guration() ;
  73                             config uration.se tAccessCod e(new Encr yptedConfi gurationPr opertyStri ng(accessC ode));
  74                             config uration.se tVerifyCod e(new Encr yptedConfi gurationPr opertyStri ng(verifyC ode));                        
  75                             config uration.se tPeriodicR OIProcessi ngEnabled( "TRUE".equ alsIgnoreC ase(period icProcessi ngEnabled) );
  76                             config uration.se tProcessWo rkItemImme diately("T RUE".equal sIgnoreCas e(processD isclosures Immediatel y));
  77                             config uration.se tExpireCom pletedItem sEnabled(" TRUE".equa lsIgnoreCa se(complet edItemPurg eProcessin gEnabled)) ;
  78                             
  79                             int va l = parseS tringInt(e xpiredComp letedItems AfterDays) ;
  80                             if(val  > 0)
  81                                      configur ation.setE xpireCompl etedItemsA fterDays(v al);
  82                             else
  83                                      logger.w arn("Canno t set Expi re Complet ed Items A fter Days  to value ' " + expire dCompleted ItemsAfter Days + "'. ");
  84                             
  85                             val =  parseStrin gInt(proce ssingWorkI temWaitTim e);
  86                             if(val  > 0)
  87                                      configur ation.setP rocessingW orkItemWai tTime(val) ;
  88                             else
  89                                      logger.w arn("Canno t set Proc essing Wor k Item Wai t time to  value '" +  processin gWorkItemW aitTime +  "'.");
  90                             
  91                             
  92                             logger .info("Upd ating ROIP eriodicCom mandConfig uration wi th new acc ess and ve rify codes ");
  93                             config uration.st oreConfigu ration();
  94                             Facade Configurat ionFactory .getConfig urationFac tory().cle arConfigur ation(ROIP eriodicCom mandConfig uration.cl ass);
  95                             
  96                             // no  matter wha t terminat e the two  commands,  need to re start them  with the  new creden tials if t hey are re -enabled.
  97                             Period icCommandL ist.get(). terminateS cheduledPe riodicComm and(Proces sROIPeriod icRequests CommandImp l.class);
  98                             Period icCommandL ist.get(). terminateS cheduledPe riodicComm and(Delete OldComplet edROIWorkI temsComman dImpl.clas s);
  99                                                       
  100                             Period icROIComma ndStarter. startROIPe riodicComm ands();
  101                             
  102                             respon se.sendRed irect("Con figureROI. jsp?result =Successfu lly update d ROI Conf iguration" );
  103                    }
  104                    catc h(Exceptio n ex)
  105                    {
  106                             logger .error("Er ror updati ng ROIPeri odicComman dConfigura tion, " +  ex.getMess age(), ex) ;
  107                             respon se.sendRed irect("Con figureROI. jsp?error= Error upda ting ROI C onfigurati on");
  108                    }
  109           }
  110           
  111           pr ivate int  parseStrin gInt(Strin g stringVa lue)
  112           {
  113                    try
  114                    {
  115                             int va l = Intege r.parseInt (stringVal ue);
  116                             if(val  <= 0)
  117                                      val = -1 ;
  118                             return  val;
  119                    }
  120                    catc h(NumberFo rmatExcept ion nfX)
  121                    {
  122                             return  -1;
  123                    }
  124           }
  125  
  126   }