@Override
	protected DetailedJobInfoResource instantiateResource(DetailedJobInfo entity) {
		JobExecutionInfoResource jobExecutionInfoResource;
		if (entity.getLastExecutionInfo() != null) {
			JobExecutionInfo jobExecutionInfo = new JobExecutionInfo(
					entity.getLastExecutionInfo().getJobExecution(),
					entity.getLastExecutionInfo().getTimeZone());
			jobExecutionInfoResource = jobExecutionInfoResourceAssembler.instantiateResource(jobExecutionInfo);
		}
		else {
			jobExecutionInfoResource = null;
		}
		return new DetailedJobInfoResource(entity.getName(), entity.getExecutionCount(),
				entity.isLaunchable(), entity.isIncrementable(), jobExecutionInfoResource, entity.isDeployed());
	}
Knows how to build a REST resource out of our domain model {@link DetailedJobInfo}.

@author Ilayaperumal Gopinathan
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/rest/DetailedJobInfoResourceAssembler.java