org.springframework.batch.admin.web
Class JobController

java.lang.Object
  extended by org.springframework.batch.admin.web.JobController

@Controller
public class JobController
extends Object

Controller for listing and launching jobs.

Author:
Dave Syer

Constructor Summary
JobController(JobService jobService)
           
 
Method Summary
 String details(ModelMap model, String jobName, Errors errors, int startJobInstance, int pageSize)
           
 String getJobName(HttpServletRequest request)
           
 void jobs(ModelMap model, int startJob, int pageSize)
           
 String launch(ModelMap model, String jobName, LaunchRequest launchRequest, Errors errors, String origin)
           
 void setExtensions(Collection<String> extensions)
          A collection of extensions that may be appended to request urls aimed at this controller.
 void setTimeZone(TimeZone timeZone)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobController

public JobController(JobService jobService)
Method Detail

setExtensions

public void setExtensions(Collection<String> extensions)
A collection of extensions that may be appended to request urls aimed at this controller.

Parameters:
extensions - the extensions (e.g. [rss, xml, atom])

setTimeZone

@Qualifier(value="userTimeZone")
public void setTimeZone(TimeZone timeZone)
Parameters:
timeZone - the timeZone to set

getJobName

@ModelAttribute(value="jobName")
public String getJobName(HttpServletRequest request)

launch

@RequestMapping(value="/jobs/{jobName}",
                method=POST)
public String launch(ModelMap model,
                                                   @ModelAttribute(value="jobName")
                                                   String jobName,
                                                   @ModelAttribute(value="launchRequest")
                                                   LaunchRequest launchRequest,
                                                   Errors errors,
                                                   @RequestParam(defaultValue="execution")
                                                   String origin)

details

@RequestMapping(value="/jobs/{jobName}",
                method=GET)
public String details(ModelMap model,
                                                   @ModelAttribute(value="jobName")
                                                   String jobName,
                                                   Errors errors,
                                                   @RequestParam(defaultValue="0")
                                                   int startJobInstance,
                                                   @RequestParam(defaultValue="20")
                                                   int pageSize)

jobs

@RequestMapping(value="/jobs",
                method=GET)
public void jobs(ModelMap model,
                                              @RequestParam(defaultValue="0")
                                              int startJob,
                                              @RequestParam(defaultValue="20")
                                              int pageSize)


Copyright © 2011. All Rights Reserved.