public Date getEndDate() {
   switch (getScheduleType()) {
     case RUN_ONCE:
       return null;
     case SECONDS: // fall through
     case MINUTES: // fall through
     case HOURS: // fall through
     case DAILY: // fall through
     case WEEKLY: // fall through
     case MONTHLY: // fall through
     case YEARLY:
       return recurrenceEditor.getEndDate();
     case CRON:
       return cronEditor.getEndDate();
     default:
       throw new RuntimeException(MSGS.invalidRunType(getScheduleType().toString()));
   }
 }