@RequestMapping(value = { "" }, method = RequestMethod.GET, produces = "application/json")
	@ResponseStatus(HttpStatus.OK)
	public PagedResources<JobExecutionInfoResource> list(Pageable pageable) {

		final List<JobExecutionInfoResource> resources = new ArrayList<JobExecutionInfoResource>();
		final Set<String> restartableJobs = new HashSet<String>(jobLocator.getAllRestartableJobs());
		final Set<String> deployedJobs = new HashSet<String>(jobLocator.getJobNames());
		final Set<String> jobDefinitionNames = new HashSet<String>(getJobDefinitionNames());

		for (JobExecution jobExecution : jobService.getTopLevelJobExecutions(pageable.getOffset(),
				pageable.getPageSize())) {

			stepExecutionDao.addStepExecutions(jobExecution);
			final JobExecutionInfoResource jobExecutionInfoResource = getJobExecutionInfoResource(jobExecution,
					restartableJobs, deployedJobs, jobDefinitionNames);
			boolean isComposed = jobService.isComposedJobExecution(jobExecution.getId());
			jobExecutionInfoResource.setComposedJob(isComposed);

			resources.add(jobExecutionInfoResource);
		}

		final PagedResources<JobExecutionInfoResource> pagedResources = new PagedResources<JobExecutionInfoResource>(
				resources,
				new PageMetadata(pageable.getPageSize(), pageable.getPageNumber(),
						Long.valueOf(jobService.countTopLevelJobExecutions())));
		return pagedResources;
	}
List all job executions in a given range. If no pagination is provided,
the default {@code PageRequest(0, 20)} is passed in. See {@link PageableHandlerMethodArgumentResolver}
for details.

@param pageable If not provided will default to page 0 and a page size of 20
@return Collection of JobExecutionInfoResource
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/rest/BatchJobExecutionsController.java