private State createState(Object input) { State result; if (input instanceof Step) { if (!states.containsKey(input)) { Step step = (Step) input; states.put(input, new StepState(prefix + step.getName(), step)); } result = states.get(input); } else if (input instanceof JobExecutionDecider) { if (!states.containsKey(input)) { states.put(input, new DecisionState((JobExecutionDecider) input, prefix + "decision" + (decisionCounter++))); } result = states.get(input); } else if (input instanceof Flow) { if (!states.containsKey(input)) { states.put(input, new FlowState((Flow) input, prefix + ((Flow) input).getName())); } result = states.get(input); } else { throw new FlowBuilderException("No state can be created for: " + input); } dirty = true; return result; }
/** * Build a flow and inject it into the parent builder. The parent builder is then returned so it can be enhanced * before building an actual job. Normally called explicitly via {@link #end()}. * * @see org.springframework.batch.core.job.builder.FlowBuilder#build() */ @Override public FlowJobBuilder build() { Flow flow = flow(); if(flow instanceof InitializingBean) { try { ((InitializingBean) flow).afterPropertiesSet(); } catch (Exception e) { throw new FlowBuilderException(e); } } parent.flow(flow); return parent; }
private State createState(Object input) { State result; if (input instanceof Step) { if (!states.containsKey(input)) { Step step = (Step) input; states.put(input, new StepState(prefix + step.getName(), step)); } result = states.get(input); } else if (input instanceof JobExecutionDecider) { if (!states.containsKey(input)) { states.put(input, new DecisionState((JobExecutionDecider) input, prefix + "decision" + (decisionCounter++))); } result = states.get(input); } else if (input instanceof Flow) { if (!states.containsKey(input)) { states.put(input, new FlowState((Flow) input, prefix + ((Flow) input).getName())); } result = states.get(input); } else { throw new FlowBuilderException("No state can be created for: " + input); } dirty = true; return result; }
private State createState(Object input) { State result; if (input instanceof Step) { if (!states.containsKey(input)) { Step step = (Step) input; states.put(input, new StepState(prefix + step.getName(), step)); } result = states.get(input); } else if (input instanceof JobExecutionDecider) { if (!states.containsKey(input)) { states.put(input, new DecisionState((JobExecutionDecider) input, prefix + "decision" + (decisionCounter++))); } result = states.get(input); } else if (input instanceof Flow) { if (!states.containsKey(input)) { states.put(input, new FlowState((Flow) input, prefix + ((Flow) input).getName())); } result = states.get(input); } else { throw new FlowBuilderException("No state can be created for: " + input); } dirty = true; return result; }
private State createState(Object input) { State result; if (input instanceof Step) { if (!states.containsKey(input)) { Step step = (Step) input; states.put(input, new StepState(prefix + step.getName(), step)); } result = states.get(input); } else if (input instanceof JobExecutionDecider) { if (!states.containsKey(input)) { states.put(input, new DecisionState((JobExecutionDecider) input, prefix + "decision" + (decisionCounter++))); } result = states.get(input); } else if (input instanceof Flow) { if (!states.containsKey(input)) { states.put(input, new FlowState((Flow) input, prefix + ((Flow) input).getName())); } result = states.get(input); } else { throw new FlowBuilderException("No state can be created for: " + input); } dirty = true; return result; }
/** * Build a flow and inject it into the parent builder. The parent builder is then returned so it can be enhanced * before building an actual job. Normally called explicitly via {@link #end()}. * * @see org.springframework.batch.core.job.builder.FlowBuilder#build() */ @Override public FlowJobBuilder build() { Flow flow = flow(); if(flow instanceof InitializingBean) { try { ((InitializingBean) flow).afterPropertiesSet(); } catch (Exception e) { throw new FlowBuilderException(e); } } parent.flow(flow); return parent; }
/** * Build a flow and inject it into the parent builder. The parent builder is then returned so it can be enhanced * before building an actual job. Normally called explicitly via {@link #end()}. * * @see org.springframework.batch.core.job.builder.FlowBuilder#build() */ @Override public FlowJobBuilder build() { Flow flow = flow(); if(flow instanceof InitializingBean) { try { ((InitializingBean) flow).afterPropertiesSet(); } catch (Exception e) { throw new FlowBuilderException(e); } } parent.flow(flow); return parent; }