@Test void testCreateJobExecutionViewHref() { when(menuReaderService.findMenuItemPath(JobsController.ID)).thenReturn("/menu/jobs"); assertEquals( "/menu/jobs/viewJob/?jobHref=/api/v2/sys_MappingJobExecution/abcde&refreshTimeoutMillis=2345", jobsController.createJobExecutionViewHref("/api/v2/sys_MappingJobExecution/abcde", 2345)); }
public String createJobExecutionViewHref(String jobHref, int refreshTimeoutMillis) { String jobControllerURL = menuReaderService.findMenuItemPath(ID); return format( "%s/viewJob/?jobHref=%s&refreshTimeoutMillis=%s", jobControllerURL, jobHref, refreshTimeoutMillis); }
JobsController extends PluginController { public String createJobExecutionViewHref(String jobHref, int refreshTimeoutMillis) { String jobControllerURL = menuReaderService.findMenuItemPath(ID); return format( "%s/viewJob/?jobHref=%s&refreshTimeoutMillis=%s", jobControllerURL, jobHref, refreshTimeoutMillis); } }
JobsController extends PluginController { public String createJobExecutionViewHref(String jobHref, int refreshTimeoutMillis) { String jobControllerURL = menuReaderService.findMenuItemPath(ID); return format( "%s/viewJob/?jobHref=%s&refreshTimeoutMillis=%s", jobControllerURL, jobHref, refreshTimeoutMillis); } JobsController(
      JobsService jobsService,
      UserAccountService userAccountService,
      DataService dataService,
      JobExecutionMetaData jobMetaDataMetaData,
      JobScheduler jobScheduler,
      MenuReaderService menuReaderService,
      UserPermissionEvaluator userPermissionEvaluator); }
JobsController extends PluginController { public String createJobExecutionViewHref(String jobHref, int refreshTimeoutMillis) { String jobControllerURL = menuReaderService.findMenuItemPath(ID); return format( "%s/viewJob/?jobHref=%s&refreshTimeoutMillis=%s", jobControllerURL, jobHref, refreshTimeoutMillis); } JobsController(
      JobsService jobsService,
      UserAccountService userAccountService,
      DataService dataService,
      JobExecutionMetaData jobMetaDataMetaData,
      JobScheduler jobScheduler,
      MenuReaderService menuReaderService,
      UserPermissionEvaluator userPermissionEvaluator); @GetMapping String init(Model model); @GetMapping("/viewJob") String viewJob(
      Model model,
      @RequestParam(name = "jobHref") String jobHref,
      @RequestParam(name = "refreshTimeoutMillis", defaultValue = "10000")
          Integer refreshTimeoutMillis); @Transactional(readOnly = true) @GetMapping(value = "/latest", produces = MediaType.APPLICATION_JSON_VALUE) @ResponseBody List<Entity> findLastJobs(); @PostMapping("/cancel/{jobExecutionType}/{jobExecutionId}") @ResponseStatus(NO_CONTENT) void cancel(
      @PathVariable("jobExecutionType") String jobExecutionType,
      @PathVariable("jobExecutionId") String jobExecutionId); @PostMapping("/run/{scheduledJobId}") @ResponseStatus(NO_CONTENT) void runNow(@PathVariable("scheduledJobId") String scheduledJobId); String createJobExecutionViewHref(String jobHref, int refreshTimeoutMillis); }
JobsController extends PluginController { public String createJobExecutionViewHref(String jobHref, int refreshTimeoutMillis) { String jobControllerURL = menuReaderService.findMenuItemPath(ID); return format( "%s/viewJob/?jobHref=%s&refreshTimeoutMillis=%s", jobControllerURL, jobHref, refreshTimeoutMillis); } JobsController(
      JobsService jobsService,
      UserAccountService userAccountService,
      DataService dataService,
      JobExecutionMetaData jobMetaDataMetaData,
      JobScheduler jobScheduler,
      MenuReaderService menuReaderService,
      UserPermissionEvaluator userPermissionEvaluator); @GetMapping String init(Model model); @GetMapping("/viewJob") String viewJob(
      Model model,
      @RequestParam(name = "jobHref") String jobHref,
      @RequestParam(name = "refreshTimeoutMillis", defaultValue = "10000")
          Integer refreshTimeoutMillis); @Transactional(readOnly = true) @GetMapping(value = "/latest", produces = MediaType.APPLICATION_JSON_VALUE) @ResponseBody List<Entity> findLastJobs(); @PostMapping("/cancel/{jobExecutionType}/{jobExecutionId}") @ResponseStatus(NO_CONTENT) void cancel(
      @PathVariable("jobExecutionType") String jobExecutionType,
      @PathVariable("jobExecutionId") String jobExecutionId); @PostMapping("/run/{scheduledJobId}") @ResponseStatus(NO_CONTENT) void runNow(@PathVariable("scheduledJobId") String scheduledJobId); String createJobExecutionViewHref(String jobHref, int refreshTimeoutMillis); static final String ID; static final String URI; }