Produced by Araxis Merge on 12/13/2018 10:35:26 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.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | v12.5_iter_7_build 51.zip\TRM_Upgrade\src\main\java\gov\va\med\fw\batchprocess | ReportLauncherDetails.java | Fri Dec 7 17:36:22 2018 UTC |
| 2 | v12.5_iter_7_build 51.zip\TRM_Upgrade\src\main\java\gov\va\med\fw\batchprocess | ReportLauncherDetails.java | Wed Dec 12 22:33:39 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 206 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| 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 |
No regular expressions were active.
| 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 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.