public TimerImpl createTimer(TimerDefinitionImpl timerDefinition) {
if (log.isDebugEnabled()) {
log.debug("creating timer on "+this.toString());
}
TimerImpl timer = newTimer();
timer.setExecution(getTimerExecution());
if (timerDefinition!=null) {
timer.setEventName(timerDefinition.getEventName());
timer.setSignalName(timerDefinition.getSignalName());
timer.setDueDate(timerDefinition.getDueDate());
timer.setDueDateDescription(timerDefinition.getDueDateDescription());
Boolean isExclusive = timerDefinition.isExclusive();
if (isExclusive!=null) {
timer.setExclusive(isExclusive);
}
Integer retries = timerDefinition.getRetries();
if (retries!=null) {
timer.setRetries(retries);
}
timer.setRepeat(timerDefinition.getRepeat());
}
return timer;
}