Package org.springframework.xd.rest.domain

Examples of org.springframework.xd.rest.domain.JobDefinitionResource$Page


   * @param jobName The name of the job to be evaluated.
   * @return true if the job is deployed else false
   */
  protected boolean isJobDeployed(String jobName) {
    Assert.hasText(jobName, "The job name must be specified.");
    JobDefinitionResource resource = getJobDefinitionResource(jobName);
    boolean result = false;
    if ("deployed".equals(resource.getStatus())) {
      result = true;
    }
    return result;
  }
View Full Code Here


     * @param jobName The name of the job to be evaluated.
     * @return true if the job is deployed else false
     */
    protected boolean isJobUndeployed(String jobName) {
        Assert.hasText(jobName, "The job name must be specified.");
        JobDefinitionResource resource = getJobDefinitionResource(jobName);
        boolean result = false;
        if ("undeployed".equals(resource.getStatus())) {
            result = true;
        }
        return result;
    }
View Full Code Here

    }
  }

  private JobDefinitionResource getJobDefinitionResource(String jobName) {
    PagedResources<JobDefinitionResource> resources = springXDTemplate.jobOperations().list();
    JobDefinitionResource result = null;
    Iterator<JobDefinitionResource> resourceIter = resources.iterator();
    while (resourceIter.hasNext()) {
      JobDefinitionResource resource = resourceIter.next();
      if (jobName.equals(resource.getName())) {
        result = resource;
        break;
      }
    }
    return result;
View Full Code Here

TOP

Related Classes of org.springframework.xd.rest.domain.JobDefinitionResource$Page

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.