123. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 6/11/2019 10:54:11 AM Eastern 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.

123.1 Files compared

# Location File Last Modified
1 HTRE_P3_v14.5_iter_4_build_14.zip\java\gov\va\med\fw\batchprocess ReportLauncherDetails.java Wed May 29 15:26:02 2019 UTC
2 HTRE_P3_v14.5_iter_4_build_14.zip\java\gov\va\med\fw\batchprocess ReportLauncherDetails.java Mon Jun 10 19:19:21 2019 UTC

123.2 Comparison summary

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

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

123.4 Active regular expressions

No regular expressions were active.

123.5 Comparison detail

  1   /**
  2    * 
  3    */
  4   package go v.va.med.f w.batchpro cess;
  5  
  6   import jav a.io.Seria lizable;
  7   import jav a.util.Has hMap;
  8   import jav a.util.Map ;
  9  
  10   import org .apache.co mmons.logg ing.Log;
  11   import org .apache.co mmons.logg ing.LogFac tory;
  12   import org .quartz.Jo bExecution Context;
  13   import org .quartz.Jo bExecution Exception;
  14   import org .springfra mework.con text.Appli cationCont ext;
  15   import org .springfra mework.sch eduling.qu artz.Quart zJobBean;
  16  
  17   import gov .va.med.fw .service.C onfigurati onConstant s;
  18   import gov .va.med.fw .service.j ms.JMSPayl oad;
  19   import gov .va.med.fw .service.j ms.Message ProducerSe rvice;
  20   import gov .va.med.fw .util.date .TimeZoneU tils;
  21  
  22   /**
  23    * @author   DNS
  24    * 
  25    */
  26   public cla ss ReportL auncherDet ails exten ds QuartzJ obBean {
  27  
  28           st atic final  int MAX_U SER_ID_LEN GTH = 30;
  29           pu blic stati c final St ring REPOR T_SETUP_ID  = "report SetupId";
  30  
  31           pr ivate stat ic Log log  = LogFact ory.getLog (JobLaunch erDetails. class);
  32           pr ivate Appl icationCon text appli cationCont ext = null ;
  33           pr ivate Stri ng jmsPayl oadName;
  34           pr ivate Stri ng message ProducerSe rviceName  = null;
  35  
  36           pu blic Appli cationCont ext getApp licationCo ntext() {
  37                    retu rn applica tionContex t;
  38           }
  39  
  40           pu blic void  setApplica tionContex t(Applicat ionContext  applicati onContext)  {
  41                    this .applicati onContext  = applicat ionContext ;
  42           }
  43  
  44           pu blic Strin g getJmsPa yloadName( ) {
  45                    retu rn jmsPayl oadName;
  46           }
  47  
  48           pu blic void  setJmsPayl oadName(St ring jmsPa yloadName)  {
  49                    this .jmsPayloa dName = jm sPayloadNa me;
  50           }
  51  
  52           pu blic Strin g getMessa geProducer ServiceNam e() {
  53                    retu rn message ProducerSe rviceName;
  54           }
  55  
  56           pu blic void  setMessage ProducerSe rviceName( String mes sageProduc erServiceN ame) {
  57                    this .messagePr oducerServ iceName =  messagePro ducerServi ceName;
  58           }
  59  
  60           /*
  61            *  (non-Java doc)
  62            *  
  63            *  @see
  64            *  org.sprin gframework .schedulin g.quartz.Q uartzJobBe an#execute Internal(o rg
  65            *  .quartz.J obExecutio nContext)
  66            * /
  67           @O verride
  68           pr otected vo id execute Internal(J obExecutio nContext c ontext) th rows JobEx ecutionExc eption {
  69                    Map  jobDataMap  = context .getJobDet ail().getJ obDataMap( );
  70  
  71                    Map< String, Ob ject> map  = new Hash Map<String , Object>( );
  72                    map. put(REPORT _SETUP_ID,  jobDataMa p.get(REPO RT_SETUP_I D));
  73  
  74                    try  {
  75                             sendMe ssage(map,  context.g etJobDetai l().getKey ().getName ());
  76                    } ca tch (Excep tion e) {
  77                             log.er ror("Could  not execu te job.",  e);
  78                    }
  79           }
  80  
  81           pr ivate void  sendMessa ge(Map map , String u serName) t hrows Exce ption {
  82                    // G et the mes sage produ cer servic e
  83                    Mess ageProduce rService m essageProd ucerServic e = (Messa geProducer Service) g etApplicat ionContext ()
  84                                      .getBean (getMessag eProducerS erviceName ());
  85  
  86                    // g et pay loa d bean
  87                    JMSP ayload jms PayLoad =  (JMSPayloa d) getAppl icationCon text().get Bean(getJm sPayloadNa me());
  88                    jmsP ayLoad.set Payload((S erializabl e) map);
  89  
  90                    // s et header  properties
  91                    Map< String, Se rializable > props =  new HashMa p<String,  Serializab le>();
  92  
  93                    Stri ng logical UserName =  userName;
  94                    if ( logicalUse rName.leng th() > MAX _USER_ID_L ENGTH) {
  95                             logica lUserName  = logicalU serName.su bstring(0,  MAX_USER_ ID_LENGTH) ;
  96                    }
  97                    prop s.put(Conf igurationC onstants.D EFAULT_MES SAGE_TYPE,  jmsPayLoa d
  98                                      .getTarg etServiceD escriptor( ));
  99                    prop s.put(Conf igurationC onstants.D EFAULT_MES SAGE_INITI ATER, logi calUserNam e);
  100                    prop s.put(Conf igurationC onstants.D EFAULT_MES SAGE_ORIGI NATING_TIM EZONE, Tim eZoneUtils .getTimeZo ne().getID ());
  101  
  102                    mess ageProduce rService.s end((Seria lizable) j msPayLoad. getPayload (), props) ;
  103           }
  104   }