Ejemplo n.º 1
0
 public Builder withCronSchedule(String cronExpression) {
   request.setTriggerType(TriggerType.CronTrigger);
   Map<String, String> config = new HashMap<String, String>();
   config.put(TriggerConstants.CronTrigger.CRON_EXPRESSION, cronExpression);
   request.setTriggerConfiguration(config);
   return this;
 }
Ejemplo n.º 2
0
 public Builder(ISchedule schedule) {
   request.setToken(schedule.getToken());
   request.setName(schedule.getName());
   request.setTriggerType(schedule.getTriggerType());
   request.setTriggerConfiguration(schedule.getTriggerConfiguration());
   request.setStartDate(schedule.getStartDate());
   request.setEndDate(schedule.getEndDate());
   request.setMetadata(schedule.getMetadata());
 }
Ejemplo n.º 3
0
 public Builder withSimpleSchedule(Long interval, Integer count) {
   request.setTriggerType(TriggerType.SimpleTrigger);
   Map<String, String> config = new HashMap<String, String>();
   if (interval != null) {
     config.put(TriggerConstants.SimpleTrigger.REPEAT_INTERVAL, String.valueOf(interval));
   }
   if (count != null) {
     config.put(TriggerConstants.SimpleTrigger.REPEAT_COUNT, String.valueOf(count));
   }
   request.setTriggerConfiguration(config);
   return this;
 }