@CliCommand(value = DISPLAY_JOB_EXECUTION, help = "Display the details of a Job Execution")
	public String display(
			@CliOption(mandatory = true, key = { "", "id" }, help = "the id of the job execution") long jobExecutionId) {

		final JobExecutionInfoResource jobExecutionInfoResource = jobOperations().displayJobExecution(jobExecutionId);

		final Table jobExecutionTable = new Table();
		jobExecutionTable.addHeader(1, new TableHeader("Property"))
				.addHeader(2, new TableHeader("Value"));

		final StringBuilder details = new StringBuilder();

		details.append("Job Execution Details:\n");
		details.append(UiUtils.HORIZONTAL_LINE);

		final String localCreateTime = this.configuration.getLocalTime(jobExecutionInfoResource.getJobExecution().getCreateTime());
		final String localStartTime = this.configuration.getLocalTime(jobExecutionInfoResource.getJobExecution().getStartTime());
		final Date endTimeDate = jobExecutionInfoResource.getJobExecution().getEndTime();
		final String localEndTime = (endTimeDate == null) ? "" : this.configuration.getLocalTime(endTimeDate);

		jobExecutionTable.addRow("Job Execution ID", String.valueOf(jobExecutionInfoResource.getExecutionId()))
				.addRow("Job Name", jobExecutionInfoResource.getName())
				.addRow("Job Instance", String.valueOf(jobExecutionInfoResource.getJobExecution().getJobInstance().getId()))
				.addRow("Composed Job", String.valueOf(jobExecutionInfoResource.isComposedJob()))
				.addRow("Create Time", localCreateTime)
				.addRow("Start Time", localStartTime)
				.addRow("End Time", localEndTime)
				.addRow("Running", String.valueOf(jobExecutionInfoResource.getJobExecution().isRunning()))
				.addRow("Stopping", String.valueOf(jobExecutionInfoResource.getJobExecution().isStopping()))
				.addRow("Step Execution Count", String.valueOf(jobExecutionInfoResource.getStepExecutionCount()))
				.addRow("Execution Status", jobExecutionInfoResource.getJobExecution().getStatus().name());

		details.append(jobExecutionTable);

		details.append(UiUtils.HORIZONTAL_LINE);
		details.append("Job Parameters:\n");
		details.append(UiUtils.HORIZONTAL_LINE);

		if (jobExecutionInfoResource.getJobExecution().getJobParameters().isEmpty()) {
			details.append("No Job Parameters are present");
		}
		else {
			final Table jobParameterTable = new Table();
			jobParameterTable.addHeader(1, new TableHeader("Name"))
					.addHeader(2, new TableHeader("Value"))
					.addHeader(3, new TableHeader("Type"))
					.addHeader(4, new TableHeader("Identifying"));

			for (Map.Entry<String, JobParameter> jobParameterEntry : jobExecutionInfoResource.getJobExecution().getJobParameters().getParameters().entrySet()) {

				jobParameterTable.addRow(jobParameterEntry.getKey(),
						jobParameterEntry.getValue().getValue().toString(),
						jobParameterEntry.getValue().getType().name(),
						String.valueOf(jobParameterEntry.getValue().isIdentifying()));
			}

			details.append(jobParameterTable);
		}

		final String jobDefinitionStatus;
		if (jobExecutionInfoResource.isDeleted()) {
			jobDefinitionStatus = "Deleted";
		}
		else if (!jobExecutionInfoResource.isDeleted() && !jobExecutionInfoResource.isDeployed()) {
			jobDefinitionStatus = "Undeployed";
		}
		else {
			jobDefinitionStatus = "Deployed";
		}

		details.append(UiUtils.HORIZONTAL_LINE);
		details.append("Underlying Job Definition Status: " + jobDefinitionStatus + "\n");
		details.append(UiUtils.HORIZONTAL_LINE);

		if (!jobExecutionInfoResource.getChildJobExecutions().isEmpty()) {
			details.append("Composed Job - Child Job Executions:\n");
			details.append(UiUtils.HORIZONTAL_LINE);
			details.append(createJobExecutionsTable(jobExecutionInfoResource.getChildJobExecutions()));
		}
		
		return details.toString();
	}
Job commands.

@author Glenn Renfro
@author Ilayaperumal Gopinathan
@author Gunnar Hillert
@author Eric Bottard
spring-xd-shell/src/main/java/org/springframework/xd/shell/command/JobCommands.java