Tabnine Logo
Flow.getStates
Code IndexAdd Tabnine to your IDE (free)

How to use
getStates
method
in
org.springframework.batch.core.job.flow.Flow

Best Java code snippets using org.springframework.batch.core.job.flow.Flow.getStates (Showing top 9 results out of 315)

origin: spring-projects/spring-batch

private void validateFirstStep(State startState)
    throws JobExecutionException {
  while(true) {
    if(startState instanceof DelegateState) {
      startState = ((DelegateState) startState).getState();
    } else if(startState instanceof JsrStepState) {
      String stepName = startState.getName().substring(startState.getName().indexOf(".") + 1, startState.getName().length());
      Step step = ((JsrStepState) startState).getStep(stepName);
      if(step instanceof DecisionStep) {
        throw new JobExecutionException("Decision step is an invalid first step");
      } else {
        break;
      }
    } else if(startState instanceof FlowState){
      Flow firstFlow = ((FlowState) startState).getFlows().iterator().next();
      startState = firstFlow.getStates().iterator().next();
    } else {
      break;
    }
  }
}
origin: spring-projects/spring-batch

/**
 * @param flow
 * @param map
 */
private void findSteps(Flow flow, Map<String, Step> map) {
  for (State state : flow.getStates()) {
    if (state instanceof StepLocator) {
      StepLocator locator = (StepLocator) state;
      for (String name : locator.getStepNames()) {
        map.put(name, locator.getStep(name));
      }
    } else if (state instanceof StepHolder) {
      Step step = ((StepHolder) state).getStep();
      String name = step.getName();
      stepMap.put(name, step);
    }
    else if (state instanceof FlowHolder) {
      for (Flow subflow : ((FlowHolder) state).getFlows()) {
        findSteps(subflow, map);
      }
    }
  }
}
origin: apache/servicemix-bundles

private void validateFirstStep(State startState)
    throws JobExecutionException {
  while(true) {
    if(startState instanceof DelegateState) {
      startState = ((DelegateState) startState).getState();
    } else if(startState instanceof JsrStepState) {
      String stepName = startState.getName().substring(startState.getName().indexOf(".") + 1, startState.getName().length());
      Step step = ((JsrStepState) startState).getStep(stepName);
      if(step instanceof DecisionStep) {
        throw new JobExecutionException("Decision step is an invalid first step");
      } else {
        break;
      }
    } else if(startState instanceof FlowState){
      Flow firstFlow = ((FlowState) startState).getFlows().iterator().next();
      startState = firstFlow.getStates().iterator().next();
    } else {
      break;
    }
  }
}
origin: org.springframework.batch/spring-batch-core

private void validateFirstStep(State startState)
    throws JobExecutionException {
  while(true) {
    if(startState instanceof DelegateState) {
      startState = ((DelegateState) startState).getState();
    } else if(startState instanceof JsrStepState) {
      String stepName = startState.getName().substring(startState.getName().indexOf(".") + 1, startState.getName().length());
      Step step = ((JsrStepState) startState).getStep(stepName);
      if(step instanceof DecisionStep) {
        throw new JobExecutionException("Decision step is an invalid first step");
      } else {
        break;
      }
    } else if(startState instanceof FlowState){
      Flow firstFlow = ((FlowState) startState).getFlows().iterator().next();
      startState = firstFlow.getStates().iterator().next();
    } else {
      break;
    }
  }
}
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

private void validateFirstStep(State startState)
    throws JobExecutionException {
  while(true) {
    if(startState instanceof DelegateState) {
      startState = ((DelegateState) startState).getState();
    } else if(startState instanceof JsrStepState) {
      String stepName = startState.getName().substring(startState.getName().indexOf(".") + 1, startState.getName().length());
      Step step = ((JsrStepState) startState).getStep(stepName);
      if(step instanceof DecisionStep) {
        throw new JobExecutionException("Decision step is an invalid first step");
      } else {
        break;
      }
    } else if(startState instanceof FlowState){
      Flow firstFlow = ((FlowState) startState).getFlows().iterator().next();
      startState = firstFlow.getStates().iterator().next();
    } else {
      break;
    }
  }
}
origin: org.springframework.batch/spring-batch-core

/**
 * @param flow
 * @param map
 */
private void findSteps(Flow flow, Map<String, Step> map) {
  for (State state : flow.getStates()) {
    if (state instanceof StepLocator) {
      StepLocator locator = (StepLocator) state;
      for (String name : locator.getStepNames()) {
        map.put(name, locator.getStep(name));
      }
    } else if (state instanceof StepHolder) {
      Step step = ((StepHolder) state).getStep();
      String name = step.getName();
      stepMap.put(name, step);
    }
    else if (state instanceof FlowHolder) {
      for (Flow subflow : ((FlowHolder) state).getFlows()) {
        findSteps(subflow, map);
      }
    }
  }
}
origin: apache/servicemix-bundles

/**
 * @param flow
 * @param map
 */
private void findSteps(Flow flow, Map<String, Step> map) {
  for (State state : flow.getStates()) {
    if (state instanceof StepLocator) {
      StepLocator locator = (StepLocator) state;
      for (String name : locator.getStepNames()) {
        map.put(name, locator.getStep(name));
      }
    } else if (state instanceof StepHolder) {
      Step step = ((StepHolder) state).getStep();
      String name = step.getName();
      stepMap.put(name, step);
    }
    else if (state instanceof FlowHolder) {
      for (Flow subflow : ((FlowHolder) state).getFlows()) {
        findSteps(subflow, map);
      }
    }
  }
}
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

/**
 * @param flow
 * @param map
 */
private void findSteps(Flow flow, Map<String, Step> map) {
  for (State state : flow.getStates()) {
    if (state instanceof StepLocator) {
      StepLocator locator = (StepLocator) state;
      for (String name : locator.getStepNames()) {
        map.put(name, locator.getStep(name));
      }
    } else if (state instanceof StepHolder) {
      Step step = ((StepHolder) state).getStep();
      String name = step.getName();
      stepMap.put(name, step);
    }
    else if (state instanceof FlowHolder) {
      for (Flow subflow : ((FlowHolder) state).getFlows()) {
        findSteps(subflow, map);
      }
    }
  }
}
origin: org.springframework.batch/org.springframework.batch.core

/**
 * @param flow
 * @param map
 */
private void findSteps(Flow flow, Map<String, Step> map) {
  for (State state : flow.getStates()) {
    if (state instanceof StepHolder) {
      Step step = ((StepHolder) state).getStep();
      String name = step.getName();
      stepMap.put(name, step);
    }
    else if (state instanceof FlowHolder) {
      for (Flow subflow : ((FlowHolder) state).getFlows()) {
        findSteps(subflow, map);
      }
    }
    else if (state instanceof StepLocator) {
      StepLocator locator = (StepLocator) state;
      for (String name : locator.getStepNames()) {
        map.put(name, locator.getStep(name));
      }
    }
  }
}
org.springframework.batch.core.job.flowFlowgetStates

Javadoc

Convenient accessor for clients needing to explore the states of this flow.

Popular methods of Flow

  • start
  • getName

Popular in Java

  • Running tasks concurrently on multiple threads
  • setScale (BigDecimal)
  • getApplicationContext (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • ImageIO (javax.imageio)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now