throw new IllegalArgumentException();
}
String triggerType = element.getAttribute(TRIGGER_TYPE);
NamespaceHelper helper = SchedulerStore.getNamespaceHelper();
// SimpleTrigger
if (triggerType.equals(ONCE)) {
Element[] parameterElements = helper.getChildren(element, "parameter");
GregorianCalendar date = new GregorianCalendar();
for (int i = 0; i < parameterElements.length; i++) {
String name = parameterElements[i].getAttribute("name");
String value = parameterElements[i].getAttribute("value");
if (name.equals(YEAR)) {
date.set(Calendar.YEAR, Integer.parseInt(value));
}
if (name.equals(MONTH)) {
date.set(Calendar.MONTH, Integer.parseInt(value) - 1);
}
if (name.equals(DAY)) {
date.set(Calendar.DAY_OF_MONTH, Integer.parseInt(value));
}
if (name.equals(HOUR)) {
date.set(Calendar.HOUR_OF_DAY, Integer.parseInt(value));
}
if (name.equals(MINUTE)) {
date.set(Calendar.MINUTE, Integer.parseInt(value));
}
if (name.equals(HOUR)) {
date.set(Calendar.HOUR_OF_DAY, Integer.parseInt(value));
}
}
return createSimpleTrigger(jobName, jobGroup, date.getTime());
}
// CronTrigger
if (triggerType.equals(REPEATED)) {
Element[] parameterElements = helper.getChildren(element, "parameter");
String name = parameterElements[0].getAttribute("name");
String value = parameterElements[0].getAttribute("value");
String cron_expression;
if (name.equals(CRON_EXPRESSION)) {