/** * Add all the mappings from the JobExecutionContext to the JobContext * * @param jobExecutionContext */ public void addQuartzContext(JobExecutionContext jobExecutionContext) { for (Object mapKey : jobExecutionContext.getMergedJobDataMap().keySet()) { // logger.debug("added key: " + (String) mapKey); // logger.debug("added value: " + (String) jobExecutionContext.getMergedJobDataMap().get(mapKey)); map.put((String) mapKey, jobExecutionContext.getMergedJobDataMap().get(mapKey)); } map.put(KEY_JOB_NAME, jobExecutionContext.getJobDetail().getName()); map.put(KEY_TRIGGER_NAME, (jobExecutionContext.getTrigger().getName())); if (jobExecutionContext.getTrigger() instanceof CronTrigger) { map.put(KEY_TRIGGER_CRON_EXPRESSION, ((CronTrigger) jobExecutionContext.getTrigger()).getCronExpression()); } }
/** * Add all the mappings from the JobExecutionContext to the JobContext * * @param jobExecutionContext */ public void addQuartzContext(JobExecutionContext jobExecutionContext) { for (Object mapKey : jobExecutionContext.getMergedJobDataMap().keySet()) { // logger.debug("added key: " + (String) mapKey); // logger.debug("added value: " + (String) jobExecutionContext.getMergedJobDataMap().get(mapKey)); map.put((String) mapKey, jobExecutionContext.getMergedJobDataMap().get(mapKey)); } map.put(KEY_JOB_NAME, jobExecutionContext.getJobDetail().getName()); map.put(KEY_TRIGGER_NAME, (jobExecutionContext.getTrigger().getName())); if (jobExecutionContext.getTrigger() instanceof CronTrigger) { map.put(KEY_TRIGGER_CRON_EXPRESSION, ((CronTrigger) jobExecutionContext.getTrigger()).getCronExpression()); } }
/** * Add all the mappings from the JobExecutionContext to the JobContext * * @param jobExecutionContext */ public void addQuartzContext(JobExecutionContext jobExecutionContext) { for (Object mapKey : jobExecutionContext.getMergedJobDataMap().keySet()) { // logger.debug("added key: " + (String) mapKey); // logger.debug("added value: " + (String) // jobExecutionContext.getMergedJobDataMap().get(mapKey)); map.put((String) mapKey, jobExecutionContext.getMergedJobDataMap().get(mapKey)); } map.put(KEY_JOB_NAME, jobExecutionContext.getJobDetail().getName()); map.put(KEY_TRIGGER_NAME, (jobExecutionContext.getTrigger().getName())); if (jobExecutionContext.getTrigger() instanceof CronTrigger) { map.put( KEY_TRIGGER_CRON_EXPRESSION, ((CronTrigger) jobExecutionContext.getTrigger()).getCronExpression()); } }