public static Job loadJob(CuratorFramework client, String jobName,
			JobFactory jobFactory) throws Exception {
		try {
			byte[] definition = client.getData().forPath(Paths.build(Paths.JOBS, jobName));
			Map<String, String> definitionMap = ZooKeeperUtils.bytesToMap(definition);

			byte[] deploymentPropertiesData = client.getData().forPath(
					Paths.build(Paths.JOB_DEPLOYMENTS, jobName));
			if (deploymentPropertiesData != null && deploymentPropertiesData.length > 0) {
				definitionMap.put("deploymentProperties", new String(deploymentPropertiesData, "UTF-8"));
			}
			return jobFactory.createJob(jobName, definitionMap);
		}
		catch (KeeperException.NoNodeException e) {
			// job is not deployed
		}
		return null;
	}
Load the {@link org.springframework.xd.dirt.core.Job}
instance for a given job name<i>if the job is deployed</i>.

@param client   curator client
@param jobName  the name of the job to load
@param jobFactory job factory used to create instance of job
@return the job instance, or {@code null} if the job does not exist
        or is not deployed
@throws Exception
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/server/admin/deployment/zk/DeploymentLoader.java