Package org.springframework.batch.core.step

Examples of org.springframework.batch.core.step.NoSuchStepException


  @Override
  public Step getStep(String stepName) throws NoSuchStepException {
    final Step step = steps.get(stepName);
    if (step == null) {
      throw new NoSuchStepException("Step ["+stepName+"] does not exist for job with name ["+getName()+"]");
    }
    return step;
  }
View Full Code Here


      log.debug("Requesting StepExecution: " + jobExecutionId + " / " + stepExecutionId);
    }

    StepExecution stepExecution = getJobExplorer().getStepExecution(jobExecutionId, stepExecutionId);
    if (stepExecution == null) {
      throw new NoSuchStepException("No StepExecution could be located for this request: ");
    }

    if(log.isDebugEnabled()) {
      log.debug("Got StepExecution: " + stepExecution);
      log.debug("Locating Step: " + stepName);
    }

    Step step = getStepLocator().getStep(stepName);
    if(log.isDebugEnabled()) {
      log.debug("Located step: " + step);
    }

    if (step == null) {
      throw new NoSuchStepException(String.format("No Step with name [%s] could be located.", stepName));
    }

    try {
      if(log.isDebugEnabled()) {
        log.debug("Executing step: " + step + " / " + stepExecution);
View Full Code Here

    Long jobExecutionId = request.getJobExecutionId();
    Long stepExecutionId = request.getStepExecutionId();
    StepExecution stepExecution = jobExplorer.getStepExecution(jobExecutionId, stepExecutionId);
    if (stepExecution == null) {
      throw new NoSuchStepException("No StepExecution could be located for this request: " + request);
    }

    String stepName = request.getStepName();
    Step step = stepLocator.getStep(stepName);
    if (step == null) {
      throw new NoSuchStepException(String.format("No Step with name [%s] could be located.", stepName));
    }

    try {
      step.execute(stepExecution);
    }
View Full Code Here

    Job job;
    try {
      job = jobLocator.getJob(jobName);
    }
    catch (NoSuchJobException e) {
      throw new NoSuchStepException("No step could be located because no job was found with name=" + jobName);
    }
    String prefix = jobName+".";
    if (job instanceof StepLocator) {
      if (((StepLocator) job).getStepNames().contains(stepName)) {
        return ((StepLocator) job).getStep(stepName);
      }
      // TODO: remove this workaround for BATCH-1507
      if (((StepLocator) job).getStepNames().contains(prefix + stepName)) {
        return ((StepLocator) job).getStep(prefix + stepName);
      }
      throw new NoSuchStepException("No step could be located: "+path);
    }
    throw new NoSuchStepException("No step could be located because the job was not a StepLocator.");
  }
View Full Code Here

  @Override
  public Collection<StepExecution> listStepExecutionsForStep(String jobName, String stepName, int start, int count)
      throws NoSuchStepException {
    if (stepExecutionDao.countStepExecutions(jobName, stepName) == 0) {
      throw new NoSuchStepException("No step executions exist with this step name: " + stepName);
    }
    return stepExecutionDao.findStepExecutions(jobName, stepName, start, count);
  }
View Full Code Here

    } else {
      final Map<String, Step> jobSteps = map.get(jobName);
      if (jobSteps.containsKey(stepName)) {
        return jobSteps.get(stepName);
      } else {
        throw new NoSuchStepException("The step called [" + stepName + "] does not exist in the job [" +
            jobName + "]");
      }
    }
  }
View Full Code Here

    Collection<String> names = partitionHandler.getPartitionStepNames();

    if(names.contains(stepName)) {
      return partitionHandler.getStep();
    } else {
      throw new NoSuchStepException(stepName + " was not found");
    }
  }
View Full Code Here

            return Collections.emptyList();
        }

        @Override
    public Step getStep(String stepName) throws NoSuchStepException {
            throw new NoSuchStepException("Step [" + stepName + "] does not exist");
        }
View Full Code Here

  @Override
  public Step getStep(String stepName) throws NoSuchStepException {
    final Step step = steps.get(stepName);
    if (step == null) {
      throw new NoSuchStepException("Step ["+stepName+"] does not exist for job with name ["+getName()+"]");
    }
    return step;
  }
View Full Code Here

TOP

Related Classes of org.springframework.batch.core.step.NoSuchStepException

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.