/* (non-Javadoc)
* @see org.apache.camel.routepolicy.quartz.ScheduledRoutePolicy#createTrigger(org.apache.camel.routepolicy.quartz.ScheduledRoutePolicyConstants.Action)
*/
@Override
protected Trigger createTrigger(Action action, Route route) throws Exception {
SimpleTrigger trigger = null;
if (action == Action.START) {
trigger = new SimpleTrigger(TRIGGER_START + route.getId(), TRIGGER_GROUP + route.getId(),
getRouteStartDate(), null, getRouteStartRepeatCount(), getRouteStartRepeatInterval());
} else if (action == Action.STOP) {
trigger = new SimpleTrigger(TRIGGER_STOP + route.getId(), TRIGGER_GROUP + route.getId(),
getRouteStopDate(), null, getRouteStopRepeatCount(), getRouteStopRepeatInterval());
} else if (action == Action.SUSPEND) {
trigger = new SimpleTrigger(TRIGGER_SUSPEND + route.getId(), TRIGGER_GROUP + route.getId(),
getRouteSuspendDate(), null, getRouteSuspendRepeatCount(), getRouteSuspendRepeatInterval());
} else if (action == Action.RESUME) {
trigger = new SimpleTrigger(TRIGGER_RESUME + route.getId(), TRIGGER_GROUP + route.getId(),
getRouteResumeDate(), null, getRouteResumeRepeatCount(), getRouteResumeRepeatInterval());
}
return trigger;
}