} else {
throw new ParseException("Unknown trigger type: " + triggerNode.getNodeName(), -1);
}
MutableTrigger trigger = (MutableTrigger) newTrigger()
.withIdentity(triggerName, triggerGroup)
.withDescription(triggerDescription)
.forJob(triggerJobName, triggerJobGroup)
.startAt(triggerStartTime)
.endAt(triggerEndTime)
.withPriority(triggerPriority)
.modifiedByCalendar(triggerCalendarRef)
.withSchedule(sched)
.build();
NodeList jobDataEntries = (NodeList) xpath.evaluate(
"q:job-data-map/q:entry", triggerNode,
XPathConstants.NODESET);
for (int k = 0; k < jobDataEntries.getLength(); k++) {
Node entryNode = jobDataEntries.item(k);
String key = getTrimmedToNullString(xpath, "q:key", entryNode);
String value = getTrimmedToNullString(xpath, "q:value", entryNode);
trigger.getJobDataMap().put(key, value);
}
if(log.isDebugEnabled())
log.debug("Parsed trigger definition: " + trigger);