/** * @param builder {@link StepBuilderHelper} representing the step to be enhanced */ protected void enhanceCommonStep(StepBuilderHelper<?> builder) { if (allowStartIfComplete != null) { builder.allowStartIfComplete(allowStartIfComplete); } if (startLimit != null) { builder.startLimit(startLimit); } builder.repository(jobRepository); builder.transactionManager(transactionManager); for (Object listener : stepExecutionListeners) { if(listener instanceof StepExecutionListener) { builder.listener((StepExecutionListener) listener); } else if(listener instanceof javax.batch.api.listener.StepListener) { builder.listener(new StepListenerAdapter((javax.batch.api.listener.StepListener) listener)); } } }
/** * Build a step that executes the flow provided, normally composed of other steps. The flow is not executed in a * transaction because the individual steps are supposed to manage their own transaction state. * * @return a flow step */ public Step build() { FlowStep step = new FlowStep(); step.setName(getName()); step.setFlow(flow); super.enhance(step); try { step.afterPropertiesSet(); } catch (Exception e) { throw new StepBuilderException(e); } return step; }
/** * Registers objects using the annotation based listener configuration. * * @param listener the object that has a method configured with listener annotation * @return this for fluent chaining */ @Override public B listener(Object listener) { super.listener(listener); Set<Method> chunkListenerMethods = new HashSet<>(); chunkListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), BeforeChunk.class)); chunkListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), AfterChunk.class)); chunkListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), AfterChunkError.class)); if(chunkListenerMethods.size() > 0) { StepListenerFactoryBean factory = new StepListenerFactoryBean(); factory.setDelegate(listener); this.listener((ChunkListener) factory.getObject()); } @SuppressWarnings("unchecked") B result = (B) this; return result; }
/** * Registers objects using the annotation based listener configuration. * * @param listener the object that has a method configured with listener annotation * @return this for fluent chaining */ @Override public B listener(Object listener) { super.listener(listener); Set<Method> chunkListenerMethods = new HashSet<>(); chunkListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), BeforeChunk.class)); chunkListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), AfterChunk.class)); chunkListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), AfterChunkError.class)); if(chunkListenerMethods.size() > 0) { StepListenerFactoryBean factory = new StepListenerFactoryBean(); factory.setDelegate(listener); this.listener((ChunkListener) factory.getObject()); } @SuppressWarnings("unchecked") B result = (B) this; return result; }
/** * @param builder {@link StepBuilderHelper} representing the step to be enhanced */ protected void enhanceCommonStep(StepBuilderHelper<?> builder) { if (allowStartIfComplete != null) { builder.allowStartIfComplete(allowStartIfComplete); } if (startLimit != null) { builder.startLimit(startLimit); } builder.repository(jobRepository); builder.transactionManager(transactionManager); for (Object listener : stepExecutionListeners) { if(listener instanceof StepExecutionListener) { builder.listener((StepExecutionListener) listener); } else if(listener instanceof javax.batch.api.listener.StepListener) { builder.listener(new StepListenerAdapter((javax.batch.api.listener.StepListener) listener)); } } }
super.enhance(step);
/** * Registers objects using the annotation based listener configuration. * * @param listener the object that has a method configured with listener annotation * @return this for fluent chaining */ @Override public B listener(Object listener) { super.listener(listener); Set<Method> chunkListenerMethods = new HashSet<>(); chunkListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), BeforeChunk.class)); chunkListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), AfterChunk.class)); chunkListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), AfterChunkError.class)); if(chunkListenerMethods.size() > 0) { StepListenerFactoryBean factory = new StepListenerFactoryBean(); factory.setDelegate(listener); this.listener((ChunkListener) factory.getObject()); } @SuppressWarnings("unchecked") B result = (B) this; return result; }
/** * @param builder {@link StepBuilderHelper} representing the step to be enhanced */ protected void enhanceCommonStep(StepBuilderHelper<?> builder) { if (allowStartIfComplete != null) { builder.allowStartIfComplete(allowStartIfComplete); } if (startLimit != null) { builder.startLimit(startLimit); } builder.repository(jobRepository); builder.transactionManager(transactionManager); for (Object listener : stepExecutionListeners) { if(listener instanceof StepExecutionListener) { builder.listener((StepExecutionListener) listener); } else if(listener instanceof javax.batch.api.listener.StepListener) { builder.listener(new StepListenerAdapter((javax.batch.api.listener.StepListener) listener)); } } }
super.enhance(step); if (job != null) { step.setJob(job);
/** * @param builder {@link StepBuilderHelper} representing the step to be enhanced */ protected void enhanceCommonStep(StepBuilderHelper<?> builder) { if (allowStartIfComplete != null) { builder.allowStartIfComplete(allowStartIfComplete); } if (startLimit != null) { builder.startLimit(startLimit); } builder.repository(jobRepository); builder.transactionManager(transactionManager); for (Object listener : stepExecutionListeners) { if(listener instanceof StepExecutionListener) { builder.listener((StepExecutionListener) listener); } else if(listener instanceof javax.batch.api.listener.StepListener) { builder.listener(new StepListenerAdapter((javax.batch.api.listener.StepListener) listener)); } } }
public Step build() { PartitionStep step = new PartitionStep(); step.setName(getName()); super.enhance(step);
/** * Build a step that executes the flow provided, normally composed of other steps. The flow is not executed in a * transaction because the individual steps are supposed to manage their own transaction state. * * @return a flow step */ public Step build() { FlowStep step = new FlowStep(); step.setName(getName()); step.setFlow(flow); super.enhance(step); try { step.afterPropertiesSet(); } catch (Exception e) { throw new StepBuilderException(e); } return step; }
/** * Build a step that executes the flow provided, normally composed of other steps. The flow is not executed in a * transaction because the individual steps are supposed to manage their own transaction state. * * @return a flow step */ public Step build() { FlowStep step = new FlowStep(); step.setName(getName()); step.setFlow(flow); super.enhance(step); try { step.afterPropertiesSet(); } catch (Exception e) { throw new StepBuilderException(e); } return step; }
/** * Build a step that executes the flow provided, normally composed of other steps. The flow is not executed in a * transaction because the individual steps are supposed to manage their own transaction state. * * @return a flow step */ public Step build() { FlowStep step = new FlowStep(); step.setName(getName()); step.setFlow(flow); super.enhance(step); try { step.afterPropertiesSet(); } catch (Exception e) { throw new StepBuilderException(e); } return step; }
super.enhance(step);
super.enhance(step);
super.enhance(step); if (job != null) { step.setJob(job);
super.enhance(step); if (job != null) { step.setJob(job);
super.enhance(step); if (job != null) { step.setJob(job);