test_class.declarator: schedulerService
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private SchedulerService schedulerService;
test_class.type: SchedulerService
test_class.var_name: schedulerService
test_class.declarator: emailServiceClient
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private EmailServiceClient emailServiceClient;
test_class.type: EmailServiceClient
test_class.var_name: emailServiceClient
test_class.file: services/task-server/src/test/java/com/opencloud/task/server/service/SchedulerServiceTest.java
test_class.identifier: SchedulerServiceTest
test_class.superclass: extends BaseTest
test_case.body: @Test
      public void addSimpleJob() {
      }
test_case.class_method_signature: SchedulerServiceTest.addSimpleJob()
test_case.full_signature: @Test public void addSimpleJob()
test_case.identifier: addSimpleJob
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void addSimpleJob()
focal_class.declarator: scheduler
focal_class.modifier: @Autowired
      private
focal_class.original_string: @Autowired
      private Scheduler scheduler;
focal_class.type: Scheduler
focal_class.var_name: scheduler
focal_class.file: services/task-server/src/main/java/com/opencloud/task/server/service/SchedulerService.java
focal_class.identifier: SchedulerService
focal_class.class_method_signature: SchedulerService.getJobGroupNames()
focal_class.full_signature: public List<String> getJobGroupNames()
focal_class.identifier: getJobGroupNames
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<String>
focal_class.signature: List<String> getJobGroupNames()
focal_class.class_method_signature: SchedulerService.getJobList()
focal_class.full_signature: public List<TaskInfo> getJobList()
focal_class.identifier: getJobList
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<TaskInfo>
focal_class.signature: List<TaskInfo> getJobList()
focal_class.class_method_signature: SchedulerService.addSimpleJob(TaskInfo info)
focal_class.full_signature: public void addSimpleJob(TaskInfo info)
focal_class.identifier: addSimpleJob
focal_class.modifiers: public
focal_class.parameters: (TaskInfo info)
focal_class.return: void
focal_class.signature: void addSimpleJob(TaskInfo info)
focal_class.class_method_signature: SchedulerService.addCronJob(TaskInfo info)
focal_class.full_signature: public void addCronJob(TaskInfo info)
focal_class.identifier: addCronJob
focal_class.modifiers: public
focal_class.parameters: (TaskInfo info)
focal_class.return: void
focal_class.signature: void addCronJob(TaskInfo info)
focal_class.class_method_signature: SchedulerService.editSimpleJob(TaskInfo info)
focal_class.full_signature: public void editSimpleJob(TaskInfo info)
focal_class.identifier: editSimpleJob
focal_class.modifiers: public
focal_class.parameters: (TaskInfo info)
focal_class.return: void
focal_class.signature: void editSimpleJob(TaskInfo info)
focal_class.class_method_signature: SchedulerService.editCronJob(TaskInfo info)
focal_class.full_signature: public void editCronJob(TaskInfo info)
focal_class.identifier: editCronJob
focal_class.modifiers: public
focal_class.parameters: (TaskInfo info)
focal_class.return: void
focal_class.signature: void editCronJob(TaskInfo info)
focal_class.class_method_signature: SchedulerService.deleteJob(String jobName, String jobGroup)
focal_class.full_signature: public void deleteJob(String jobName, String jobGroup)
focal_class.identifier: deleteJob
focal_class.modifiers: public
focal_class.parameters: (String jobName, String jobGroup)
focal_class.return: void
focal_class.signature: void deleteJob(String jobName, String jobGroup)
focal_class.class_method_signature: SchedulerService.pauseJob(String jobName, String jobGroup)
focal_class.full_signature: public void pauseJob(String jobName, String jobGroup)
focal_class.identifier: pauseJob
focal_class.modifiers: public
focal_class.parameters: (String jobName, String jobGroup)
focal_class.return: void
focal_class.signature: void pauseJob(String jobName, String jobGroup)
focal_class.class_method_signature: SchedulerService.resumeJob(String jobName, String jobGroup)
focal_class.full_signature: public void resumeJob(String jobName, String jobGroup)
focal_class.identifier: resumeJob
focal_class.modifiers: public
focal_class.parameters: (String jobName, String jobGroup)
focal_class.return: void
focal_class.signature: void resumeJob(String jobName, String jobGroup)
focal_class.class_method_signature: SchedulerService.checkExists(String jobName, String jobGroup)
focal_class.full_signature: private boolean checkExists(String jobName, String jobGroup)
focal_class.identifier: checkExists
focal_class.modifiers: private
focal_class.parameters: (String jobName, String jobGroup)
focal_class.return: boolean
focal_class.signature: boolean checkExists(String jobName, String jobGroup)
focal_method.body: public void addSimpleJob(TaskInfo info) {
          String jobName = info.getJobName();
          String jobClassName = info.getJobClassName();
          String jobGroupName = info.getJobGroupName();
          String jobDescription = info.getJobDescription();
          Date createTime = new Date();
          JobDataMap dataMap = new JobDataMap();
          if (info.getData() != null) {
              dataMap.putAll(info.getData());
          }
          dataMap.put("createTime", createTime);
          try {
              // 触发器的key值
              TriggerKey triggerKey = TriggerKey.triggerKey(jobName, jobGroupName);
              // job的key值
              JobKey jobKey = JobKey.jobKey(jobName, jobGroupName);
              if (checkExists(jobName, jobGroupName)) {
                  throw new OpenAlertException(String.format("任务已经存在, jobName:[%s],jobGroup:[%s]", jobName, jobGroupName));
              }
              /* 简单调度 */
              SimpleTrigger trigger = TriggerBuilder
                      .newTrigger()
                      .withIdentity(triggerKey)
                      .startAt(info.getStartDate())
                      .withSchedule(
                              SimpleScheduleBuilder.simpleSchedule()
                                      .withIntervalInMilliseconds(info.getRepeatInterval())
                                      .withRepeatCount(info.getRepeatCount()))
                      .endAt(info.getEndDate()).build();
              Class<? extends Job> clazz = (Class<? extends Job>) Class
                      .forName(jobClassName);
              JobDetail jobDetail = JobBuilder.newJob(clazz).withIdentity(jobKey)
                      .withDescription(jobDescription).usingJobData(dataMap).build();
              scheduler.scheduleJob(jobDetail, trigger);
          } catch (SchedulerException | ClassNotFoundException e) {
              throw new OpenAlertException("任务添加失败");
          }
      }
focal_method.class_method_signature: SchedulerService.addSimpleJob(TaskInfo info)
focal_method.full_signature: public void addSimpleJob(TaskInfo info)
focal_method.identifier: addSimpleJob
focal_method.invocations: getJobName getJobClassName getJobGroupName getJobDescription getData putAll getData put triggerKey jobKey checkExists format build endAt withSchedule startAt withIdentity newTrigger getStartDate withRepeatCount withIntervalInMilliseconds simpleSchedule getRepeatInterval getRepeatCount getEndDate forName build usingJobData withDescription withIdentity newJob scheduleJob
focal_method.modifiers: public
focal_method.parameters: (TaskInfo info)
focal_method.return: void
focal_method.signature: void addSimpleJob(TaskInfo info)