diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/ExitStatus.java b/spring-batch-core/src/main/java/org/springframework/batch/core/ExitStatus.java index cd5c12967..8b9bb7255 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/ExitStatus.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/ExitStatus.java @@ -95,6 +95,8 @@ public class ExitStatus implements Serializable, Comparable { /** * Getter for the exit description (defaults to blank) + * + * @return {@link String} containing the exit description. */ public String getExitDescription() { return exitDescription; @@ -260,7 +262,7 @@ public class ExitStatus implements Serializable, Comparable { * Extract the stack trace from the throwable provided and append it to * the exist description. * - * @param throwable + * @param throwable {@link Throwable} instance containing the stack trace. * @return a new ExitStatus with the stack trace appended */ public ExitStatus addExitDescription(Throwable throwable) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/JobExecution.java b/spring-batch-core/src/main/java/org/springframework/batch/core/JobExecution.java index 71b352294..3803c249a 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/JobExecution.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/JobExecution.java @@ -86,6 +86,10 @@ public class JobExecution extends Entity { * constructor is the only valid one from a modeling point of view. * * @param job the job of which this execution is a part + * @param id {@link Long} that represents the id for the JobExecution. + * @param jobParameters {@link JobParameters} instance for this JobExecution. + * @param jobConfigurationName {@link String} instance that represents the + * job configuration name. */ public JobExecution(JobInstance job, Long id, JobParameters jobParameters, String jobConfigurationName) { super(id); @@ -106,6 +110,7 @@ public class JobExecution extends Entity { * Constructor for transient (unsaved) instances. * * @param job the enclosing {@link JobInstance} + * @param jobParameters {@link JobParameters} instance for this JobExecution. */ public JobExecution(JobInstance job, JobParameters jobParameters) { this(job, null, jobParameters, null); @@ -181,7 +186,7 @@ public class JobExecution extends Entity { } /** - * @param exitStatus + * @param exitStatus {@link ExitStatus} instance to be used for job execution. */ public void setExitStatus(ExitStatus exitStatus) { this.exitStatus = exitStatus; @@ -213,6 +218,7 @@ public class JobExecution extends Entity { /** * Register a step execution with the current job execution. * @param stepName the name of the step the new execution is associated with + * @return {@link StepExecution} instance created by this method. */ public StepExecution createStepExecution(String stepName) { StepExecution stepExecution = new StepExecution(stepName, this); @@ -224,6 +230,7 @@ public class JobExecution extends Entity { * Test if this {@link JobExecution} indicates that it is running. It should * be noted that this does not necessarily mean that it has been persisted * as such yet. + * * @return true if the end time is null */ public boolean isRunning() { @@ -310,7 +317,7 @@ public class JobExecution extends Entity { /** * Set the last time this JobExecution was updated. * - * @param lastUpdated + * @param lastUpdated {@link Date} instance to mark job execution's lastUpdated attribute. */ public void setLastUpdated(Date lastUpdated) { this.lastUpdated = lastUpdated; @@ -323,7 +330,7 @@ public class JobExecution extends Entity { /** * Add the provided throwable to the failure exception list. * - * @param t + * @param t {@link Throwable} instance to be added failure exception list. */ public synchronized void addFailureException(Throwable t) { this.failureExceptions.add(t); @@ -348,7 +355,12 @@ public class JobExecution extends Entity { /** * Deserialize and ensure transient fields are re-instantiated when read - * back + * back. + * + * @param stream instance of {@link ObjectInputStream}. + * + * @throws IOException thrown if error occurs during read. + * @throws ClassNotFoundException thrown if class is not found. */ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/JobParameter.java b/spring-batch-core/src/main/java/org/springframework/batch/core/JobParameter.java index 893887674..8ba5ae41b 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/JobParameter.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/JobParameter.java @@ -42,6 +42,8 @@ public class JobParameter implements Serializable { /** * Construct a new JobParameter as a String. + * @param parameter {@link String} instance. + * @param identifying true if JobParameter should be identifying. */ public JobParameter(String parameter, boolean identifying) { this.parameter = parameter; @@ -52,7 +54,8 @@ public class JobParameter implements Serializable { /** * Construct a new JobParameter as a Long. * - * @param parameter + * @param parameter {@link Long} instance. + * @param identifying true if JobParameter should be identifying. */ public JobParameter(Long parameter, boolean identifying) { this.parameter = parameter; @@ -63,7 +66,8 @@ public class JobParameter implements Serializable { /** * Construct a new JobParameter as a Date. * - * @param parameter + * @param parameter {@link Date} instance. + * @param identifying true if JobParameter should be identifying. */ public JobParameter(Date parameter, boolean identifying) { this.parameter = parameter; @@ -74,7 +78,8 @@ public class JobParameter implements Serializable { /** * Construct a new JobParameter as a Double. * - * @param parameter + * @param parameter {@link Double} instance. + * @param identifying true if JobParameter should be identifying. */ public JobParameter(Double parameter, boolean identifying) { this.parameter = parameter; @@ -85,6 +90,8 @@ public class JobParameter implements Serializable { /** * Construct a new JobParameter as a String. + * + * @param parameter {@link String} instance. */ public JobParameter(String parameter) { this.parameter = parameter; @@ -95,7 +102,7 @@ public class JobParameter implements Serializable { /** * Construct a new JobParameter as a Long. * - * @param parameter + * @param parameter {@link Long} instance. */ public JobParameter(Long parameter) { this.parameter = parameter; @@ -106,7 +113,7 @@ public class JobParameter implements Serializable { /** * Construct a new JobParameter as a Date. * - * @param parameter + * @param parameter {@link Date} instance. */ public JobParameter(Date parameter) { this.parameter = parameter; @@ -117,7 +124,7 @@ public class JobParameter implements Serializable { /** * Construct a new JobParameter as a Double. * - * @param parameter + * @param parameter {@link Double} instance. */ public JobParameter(Double parameter) { this.parameter = parameter; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/JobParametersBuilder.java b/spring-batch-core/src/main/java/org/springframework/batch/core/JobParametersBuilder.java index bedee3b52..b8f6e3003 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/JobParametersBuilder.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/JobParametersBuilder.java @@ -54,6 +54,7 @@ public class JobParametersBuilder { /** * Copy constructor. Initializes the builder with the supplied parameters. + * @param jobParameters {@link JobParameters} instance used to initialize the builder. */ public JobParametersBuilder(JobParameters jobParameters) { this.parameterMap = new LinkedHashMap(jobParameters.getParameters()); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/StepContribution.java b/spring-batch-core/src/main/java/org/springframework/batch/core/StepContribution.java index 6bffd54f3..cabe3da2e 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/StepContribution.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/StepContribution.java @@ -44,7 +44,7 @@ public class StepContribution implements Serializable { private ExitStatus exitStatus = ExitStatus.EXECUTING; /** - * @param execution + * @param execution {@link StepExecution} instance to be used by the step contribution. */ public StepContribution(StepExecution execution) { this.parentSkipCount = execution.getSkipCount(); @@ -53,7 +53,7 @@ public class StepContribution implements Serializable { /** * Set the {@link ExitStatus} for this contribution. * - * @param status + * @param status {@link ExitStatus} instance to be used to set the exit status. */ public void setExitStatus(ExitStatus status) { this.exitStatus = status; @@ -70,6 +70,8 @@ public class StepContribution implements Serializable { /** * Increment the counter for the number of items processed. + * + * @param count int used to set the increment filter count. */ public void incrementFilterCount(int count) { filterCount += count; @@ -84,6 +86,8 @@ public class StepContribution implements Serializable { /** * Increment the counter for the number of items written. + * + * @param count int used to increment the write count. */ public void incrementWriteCount(int count) { writeCount += count; @@ -109,6 +113,7 @@ public class StepContribution implements Serializable { /** * Public getter for the filter counter. + * * @return the filter counter */ public int getFilterCount() { @@ -141,6 +146,8 @@ public class StepContribution implements Serializable { /** * Increment the read skip count for this contribution + * + * @param count int used to increment the read skip count. */ public void incrementReadSkipCount(int count) { readSkipCount += count; @@ -176,6 +183,7 @@ public class StepContribution implements Serializable { /** * Public getter for the process skip count. + * * @return the process skip count */ public int getProcessSkipCount() { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/StepExecution.java b/spring-batch-core/src/main/java/org/springframework/batch/core/StepExecution.java index c77a17193..e7bf1ecd6 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/StepExecution.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/StepExecution.java @@ -236,6 +236,7 @@ public class StepExecution extends Entity { /** * Setter for number of rollbacks for this execution + * @param rollbackCount int used to set the rollbackCount. */ public void setRollbackCount(int rollbackCount) { this.rollbackCount = rollbackCount; @@ -308,7 +309,7 @@ public class StepExecution extends Entity { } /** - * @param exitStatus + * @param exitStatus {@link ExitStatus} instance used to establish the exit status. */ public void setExitStatus(ExitStatus exitStatus) { this.exitStatus = exitStatus; @@ -345,7 +346,7 @@ public class StepExecution extends Entity { * called. Synchronizes access to the {@link StepExecution} so that changes * are atomic. * - * @param contribution + * @param contribution {@link StepContribution} instance used to update the StepExecution state. */ public synchronized void apply(StepContribution contribution) { readSkipCount += contribution.getReadSkipCount(); @@ -423,7 +424,7 @@ public class StepExecution extends Entity { /** * Set the number of records skipped on read * - * @param readSkipCount + * @param readSkipCount int containing read skip count to be used for the step execution. */ public void setReadSkipCount(int readSkipCount) { this.readSkipCount = readSkipCount; @@ -432,7 +433,7 @@ public class StepExecution extends Entity { /** * Set the number of records skipped on write * - * @param writeSkipCount + * @param writeSkipCount int containing write skip count to be used for the step execution. */ public void setWriteSkipCount(int writeSkipCount) { this.writeSkipCount = writeSkipCount; @@ -448,7 +449,7 @@ public class StepExecution extends Entity { /** * Set the number of records skipped during processing. * - * @param processSkipCount + * @param processSkipCount int containing process skip count to be used for the step execution. */ public void setProcessSkipCount(int processSkipCount) { this.processSkipCount = processSkipCount; @@ -464,7 +465,8 @@ public class StepExecution extends Entity { /** * Set the time when the StepExecution was last updated before persisting * - * @param lastUpdated + * @param lastUpdated {@link Date} instance used to establish the last + * updated date for the Step Execution. */ public void setLastUpdated(Date lastUpdated) { this.lastUpdated = lastUpdated; @@ -500,7 +502,12 @@ public class StepExecution extends Entity { /** * Deserialize and ensure transient fields are re-instantiated when read - * back + * back. + * + * @param stream instance of {@link ObjectInputStream}. + * + * @throws IOException thrown if error occurs during read. + * @throws ClassNotFoundException thrown if class is not found. */ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/StepExecutionListener.java b/spring-batch-core/src/main/java/org/springframework/batch/core/StepExecutionListener.java index 04a668e6a..44ad32bdb 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/StepExecutionListener.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/StepExecutionListener.java @@ -29,7 +29,7 @@ public interface StepExecutionListener extends StepListener { * Initialize the state of the listener with the {@link StepExecution} from * the current scope. * - * @param stepExecution + * @param stepExecution instance of {@link StepExecution}. */ void beforeStep(StepExecution stepExecution); @@ -42,6 +42,7 @@ public interface StepExecutionListener extends StepListener { * failed). Throwing exception in this method has no effect, it will only be * logged. * + * @param stepExecution {@link StepExecution} instance. * @return an {@link ExitStatus} to combine with the normal value. Return * null to leave the old value unchanged. */ diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/UnexpectedJobExecutionException.java b/spring-batch-core/src/main/java/org/springframework/batch/core/UnexpectedJobExecutionException.java index bbf4f2397..a79e38015 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/UnexpectedJobExecutionException.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/UnexpectedJobExecutionException.java @@ -40,6 +40,7 @@ public class UnexpectedJobExecutionException extends RuntimeException { * Constructs a new instance with a message. * * @param msg the exception message. + * @param nested instance of {@link Throwable} that is the cause of the exception. * */ public UnexpectedJobExecutionException(String msg, Throwable nested) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/DuplicateJobException.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/DuplicateJobException.java index 886ed4e61..c2242d50f 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/DuplicateJobException.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/DuplicateJobException.java @@ -30,14 +30,16 @@ public class DuplicateJobException extends JobExecutionException { /** * Create an exception with the given message. + * + * @param msg The message to send to caller. */ public DuplicateJobException(String msg) { super(msg); } /** - * @param msg The message to send to caller - * @param e the cause of the exception + * @param msg The message to send to caller. + * @param e instance of {@link Throwable} that is the cause of the exception. */ public DuplicateJobException(String msg, Throwable e) { super(msg, e); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/EnableBatchProcessing.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/EnableBatchProcessing.java index 89357f319..4462cdeeb 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/EnableBatchProcessing.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/EnableBatchProcessing.java @@ -169,6 +169,9 @@ public @interface EnableBatchProcessing { * Indicate whether the configuration is going to be modularized into multiple application contexts. If true then * you should not create any @Bean Job definitions in this context, but rather supply them in separate (child) * contexts through an {@link ApplicationContextFactory}. + * + * @return boolean indicating whether the configuration is going to be + * modularized into multiple application contexts. Defaults to false. */ boolean modular() default false; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/AbstractApplicationContextFactory.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/AbstractApplicationContextFactory.java index fa44be707..895031ded 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/AbstractApplicationContextFactory.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/AbstractApplicationContextFactory.java @@ -65,6 +65,8 @@ public abstract class AbstractApplicationContextFactory implements ApplicationCo /** * Create a factory instance with the resource specified. The resources are Spring configuration files or java * packages containing configuration files. + * + * @param resource resource to be used in the creation of the ApplicationContext. */ public AbstractApplicationContextFactory(Object... resource) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/AbstractFlowParser.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/AbstractFlowParser.java index 0d74ed1b6..6496b646b 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/AbstractFlowParser.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/AbstractFlowParser.java @@ -294,7 +294,7 @@ public abstract class AbstractFlowParser extends AbstractSingleBeanDefinitionPar /** * @param transitionElement The element to parse * @param patterns a list of patterns on state transitions for this element - * @param element + * @param element {@link Element} representing the source. * @param parserContext the parser context for the bean factory */ protected static void verifyUniquePattern(Element transitionElement, List patterns, Element element, @@ -342,6 +342,7 @@ public abstract class AbstractFlowParser extends AbstractSingleBeanDefinitionPar * default to batchStatus. * @param stateDef The bean definition for the current state * @param parserContext the parser context for the bean factory + * @param abandon the abandon flag to be used by the transition. * @return a collection of * {@link org.springframework.batch.core.job.flow.support.StateTransition} * references diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/AbstractStepParser.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/AbstractStepParser.java index f17052fc6..68023d866 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/AbstractStepParser.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/AbstractStepParser.java @@ -90,9 +90,10 @@ public abstract class AbstractStepParser { /** * @param stepElement The <step/> element - * @param parserContext context + * @param parserContext instance of {@link ParserContext}. * @param jobFactoryRef the reference to the {@link JobParserJobFactoryBean} * from the enclosing tag. Use 'null' if unknown. + * @return {@link AbstractBeanDefinition} for the stepElement. */ protected AbstractBeanDefinition parseStep(Element stepElement, ParserContext parserContext, String jobFactoryRef) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/ChunkElementParser.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/ChunkElementParser.java index fe93f7961..33908862e 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/ChunkElementParser.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/ChunkElementParser.java @@ -68,8 +68,11 @@ public class ChunkElementParser { StepListenerMetaData.itemListenerMetaData()); /** + * @param bd {@link AbstractBeanDefinition} instance of the containing bean. * @param element the element to parse * @param parserContext the context to use + * @param underspecified if true, a fatal error will not be raised if attribute + * or element is missing. */ protected void parse(Element element, AbstractBeanDefinition bd, ParserContext parserContext, boolean underspecified) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/CoreNamespaceUtils.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/CoreNamespaceUtils.java index b740d6312..f4bdd3697 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/CoreNamespaceUtils.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/CoreNamespaceUtils.java @@ -181,7 +181,7 @@ public class CoreNamespaceUtils { * Should this element be treated as incomplete? If it has a parent or is * abstract, then it may not have all properties. * - * @param element + * @param element to be evaluated. * @return TRUE if the element is abstract or has a parent */ public static boolean isUnderspecified(Element element) { @@ -189,7 +189,7 @@ public class CoreNamespaceUtils { } /** - * @param element + * @param element to be evaluated. * @return TRUE if the element is abstract */ public static boolean isAbstract(Element element) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/SimpleFlowFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/SimpleFlowFactoryBean.java index ef4f234a7..d8632e96e 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/SimpleFlowFactoryBean.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/SimpleFlowFactoryBean.java @@ -94,7 +94,7 @@ public class SimpleFlowFactoryBean implements FactoryBean, Initializ /** * Check mandatory properties (name). * - * @throws Exception + * @throws Exception thrown if error occurs. */ @Override public void afterPropertiesSet() throws Exception { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StandaloneStepParser.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StandaloneStepParser.java index 5de0846c0..504b09f31 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StandaloneStepParser.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StandaloneStepParser.java @@ -35,6 +35,7 @@ public class StandaloneStepParser extends AbstractStepParser { * * @param element the <step/gt; element to parse * @param parserContext the parser context for the bean factory + * @return {@link AbstractBeanDefinition} instance. */ public AbstractBeanDefinition parse(Element element, ParserContext parserContext) { return parseStep(element, parserContext, null); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBean.java index 5e08682d4..58a9cc9b0 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBean.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBean.java @@ -757,7 +757,7 @@ public class StepParserStepFactoryBean implements FactoryBean, BeanN /** * Public setter for {@link JobRepository}. * - * @param jobRepository + * @param jobRepository {@link JobRepository} instance to be used by the factory bean. */ public void setJobRepository(JobRepository jobRepository) { this.jobRepository = jobRepository; @@ -766,7 +766,7 @@ public class StepParserStepFactoryBean implements FactoryBean, BeanN /** * The number of times that the step should be allowed to start * - * @param startLimit + * @param startLimit int containing the number of times a step should be allowed to start. */ public void setStartLimit(int startLimit) { this.startLimit = startLimit; @@ -775,7 +775,7 @@ public class StepParserStepFactoryBean implements FactoryBean, BeanN /** * A preconfigured {@link Tasklet} to use. * - * @param tasklet + * @param tasklet {@link Tasklet} instance to be used by the factory bean. */ public void setTasklet(Tasklet tasklet) { this.tasklet = tasklet; @@ -786,7 +786,8 @@ public class StepParserStepFactoryBean implements FactoryBean, BeanN } /** - * @return transactionManager + * @return transactionManager instance of {@link PlatformTransactionManager} + * used by the factory bean. */ public PlatformTransactionManager getTransactionManager() { return transactionManager; @@ -1105,7 +1106,8 @@ public class StepParserStepFactoryBean implements FactoryBean, BeanN * Public setter for exception classes that when raised won't crash the job but will result in transaction rollback * and the item which handling caused the exception will be skipped. * - * @param exceptionClasses + * @param exceptionClasses {@link Map} containing the {@link Throwable}s as + * the keys and the values are {@link Boolean}s, that if true the item is skipped. */ public void setSkippableExceptionClasses(Map, Boolean> exceptionClasses) { this.skippableExceptionClasses = exceptionClasses; @@ -1135,7 +1137,7 @@ public class StepParserStepFactoryBean implements FactoryBean, BeanN // ========================================================= /** - * @param hasChunkElement + * @param hasChunkElement true if step has <chunk> element. */ public void setHasChunkElement(boolean hasChunkElement) { this.hasChunkElement = hasChunkElement; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/converter/JobParametersConverter.java b/spring-batch-core/src/main/java/org/springframework/batch/core/converter/JobParametersConverter.java index 48a415eda..42bd308a6 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/converter/JobParametersConverter.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/converter/JobParametersConverter.java @@ -47,7 +47,7 @@ public interface JobParametersConverter { * The inverse operation: get a {@link Properties} instance. If given null * or empty JobParameters, an empty Properties should be returned. * - * @param params + * @param params the {@link JobParameters} instance to be converted. * @return a representation of the parameters as properties */ public Properties getProperties(JobParameters params); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/explore/JobExplorer.java b/spring-batch-core/src/main/java/org/springframework/batch/core/explore/JobExplorer.java index 7d836f329..115f36959 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/explore/JobExplorer.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/explore/JobExplorer.java @@ -74,7 +74,7 @@ public interface JobExplorer { StepExecution getStepExecution(Long jobExecutionId, Long stepExecutionId); /** - * @param instanceId + * @param instanceId {@link Long} id for the jobInstance to obtain. * @return the {@link JobInstance} with this id, or null */ JobInstance getJobInstance(Long instanceId); @@ -113,10 +113,10 @@ public interface JobExplorer { * Fetch {@link JobInstance} values in descending order of creation (and * there for usually of first execution) with a 'like'/wildcard criteria. * - * @param jobName - * @param start - * @param count - * @return a list of {@link JobInstance} for the job name requested + * @param jobName the name of the job to query for. + * @param start the start index of the instances to return. + * @param count the maximum number of instances to return. + * @return a list of {@link JobInstance} for the job name requested. */ List findJobInstancesByJobName(String jobName, int start, int count); @@ -127,7 +127,9 @@ public interface JobExplorer { * @param jobName the name of the job to query for * @return the number of {@link JobInstance}s that exist within the * associated job repository - * @throws NoSuchJobException + * + * @throws NoSuchJobException thrown when there is no {@link JobInstance} + * for the jobName specified. */ int getJobInstanceCount(String jobName) throws NoSuchJobException; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/explore/support/AbstractJobExplorerFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/explore/support/AbstractJobExplorerFactoryBean.java index 06acf8d1a..bcb1a7a67 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/explore/support/AbstractJobExplorerFactoryBean.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/explore/support/AbstractJobExplorerFactoryBean.java @@ -38,16 +38,30 @@ public abstract class AbstractJobExplorerFactoryBean implements FactoryBean validators) { this.validators = validators; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/SimpleJob.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/SimpleJob.java index ab6066c90..8a8ad75db 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/SimpleJob.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/SimpleJob.java @@ -52,7 +52,7 @@ public class SimpleJob extends AbstractJob { } /** - * @param name + * @param name the job name. */ public SimpleJob(String name) { super(name); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/SimpleStepHandler.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/SimpleStepHandler.java index eb69243ae..9de5a9917 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/SimpleStepHandler.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/SimpleStepHandler.java @@ -185,8 +185,9 @@ public class SimpleStepHandler implements StepHandler, InitializingBean { * Given a step and configuration, return true if the step should start, * false if it should not, and throw an exception if the job should finish. * @param lastStepExecution the last step execution - * @param jobExecution - * @param step + * @param jobExecution the {@link JobExecution} instance to be evaluated. + * @param step the {@link Step} instance to be evaluated. + * @return true if step should start, false if it should not. * * @throws StartLimitExceededException if the start limit has been exceeded * for this step diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/builder/FlowBuilder.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/builder/FlowBuilder.java index e597b2bb3..19f7e7524 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/builder/FlowBuilder.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/builder/FlowBuilder.java @@ -548,6 +548,7 @@ public class FlowBuilder { /** * Signal the end of the flow with the status provided. * + * @param status {@link String} containing the status. * @return a FlowBuilder */ public FlowBuilder end(String status) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/builder/SimpleJobBuilder.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/builder/SimpleJobBuilder.java index 92b499f60..f6d2676ce 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/builder/SimpleJobBuilder.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/builder/SimpleJobBuilder.java @@ -157,7 +157,7 @@ public class SimpleJobBuilder extends JobBuilderHelper { } /** - * @param executor + * @param executor instance of {@link TaskExecutor} to be used. * @return builder for fluent chaining */ public JobFlowBuilder.SplitBuilder split(TaskExecutor executor) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/Flow.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/Flow.java index 18a9eccd3..cb17425b7 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/Flow.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/Flow.java @@ -32,21 +32,25 @@ public interface Flow { * Retrieve the State with the given name. If there is no State with the * given name, then return null. * - * @param stateName + * @param stateName the name of the state to retrieve * @return the State */ State getState(String stateName); /** - * @throws FlowExecutionException + * @param executor the {@link FlowExecutor} instance to use for the flow execution. + * @return a {@link FlowExecution} containing the exit status of the flow. + * + * @throws FlowExecutionException thrown if error occurs during flow execution. */ FlowExecution start(FlowExecutor executor) throws FlowExecutionException; /** - * @param stateName the name of the state to resume on - * @param executor the context to be passed into each state executed - * @return a {@link FlowExecution} containing the exit status of the flow - * @throws FlowExecutionException + * @param stateName the name of the state to resume on. + * @param executor the context to be passed into each state executed. + * @return a {@link FlowExecution} containing the exit status of the flow. + * + * @throws FlowExecutionException thrown if error occurs during flow execution. */ FlowExecution resume(String stateName, FlowExecutor executor) throws FlowExecutionException; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecution.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecution.java index c20c35612..b48909a01 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecution.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecution.java @@ -26,8 +26,8 @@ public class FlowExecution implements Comparable { private final FlowExecutionStatus status; /** - * @param name - * @param status + * @param name the flow execution name to be associated with the FlowExecution. + * @param status the {@link FlowExecutionStatus} to be associated with the FlowExecution. */ public FlowExecution(String name, FlowExecutionStatus status) { this.name = name; @@ -54,7 +54,7 @@ public class FlowExecution implements Comparable { * * @see Comparable#compareTo(Object) * - * @param other + * @param other the {@link FlowExecution} instance to compare with this instance. * @return negative, zero or positive as per the contract */ @Override diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecutionException.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecutionException.java index daf69d167..782d67fa9 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecutionException.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecutionException.java @@ -23,15 +23,15 @@ package org.springframework.batch.core.job.flow; public class FlowExecutionException extends Exception { /** - * @param message + * @param message the message to be associated with this exception. */ public FlowExecutionException(String message) { super(message); } /** - * @param message - * @param cause + * @param message the message to be associated with this exception. + * @param cause instance of {@link Throwable} that caused this exception. */ public FlowExecutionException(String message, Throwable cause) { super(message, cause); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecutionStatus.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecutionStatus.java index b9be52264..268d0374d 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecutionStatus.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecutionStatus.java @@ -64,7 +64,7 @@ public class FlowExecutionStatus implements Comparable { } /** - * @param status + * @param status String containing the status to be associated with this instance. */ public FlowExecutionStatus(String status) { this.name = status; @@ -104,7 +104,7 @@ public class FlowExecutionStatus implements Comparable { * * @see Comparable#compareTo(Object) * - * @param other + * @param other instance of {@link FlowExecutionStatus} to compare this instance with. * @return negative, zero or positive as per the contract */ @Override diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecutor.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecutor.java index a1d2716b7..cd4f1868e 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecutor.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecutor.java @@ -34,9 +34,9 @@ public interface FlowExecutor { /** * @param step a {@link Step} to execute * @return the exit status that drives the surrounding {@link Flow} - * @throws StartLimitExceededException - * @throws JobRestartException - * @throws JobInterruptedException + * @throws StartLimitExceededException thrown if start limit is exceeded. + * @throws JobRestartException thrown if job restart is not allowed. + * @throws JobInterruptedException thrown if job was interrupted. */ String executeStep(Step step) throws JobInterruptedException, JobRestartException, StartLimitExceededException; @@ -66,6 +66,8 @@ public interface FlowExecutor { /** * Handle any status changes that might be needed in the * {@link JobExecution}. + * + * @param status instance of {@link FlowExecutionStatus} to be associated with FlowExecutor. */ void updateJobExecutionStatus(FlowExecutionStatus status); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowJob.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowJob.java index 5af9a71e0..57ab77736 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowJob.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowJob.java @@ -54,6 +54,8 @@ public class FlowJob extends AbstractJob { /** * Create a {@link FlowJob} with provided name and no flow (invalid state). + * + * @param name the name to be associated with the FlowJob. */ public FlowJob(String name) { super(name); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowStep.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowStep.java index 67ae795ab..a52db8b28 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowStep.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowStep.java @@ -49,6 +49,8 @@ public class FlowStep extends AbstractStep { /** * Constructor for a {@link FlowStep} that sets the flow and of the step * explicitly. + * + * @param flow the {@link Flow} instance to be associated with this step. */ public FlowStep(Flow flow) { super(flow.getName()); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/JobFlowExecutor.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/JobFlowExecutor.java index 07a4adb4b..bca08800e 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/JobFlowExecutor.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/JobFlowExecutor.java @@ -48,7 +48,9 @@ public class JobFlowExecutor implements FlowExecutor { private final JobRepository jobRepository; /** - * @param execution + * @param jobRepository instance of {@link JobRepository}. + * @param stepHandler instance of {@link StepHandler}. + * @param execution instance of {@link JobExecution}. */ public JobFlowExecutor(JobRepository jobRepository, StepHandler stepHandler, JobExecution execution) { this.jobRepository = jobRepository; @@ -134,7 +136,7 @@ public class JobFlowExecutor implements FlowExecutor { } /** - * @param status + * @param status instance of {@link FlowExecutionStatus}. * @return A {@link BatchStatus} appropriate for the {@link FlowExecutionStatus} provided */ protected BatchStatus findBatchStatus(FlowExecutionStatus status) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/SimpleFlow.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/SimpleFlow.java index a767c184e..9167f9687 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/SimpleFlow.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/SimpleFlow.java @@ -201,8 +201,11 @@ public class SimpleFlow implements Flow, InitializingBean { } /** + * @param stateName the name of the next state. + * @param status {@link FlowExecutionStatus} instance. + * @param stepExecution {@link StepExecution} instance. * @return the next {@link Step} (or null if this is the end) - * @throws org.springframework.batch.core.job.flow.FlowExecutionException + * @throws FlowExecutionException thrown if error occurs during nextState processing. */ protected State nextState(String stateName, FlowExecutionStatus status, StepExecution stepExecution) throws FlowExecutionException { Set set = transitionMap.get(stateName); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/StateTransition.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/StateTransition.java index 612f3cd71..241286bd3 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/StateTransition.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/StateTransition.java @@ -53,6 +53,7 @@ public final class StateTransition { * * @param state the {@link State} used to generate the outcome for this * transition + * @return {@link StateTransition} that was created. */ public static StateTransition createEndStateTransition(State state) { return createStateTransition(state, null, null); @@ -67,6 +68,7 @@ public final class StateTransition { * transition * @param pattern the pattern to match in the exit status of the * {@link State} + * @return {@link StateTransition} that was created. */ public static StateTransition createEndStateTransition(State state, String pattern) { return createStateTransition(state, pattern, null); @@ -80,7 +82,7 @@ public final class StateTransition { * @param state the new state for the origin * @param next the new name for the destination * - * @return a {@link StateTransition} + * @return {@link StateTransition} that was created. */ public static StateTransition switchOriginAndDestination(StateTransition stateTransition, State state, String next) { return createStateTransition(state, stateTransition.pattern, next); @@ -93,6 +95,7 @@ public final class StateTransition { * @param state the {@link State} used to generate the outcome for this * transition * @param next the name of the next {@link State} to execute + * @return {@link StateTransition} that was created. */ public static StateTransition createStateTransition(State state, String next) { return createStateTransition(state, null, next); @@ -107,6 +110,7 @@ public final class StateTransition { * @param pattern the pattern to match in the exit status of the * {@link State} * @param next the name of the next {@link State} to execute + * @return {@link StateTransition} that was created. */ public static StateTransition createStateTransition(State state, String pattern, String next) { return new StateTransition(state, pattern, next); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/AbstractState.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/AbstractState.java index ee531dfa7..b7d2dacf1 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/AbstractState.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/AbstractState.java @@ -29,7 +29,7 @@ public abstract class AbstractState implements State { private final String name; /** - * + * @param name to be used by the state. */ public AbstractState(String name) { this.name = name; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/DecisionState.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/DecisionState.java index 704ebba5b..b0afe80a7 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/DecisionState.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/DecisionState.java @@ -31,7 +31,8 @@ public class DecisionState extends AbstractState { private final JobExecutionDecider decider; /** - * @param name + * @param decider the {@link JobExecutionDecider} instance to make the status decision. + * @param name the name to be associated with the decision state. */ public DecisionState(JobExecutionDecider decider, String name) { super(name); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/EndState.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/EndState.java index 375c1d441..d33850fbe 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/EndState.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/EndState.java @@ -48,6 +48,7 @@ public class EndState extends AbstractState { /** * @param status The {@link FlowExecutionStatus} to end with * @param name The name of the state + * @param code The exit status to save */ public EndState(FlowExecutionStatus status, String code, String name) { this(status, code, name, false); @@ -56,6 +57,7 @@ public class EndState extends AbstractState { /** * @param status The {@link FlowExecutionStatus} to end with * @param name The name of the state + * @param code The exit status to save * @param abandon flag to indicate that previous step execution can be * marked as abandoned (if there is one) * diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/FlowState.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/FlowState.java index 4c75971e9..13ff22986 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/FlowState.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/FlowState.java @@ -35,7 +35,8 @@ public class FlowState extends AbstractState implements FlowHolder { private final Flow flow; /** - * @param name + * @param flow the {@link Flow} instance to be used by the state. + * @param name the name to be associated with the state. */ public FlowState(Flow flow, String name) { super(name); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/SplitState.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/SplitState.java index cec44e9c3..85499b1fc 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/SplitState.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/SplitState.java @@ -49,7 +49,8 @@ public class SplitState extends AbstractState implements FlowHolder { private FlowExecutionAggregator aggregator = new MaxValueFlowExecutionAggregator(); /** - * @param name + * @param flows collection of {@link Flow} instances. + * @param name the name to be associated with the state. */ public SplitState(Collection flows, String name) { super(name); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/JsrJobExecution.java b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/JsrJobExecution.java index 60b093b49..6ff88bcc8 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/JsrJobExecution.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/JsrJobExecution.java @@ -36,7 +36,8 @@ public class JsrJobExecution implements javax.batch.runtime.JobExecution { private JobParametersConverter parametersConverter; /** - * @param execution for all information to be delegated from + * @param execution for all information to be delegated from. + * @param parametersConverter instance of {@link JobParametersConverter}. */ public JsrJobExecution(org.springframework.batch.core.JobExecution execution, JobParametersConverter parametersConverter) { Assert.notNull(execution, "A JobExecution is required"); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/JsrJobListenerMetaData.java b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/JsrJobListenerMetaData.java index 59c9db868..d19f45f80 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/JsrJobListenerMetaData.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/JsrJobListenerMetaData.java @@ -78,7 +78,7 @@ public enum JsrJobListenerMetaData implements ListenerMetaData { /** * Return the relevant meta data for the provided property name. * - * @param propertyName + * @param propertyName the name of the property to return. * @return meta data with supplied property name, null if none exists. */ public static JsrJobListenerMetaData fromPropertyName(String propertyName){ diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/JsrStepListenerMetaData.java b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/JsrStepListenerMetaData.java index 5c0d68d74..e1f87c26a 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/JsrStepListenerMetaData.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/JsrStepListenerMetaData.java @@ -114,7 +114,7 @@ public enum JsrStepListenerMetaData implements ListenerMetaData { /** * Return the relevant meta data for the provided property name. * - * @param propertyName + * @param propertyName the name of the property to return. * @return meta data with supplied property name, null if none exists. */ public static JsrStepListenerMetaData fromPropertyName(String propertyName){ diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/StepListenerAdapter.java b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/StepListenerAdapter.java index 6fa80407f..9e73f8b3e 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/StepListenerAdapter.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/StepListenerAdapter.java @@ -35,7 +35,7 @@ public class StepListenerAdapter implements StepExecutionListener { private final StepListener delegate; /** - * @param delegate + * @param delegate instance of {@link StepListener}. */ public StepListenerAdapter(StepListener delegate) { Assert.notNull(delegate, "A listener is required"); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/configuration/support/SpringAutowiredAnnotationBeanPostProcessor.java b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/configuration/support/SpringAutowiredAnnotationBeanPostProcessor.java index 5b85b7f20..8e6e42cd1 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/configuration/support/SpringAutowiredAnnotationBeanPostProcessor.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/configuration/support/SpringAutowiredAnnotationBeanPostProcessor.java @@ -124,6 +124,8 @@ class SpringAutowiredAnnotationBeanPostProcessor extends InstantiationAwareBeanP *

This setter property exists so that developers can provide their own * (non-Spring-specific) annotation type to indicate that a member is * supposed to be autowired. + * + * @param autowiredAnnotationType type to be used by constructors, fields and methods. */ public void setAutowiredAnnotationType(Class autowiredAnnotationType) { Assert.notNull(autowiredAnnotationType, "'autowiredAnnotationType' must not be null"); @@ -139,6 +141,8 @@ class SpringAutowiredAnnotationBeanPostProcessor extends InstantiationAwareBeanP *

This setter property exists so that developers can provide their own * (non-Spring-specific) annotation types to indicate that a member is * supposed to be autowired. + + * @param autowiredAnnotationTypes set of types to be used by constructors, fields and methods. */ public void setAutowiredAnnotationTypes(Set> autowiredAnnotationTypes) { Assert.notEmpty(autowiredAnnotationTypes, "'autowiredAnnotationTypes' must not be empty"); @@ -149,6 +153,9 @@ class SpringAutowiredAnnotationBeanPostProcessor extends InstantiationAwareBeanP /** * Set the name of a parameter of the annotation that specifies * whether it is required. + * + * @param requiredParameterName the name of the parameter. + * * @see #setRequiredParameterValue(boolean) */ public void setRequiredParameterName(String requiredParameterName) { @@ -160,6 +167,9 @@ class SpringAutowiredAnnotationBeanPostProcessor extends InstantiationAwareBeanP *

For example if using 'required=true' (the default), * this value should be true; but if using * 'optional=false', this value should be false. + * + * @param requiredParameterValue true if dependency is required. + * * @see #setRequiredParameterName(String) */ public void setRequiredParameterValue(boolean requiredParameterValue) { @@ -357,8 +367,11 @@ class SpringAutowiredAnnotationBeanPostProcessor extends InstantiationAwareBeanP /** * Obtain all beans of the given type as autowire candidates. - * @param type the type of the bean + * + * @param type the type of the bean. + * @param the type of the bean. * @return the target beans, or an empty Collection if no bean of this type is found + * * @throws BeansException if bean retrieval failed */ protected Map findAutowireCandidates(Class type) throws BeansException { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/configuration/xml/DecisionStepFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/configuration/xml/DecisionStepFactoryBean.java index d6950e6b9..e2165cf27 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/configuration/xml/DecisionStepFactoryBean.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/configuration/xml/DecisionStepFactoryBean.java @@ -54,7 +54,7 @@ public class DecisionStepFactoryBean implements FactoryBean, InitializingB /** * The name of the state * - * @param name + * @param name the name to be used by the DecisionStep. */ public void setName(String name) { this.name = name; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/configuration/xml/FlowParser.java b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/configuration/xml/FlowParser.java index 063a51337..d8b9419fa 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/configuration/xml/FlowParser.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/configuration/xml/FlowParser.java @@ -213,10 +213,12 @@ public class FlowParser extends AbstractFlowParser { * "no restriction" (same as "*"). * @param next The state to which this transition should go. Use null if not * applicable. + * @param restart The restart attribute this transition will set. * @param exitCode The exit code that this transition will set. Use null to * default to batchStatus. * @param stateDef The bean definition for the current state * @param parserContext the parser context for the bean factory + * @param abandon the abandon state this transition will set. * @return a collection of * {@link org.springframework.batch.core.job.flow.support.StateTransition} * references diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/configuration/xml/JsrXmlApplicationContext.java b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/configuration/xml/JsrXmlApplicationContext.java index 7de3da48f..657495d6c 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/configuration/xml/JsrXmlApplicationContext.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/configuration/xml/JsrXmlApplicationContext.java @@ -73,6 +73,8 @@ public class JsrXmlApplicationContext extends GenericApplicationContext { /** * Set whether to use XML validation. Default is true. + * + * @param validating true if XML should be validated. */ public void setValidating(boolean validating) { this.reader.setValidating(validating); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/configuration/xml/PartitionParser.java b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/configuration/xml/PartitionParser.java index ed4502441..8fabc01f5 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/configuration/xml/PartitionParser.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/configuration/xml/PartitionParser.java @@ -63,6 +63,7 @@ public class PartitionParser { /** * @param stepName the name of the step that is being partitioned + * @param allowStartIfComplete boolean to establish the allowStartIfComplete property for parition properties. */ public PartitionParser(String stepName, boolean allowStartIfComplete) { this.name = stepName; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/job/JsrStepHandler.java b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/job/JsrStepHandler.java index 3b9d7777e..a64946f6a 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/job/JsrStepHandler.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/job/JsrStepHandler.java @@ -47,7 +47,8 @@ public class JsrStepHandler extends SimpleStepHandler { private JobExplorer jobExplorer; /** - * @param jobRepository + * @param jobRepository instance of {@link JobRepository}. + * @param jobExplorer instance of {@link JobExplorer}. */ public JsrStepHandler(JobRepository jobRepository, JobExplorer jobExplorer) { super(jobRepository, new ExecutionContext()); @@ -65,8 +66,8 @@ public class JsrStepHandler extends SimpleStepHandler { * Given a step and configuration, return true if the step should start, * false if it should not, and throw an exception if the job should finish. * @param lastStepExecution the last step execution - * @param jobExecution - * @param step + * @param jobExecution instance of {@link JobExecution} + * @param step instance of {@link Step} * * @throws StartLimitExceededException if the start limit has been exceeded * for this step diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/job/flow/support/state/JsrEndState.java b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/job/flow/support/state/JsrEndState.java index 0f6c5b9a7..8c685b41a 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/job/flow/support/state/JsrEndState.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/job/flow/support/state/JsrEndState.java @@ -48,6 +48,7 @@ public class JsrEndState extends org.springframework.batch.core.job.flow.support /** * @param status The {@link FlowExecutionStatus} to end with * @param name The name of the state + * @param code the exit status. */ public JsrEndState(FlowExecutionStatus status, String code, String name) { super(status, code, name, false); @@ -58,6 +59,7 @@ public class JsrEndState extends org.springframework.batch.core.job.flow.support * @param name The name of the state * @param abandon flag to indicate that previous step execution can be * marked as abandoned (if there is one) + * @param code the exit status. * */ public JsrEndState(FlowExecutionStatus status, String code, String name, boolean abandon) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/job/flow/support/state/JsrSplitState.java b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/job/flow/support/state/JsrSplitState.java index 8fad9088a..a823163f8 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/job/flow/support/state/JsrSplitState.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/job/flow/support/state/JsrSplitState.java @@ -38,7 +38,7 @@ public class JsrSplitState extends org.springframework.batch.core.job.flow.suppo /** * @param flows {@link Flow}s to be executed in parallel - * @param name + * @param name the name to be associated with the split state. */ public JsrSplitState(Collection flows, String name) { super(flows, name); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/launch/JsrJobOperator.java b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/launch/JsrJobOperator.java index 7919ac522..4cf937215 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/launch/JsrJobOperator.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/launch/JsrJobOperator.java @@ -174,9 +174,10 @@ public class JsrJobOperator implements JobOperator, ApplicationContextAware, Ini * an {@link ApplicationContext}. This constructor does not and is therefore dependency injection * friendly. Also useful for unit testing. * - * @param jobExplorer an instance of Spring Batch's {@link JobExplorer} - * @param jobRepository an instance of Spring Batch's {@link JobOperator} - * @param jobParametersConverter an instance of Spring Batch's {@link JobParametersConverter} + * @param jobExplorer an instance of Spring Batch's {@link JobExplorer}. + * @param jobRepository an instance of Spring Batch's {@link JobOperator}. + * @param jobParametersConverter an instance of Spring Batch's {@link JobParametersConverter}. + * @param transactionManager and instance of Spring Batch's {@link javax.transaction.TransactionManager}. */ public JsrJobOperator(JobExplorer jobExplorer, JobRepository jobRepository, JobParametersConverter jobParametersConverter, PlatformTransactionManager transactionManager) { Assert.notNull(jobExplorer, "A JobExplorer is required"); @@ -717,8 +718,8 @@ public class JsrJobOperator implements JobOperator, ApplicationContextAware, Ini * Stops the running job execution if it is currently running. * * @param executionId the database id for the {@link JobExecution} to be stopped. - * @throws NoSuchJobExecutionException - * @throws JobExecutionNotRunningException + * @throws NoSuchJobExecutionException thrown if {@link JobExecution} instance does not exist. + * @throws JobExecutionNotRunningException thrownif {@link JobExecution} is not running. */ @Override public void stop(long executionId) throws NoSuchJobExecutionException, diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/step/item/JsrChunkProcessor.java b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/step/item/JsrChunkProcessor.java index 26e9c1c27..757f8e9be 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/step/item/JsrChunkProcessor.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/step/item/JsrChunkProcessor.java @@ -143,7 +143,7 @@ public class JsrChunkProcessor implements ChunkProcessor { * @param contribution a {@link StepContribution} * @param chunk a {@link Chunk} * @return an item - * @throws Exception + * @throws Exception thrown if error occurs during the reading portion of the chunking loop. */ protected I provide(final StepContribution contribution, final Chunk chunk) throws Exception { return doProvide(contribution, chunk); @@ -155,7 +155,7 @@ public class JsrChunkProcessor implements ChunkProcessor { * @param contribution a {@link StepContribution} * @param chunk a {@link Chunk} * @return an item - * @throws Exception + * @throws Exception thrown if error occurs during reading or listener calls. */ protected final I doProvide(final StepContribution contribution, final Chunk chunk) throws Exception { try { @@ -185,7 +185,7 @@ public class JsrChunkProcessor implements ChunkProcessor { * @param contribution a {@link StepContribution} * @param item an item * @return a processed item if a processor is present (the unmodified item if it is not) - * @throws Exception + * @throws Exception thrown if error occurs during the processing portion of the chunking loop. */ protected O transform(final StepContribution contribution, final I item) throws Exception { if (itemProcessor == null) { @@ -202,7 +202,7 @@ public class JsrChunkProcessor implements ChunkProcessor { * * @param item the item to be processed * @return the processed item - * @throws Exception + * @throws Exception thrown if error occurs during processing. */ protected final O doTransform(I item) throws Exception { try { @@ -223,7 +223,7 @@ public class JsrChunkProcessor implements ChunkProcessor { * * @param contribution a {@link StepContribution} * @param chunk a {@link Chunk} - * @throws Exception + * @throws Exception thrown if error occurs during the writing portion of the chunking loop. */ protected void persist(final StepContribution contribution, final Chunk chunk) throws Exception { doPersist(contribution, chunk); @@ -236,7 +236,7 @@ public class JsrChunkProcessor implements ChunkProcessor { * * @param contribution a {@link StepContribution} * @param chunk a {@link Chunk} - * @throws Exception + * @throws Exception thrown if error occurs during the writing portion of the chunking loop. */ protected final void doPersist(final StepContribution contribution, final Chunk chunk) throws Exception { try { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/step/item/JsrFaultTolerantChunkProcessor.java b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/step/item/JsrFaultTolerantChunkProcessor.java index 51d4de8c9..e6ce2758b 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/step/item/JsrFaultTolerantChunkProcessor.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/step/item/JsrFaultTolerantChunkProcessor.java @@ -122,7 +122,7 @@ public class JsrFaultTolerantChunkProcessor extends JsrChunkProcessor * @param contribution a {@link StepContribution} * @param chunk a {@link Chunk} * @return I an item - * @throws Exception + * @throws Exception thrown if error occurs. */ @Override protected I provide(final StepContribution contribution, final Chunk chunk) throws Exception { @@ -211,7 +211,7 @@ public class JsrFaultTolerantChunkProcessor extends JsrChunkProcessor * @param contribution a {@link StepContribution} * @param item an item to be processed * @return O an item that has been processed if a processor is available - * @throws Exception + * @throws Exception thrown if error occurs. */ @Override @SuppressWarnings("unchecked") @@ -283,7 +283,7 @@ public class JsrFaultTolerantChunkProcessor extends JsrChunkProcessor * * @param contribution a {@link StepContribution} * @param chunk a {@link Chunk} - * @throws Exception + * @throws Exception thrown if error occurs. */ @Override protected void persist(final StepContribution contribution, final Chunk chunk) throws Exception { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobExecutionNotFailedException.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobExecutionNotFailedException.java index 91a53535a..87b238d9b 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobExecutionNotFailedException.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobExecutionNotFailedException.java @@ -29,6 +29,8 @@ public class JobExecutionNotFailedException extends JobExecutionException { /** * Create an exception with the given message. + * + * @param msg The message to send to the caller. */ public JobExecutionNotFailedException(String msg) { super(msg); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobExecutionNotStoppedException.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobExecutionNotStoppedException.java index 7a6fea66b..d99eaf1c7 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobExecutionNotStoppedException.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobExecutionNotStoppedException.java @@ -29,6 +29,8 @@ public class JobExecutionNotStoppedException extends JobExecutionException { /** * Create an exception with the given message. + * + * @param msg the message. */ public JobExecutionNotStoppedException(String msg) { super(msg); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobInstanceAlreadyExistsException.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobInstanceAlreadyExistsException.java index e8d4815cd..8618c34f7 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobInstanceAlreadyExistsException.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobInstanceAlreadyExistsException.java @@ -31,14 +31,16 @@ public class JobInstanceAlreadyExistsException extends JobExecutionException { /** * Create an exception with the given message. + * + * @param msg The message to send to caller. */ public JobInstanceAlreadyExistsException(String msg) { super(msg); } /** - * @param msg The message to send to caller - * @param e the cause of the exception + * @param msg The message to send to caller. + * @param e the cause of the exception. */ public JobInstanceAlreadyExistsException(String msg, Throwable e) { super(msg, e); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobLauncher.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobLauncher.java index 59fdd3cbd..86e62cc0b 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobLauncher.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobLauncher.java @@ -46,7 +46,9 @@ public interface JobLauncher { * one created. A exception will only be thrown if there is a failure to * start the job. If the job encounters some error while processing, the * JobExecution will be returned, and the status will need to be inspected. - * + * + * @param job the job to be executed. + * @param jobParameters the parameters to be associated with the job. * @return the {@link JobExecution} if it returns synchronously. If the * implementation is asynchronous, the status might well be unknown. * diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobOperator.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobOperator.java index e71d1df1d..59132f1a9 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobOperator.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobOperator.java @@ -50,7 +50,7 @@ public interface JobOperator { * @param instanceId the id of a {@link JobInstance} * @return the id values of all the {@link JobExecution JobExecutions} * associated with this instance - * @throws NoSuchJobInstanceException + * @throws NoSuchJobInstanceException is thrown if job for instance id does not exist. */ List getExecutions(long instanceId) throws NoSuchJobInstanceException; @@ -62,7 +62,7 @@ public interface JobOperator { * @param start the start index of the instances * @param count the maximum number of values to return * @return the id values of the {@link JobInstance JobInstances} - * @throws NoSuchJobException + * @throws NoSuchJobException is thrown if job for the jobName does not exist. */ List getJobInstances(String jobName, int start, int count) throws NoSuchJobException; @@ -99,7 +99,7 @@ public interface JobOperator { * name * @throws JobInstanceAlreadyExistsException if a job instance with this * name and parameters already exists - * @throws JobParametersInvalidException + * @throws JobParametersInvalidException thrown if some of the job parameters are invalid. */ Long start(String jobName, String parameters) throws NoSuchJobException, JobInstanceAlreadyExistsException, JobParametersInvalidException; @@ -140,11 +140,14 @@ public interface JobOperator { * @param jobName the name of the job to launch * @return the {@link JobExecution} id of the execution created when the job * is launched + * * @throws NoSuchJobException if there is no such job definition available * @throws JobParametersNotFoundException if the parameters cannot be found - * @throws JobParametersInvalidException - * @throws UnexpectedJobExecutionException + * @throws JobParametersInvalidException thrown if some of the job parameters are invalid. * @throws UnexpectedJobExecutionException if an unexpected condition arises + * @throws JobRestartException thrown if a job is restarted illegally. + * @throws JobExecutionAlreadyRunningException thrown if attempting to restart a job that is already executing. + * @throws JobInstanceAlreadyCompleteException thrown if attempting to restart a completed job. */ Long startNextInstance(String jobName) throws NoSuchJobException, JobParametersNotFoundException, JobRestartException, JobExecutionAlreadyRunningException, JobInstanceAlreadyCompleteException, UnexpectedJobExecutionException, JobParametersInvalidException; @@ -205,7 +208,7 @@ public interface JobOperator { * * @param jobExecutionId the job execution id to abort * @return the {@link JobExecution} that was aborted - * @throws NoSuchJobExecutionException + * @throws NoSuchJobExecutionException thrown if there is no job execution for the jobExecutionId. * @throws JobExecutionAlreadyRunningException if the job is running (it * should be stopped first) */ diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobParametersNotFoundException.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobParametersNotFoundException.java index be654d162..2d25d7daf 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobParametersNotFoundException.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobParametersNotFoundException.java @@ -31,14 +31,16 @@ public class JobParametersNotFoundException extends JobExecutionException { /** * Create an exception with the given message. + * + * @param msg The message to send to caller. */ public JobParametersNotFoundException(String msg) { super(msg); } /** - * @param msg The message to send to caller - * @param e the cause of the exception + * @param msg The message to send to caller. + * @param e the cause of the exception. */ public JobParametersNotFoundException(String msg, Throwable e) { super(msg, e); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/NoSuchJobException.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/NoSuchJobException.java index 906a47b1e..e78973c2e 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/NoSuchJobException.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/NoSuchJobException.java @@ -31,14 +31,16 @@ public class NoSuchJobException extends JobExecutionException { /** * Create an exception with the given message. + * + * @param msg The message to send to caller. */ public NoSuchJobException(String msg) { super(msg); } /** - * @param msg The message to send to caller - * @param e the cause of the exception + * @param msg The message to send to caller. + * @param e the cause of the exception. */ public NoSuchJobException(String msg, Throwable e) { super(msg, e); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/NoSuchJobExecutionException.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/NoSuchJobExecutionException.java index 16c05b473..b02fb2049 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/NoSuchJobExecutionException.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/NoSuchJobExecutionException.java @@ -30,14 +30,16 @@ public class NoSuchJobExecutionException extends JobExecutionException { /** * Create an exception with the given message. + * + * @param msg The message to send to caller. */ public NoSuchJobExecutionException(String msg) { super(msg); } /** - * @param msg The message to send to caller - * @param e the cause of the exception + * @param msg The message to send to caller. + * @param e the cause of the exception. */ public NoSuchJobExecutionException(String msg, Throwable e) { super(msg, e); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/NoSuchJobInstanceException.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/NoSuchJobInstanceException.java index c806cc5ca..e10694a1f 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/NoSuchJobInstanceException.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/NoSuchJobInstanceException.java @@ -30,14 +30,16 @@ public class NoSuchJobInstanceException extends JobExecutionException { /** * Create an exception with the given message. + * + * @param msg The message to send to caller. */ public NoSuchJobInstanceException(String msg) { super(msg); } /** - * @param msg The message to send to caller - * @param e the cause of the exception + * @param msg The message to send to caller. + * @param e the cause of the exception. */ public NoSuchJobInstanceException(String msg, Throwable e) { super(msg, e); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/CommandLineJobRunner.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/CommandLineJobRunner.java index 5ab100fcf..17d65e251 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/CommandLineJobRunner.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/CommandLineJobRunner.java @@ -222,7 +222,7 @@ public class CommandLineJobRunner { * dependency injection. Typically overridden by * {@link #setSystemExiter(SystemExiter)}. * - * @param systemExiter + * @param systemExiter {@link SystemExiter} instance to be used by CommandLineJobRunner instance. */ public static void presetSystemExiter(SystemExiter systemExiter) { CommandLineJobRunner.systemExiter = systemExiter; @@ -242,7 +242,7 @@ public class CommandLineJobRunner { /** * Injection setter for the {@link SystemExiter}. * - * @param systemExiter + * @param systemExiter {@link SystemExiter} instance to be used by CommandLineJobRunner instance. */ public void setSystemExiter(SystemExiter systemExiter) { CommandLineJobRunner.systemExiter = systemExiter; @@ -251,7 +251,8 @@ public class CommandLineJobRunner { /** * Injection setter for {@link JobParametersConverter}. * - * @param jobParametersConverter + * @param jobParametersConverter instance of {@link JobParametersConverter} + * to be used by the CommandLineJobRunner instance. */ public void setJobParametersConverter(JobParametersConverter jobParametersConverter) { this.jobParametersConverter = jobParametersConverter; @@ -260,7 +261,7 @@ public class CommandLineJobRunner { /** * Delegate to the exiter to (possibly) exit the VM gracefully. * - * @param status + * @param status int exit code that should be reported. */ public void exit(int status) { systemExiter.exit(status); @@ -524,6 +525,8 @@ public class CommandLineJobRunner { * The options (-restart, -next) can occur anywhere in the * command line. *

+ * + * @throws Exception is thrown if error occurs. */ public static void main(String[] args) throws Exception { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/JobRegistryBackgroundJobRunner.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/JobRegistryBackgroundJobRunner.java index e2f3b6809..e06a3fc33 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/JobRegistryBackgroundJobRunner.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/JobRegistryBackgroundJobRunner.java @@ -84,7 +84,7 @@ public class JobRegistryBackgroundJobRunner { private static List errors = Collections.synchronizedList(new ArrayList()); /** - * @param parentContextPath + * @param parentContextPath the parentContextPath to be used by the JobRegistryBackgroundJobRunner. */ public JobRegistryBackgroundJobRunner(String parentContextPath) { super(); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleJobLauncher.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleJobLauncher.java index aa32e0296..b59b8d723 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleJobLauncher.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleJobLauncher.java @@ -84,7 +84,7 @@ public class SimpleJobLauncher implements JobLauncher, InitializingBean { * re-start is either not allowed or not needed. * @throws JobInstanceAlreadyCompleteException if this instance has already * completed successfully - * @throws JobParametersInvalidException + * @throws JobParametersInvalidException thrown if jobParameters is invalid. */ @Override public JobExecution run(final Job job, final JobParameters jobParameters) @@ -175,7 +175,7 @@ public class SimpleJobLauncher implements JobLauncher, InitializingBean { /** * Set the JobRepsitory. * - * @param jobRepository + * @param jobRepository instance of {@link JobRepository}. */ public void setJobRepository(JobRepository jobRepository) { this.jobRepository = jobRepository; @@ -184,7 +184,7 @@ public class SimpleJobLauncher implements JobLauncher, InitializingBean { /** * Set the TaskExecutor. (Optional) * - * @param taskExecutor + * @param taskExecutor instance of {@link TaskExecutor}. */ public void setTaskExecutor(TaskExecutor taskExecutor) { this.taskExecutor = taskExecutor; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/AbstractListenerFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/AbstractListenerFactoryBean.java index b5b0f0551..99058e889 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/AbstractListenerFactoryBean.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/AbstractListenerFactoryBean.java @@ -205,6 +205,8 @@ public abstract class AbstractListenerFactoryBean implements FactoryBean listeners) { this.listeners.setItems(listeners); @@ -42,7 +42,7 @@ public class CompositeChunkListener implements ChunkListener { /** * Register additional listener. * - * @param chunkListener + * @param chunkListener instance of {@link ChunkListener}. */ public void register(ChunkListener chunkListener) { listeners.add(chunkListener); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemProcessListener.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemProcessListener.java index 8a85ac1fb..02b726199 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemProcessListener.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemProcessListener.java @@ -32,19 +32,19 @@ public class CompositeItemProcessListener implements ItemProcessListener> itemReadListeners) { - this.listeners.setItems(itemReadListeners); + public void setListeners(List> itemProcessorListeners) { + this.listeners.setItems(itemProcessorListeners); } /** * Register additional listener. * - * @param itemReaderListener + * @param itemProcessorListener instance of {@link ItemProcessListener} to be called when process events occur. */ - public void register(ItemProcessListener itemReaderListener) { - listeners.add(itemReaderListener); + public void register(ItemProcessListener itemProcessorListener) { + listeners.add(itemProcessorListener); } /** diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemReadListener.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemReadListener.java index 18c782bb7..f5267e763 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemReadListener.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemReadListener.java @@ -33,7 +33,7 @@ public class CompositeItemReadListener implements ItemReadListener { /** * Public setter for the listeners. * - * @param itemReadListeners + * @param itemReadListeners list of {@link ItemReadListener}s to be called when read events occur. */ public void setListeners(List> itemReadListeners) { this.listeners.setItems(itemReadListeners); @@ -42,7 +42,7 @@ public class CompositeItemReadListener implements ItemReadListener { /** * Register additional listener. * - * @param itemReaderListener + * @param itemReaderListener instance of {@link ItemReadListener} to be called when read events occur. */ public void register(ItemReadListener itemReaderListener) { listeners.add(itemReaderListener); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemWriteListener.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemWriteListener.java index d7ecb635e..5b7f5a4c3 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemWriteListener.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemWriteListener.java @@ -18,6 +18,7 @@ package org.springframework.batch.core.listener; import java.util.Iterator; import java.util.List; +import org.springframework.batch.core.ItemProcessListener; import org.springframework.batch.core.ItemWriteListener; import org.springframework.core.Ordered; @@ -33,7 +34,7 @@ public class CompositeItemWriteListener implements ItemWriteListener { /** * Public setter for the listeners. * - * @param itemWriteListeners + * @param itemWriteListeners list of {@link ItemWriteListener}s to be called when write events occur. */ public void setListeners(List> itemWriteListeners) { this.listeners.setItems(itemWriteListeners); @@ -42,7 +43,7 @@ public class CompositeItemWriteListener implements ItemWriteListener { /** * Register additional listener. * - * @param itemWriteListener + * @param itemWriteListener list of {@link ItemWriteListener}s to be called when write events occur. */ public void register(ItemWriteListener itemWriteListener) { listeners.add(itemWriteListener); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeJobExecutionListener.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeJobExecutionListener.java index 699073ec4..03de6998c 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeJobExecutionListener.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeJobExecutionListener.java @@ -33,7 +33,7 @@ public class CompositeJobExecutionListener implements JobExecutionListener { /** * Public setter for the listeners. * - * @param listeners + * @param listeners list of {@link JobExecutionListener}s to be called when job execution events occur. */ public void setListeners(List listeners) { this.listeners.setItems(listeners); @@ -42,7 +42,7 @@ public class CompositeJobExecutionListener implements JobExecutionListener { /** * Register additional listener. * - * @param jobExecutionListener + * @param jobExecutionListener instance {@link JobExecutionListener} to be called when job execution events occur. */ public void register(JobExecutionListener jobExecutionListener) { listeners.add(jobExecutionListener); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeSkipListener.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeSkipListener.java index 2e39c4e6f..a09510c04 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeSkipListener.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeSkipListener.java @@ -32,7 +32,7 @@ public class CompositeSkipListener implements SkipListener { /** * Public setter for the listeners. * - * @param listeners + * @param listeners list of {@link SkipListener}s to be called when skip events occur. */ public void setListeners(List> listeners) { this.listeners.setItems(listeners); @@ -41,7 +41,7 @@ public class CompositeSkipListener implements SkipListener { /** * Register additional listener. * - * @param listener + * @param listener instance of {@link SkipListener} to be called when skip events occur. */ public void register(SkipListener listener) { listeners.add(listener); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeStepExecutionListener.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeStepExecutionListener.java index b08cb6302..00cbe26fc 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeStepExecutionListener.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeStepExecutionListener.java @@ -35,7 +35,7 @@ public class CompositeStepExecutionListener implements StepExecutionListener { /** * Public setter for the listeners. * - * @param listeners + * @param listeners list of {@link StepExecutionListener}s to be called when step execution events occur. */ public void setListeners(StepExecutionListener[] listeners) { list.setItems(Arrays.asList(listeners)); @@ -44,7 +44,7 @@ public class CompositeStepExecutionListener implements StepExecutionListener { /** * Register additional listener. * - * @param stepExecutionListener + * @param stepExecutionListener instance of {@link StepExecutionListener} to be called when step execution events occur. */ public void register(StepExecutionListener stepExecutionListener) { list.add(stepExecutionListener); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/ExecutionContextPromotionListener.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/ExecutionContextPromotionListener.java index 0f55912ae..e373454a5 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/ExecutionContextPromotionListener.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/ExecutionContextPromotionListener.java @@ -99,7 +99,7 @@ public class ExecutionContextPromotionListener extends StepExecutionListenerSupp * If set to TRUE, the listener will throw an exception if any 'key' is not * found in the Step {@link ExecutionContext}. FALSE by default. * - * @param strict + * @param strict boolean value to establish the state of the strict flag. */ public void setStrict(boolean strict) { this.strict = strict; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/JobListenerMetaData.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/JobListenerMetaData.java index 14d0bd737..1426c9d84 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/JobListenerMetaData.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/JobListenerMetaData.java @@ -84,7 +84,7 @@ public enum JobListenerMetaData implements ListenerMetaData { /** * Return the relevant meta data for the provided property name. * - * @param propertyName + * @param propertyName name of the property to retrieve. * @return meta data with supplied property name, null if none exists. */ public static JobListenerMetaData fromPropertyName(String propertyName){ diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/MulticasterBatchListener.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/MulticasterBatchListener.java index 2e15b2d95..102eae5f7 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/MulticasterBatchListener.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/MulticasterBatchListener.java @@ -82,6 +82,8 @@ ItemProcessListener, ItemWriteListener, SkipListener, RetryReadLi * Register the listener for callbacks on the appropriate interfaces * implemented. Any {@link StepListener} can be provided, or an * {@link ItemStream}. Other types will be ignored. + * + * @param listener the {@link StepListener} instance to be registered. */ public void register(StepListener listener) { if (listener instanceof StepExecutionListener) { @@ -122,8 +124,6 @@ ItemProcessListener, ItemWriteListener, SkipListener, RetryReadLi } /** - * @param item - * @param result * @see org.springframework.batch.core.listener.CompositeItemProcessListener#afterProcess(java.lang.Object, * java.lang.Object) */ @@ -138,7 +138,6 @@ ItemProcessListener, ItemWriteListener, SkipListener, RetryReadLi } /** - * @param item * @see org.springframework.batch.core.listener.CompositeItemProcessListener#beforeProcess(java.lang.Object) */ @Override @@ -152,8 +151,6 @@ ItemProcessListener, ItemWriteListener, SkipListener, RetryReadLi } /** - * @param item - * @param ex * @see org.springframework.batch.core.listener.CompositeItemProcessListener#onProcessError(java.lang.Object, * java.lang.Exception) */ @@ -181,7 +178,6 @@ ItemProcessListener, ItemWriteListener, SkipListener, RetryReadLi } /** - * @param stepExecution * @see org.springframework.batch.core.listener.CompositeStepExecutionListener#beforeStep(org.springframework.batch.core.StepExecution) */ @Override @@ -195,7 +191,6 @@ ItemProcessListener, ItemWriteListener, SkipListener, RetryReadLi } /** - * * @see org.springframework.batch.core.listener.CompositeChunkListener#afterChunk(ChunkContext context) */ @Override @@ -209,7 +204,6 @@ ItemProcessListener, ItemWriteListener, SkipListener, RetryReadLi } /** - * * @see org.springframework.batch.core.listener.CompositeChunkListener#beforeChunk(ChunkContext context) */ @Override @@ -223,7 +217,6 @@ ItemProcessListener, ItemWriteListener, SkipListener, RetryReadLi } /** - * @param item * @see org.springframework.batch.core.listener.CompositeItemReadListener#afterRead(java.lang.Object) */ @Override @@ -237,7 +230,6 @@ ItemProcessListener, ItemWriteListener, SkipListener, RetryReadLi } /** - * * @see org.springframework.batch.core.listener.CompositeItemReadListener#beforeRead() */ @Override @@ -251,7 +243,6 @@ ItemProcessListener, ItemWriteListener, SkipListener, RetryReadLi } /** - * @param ex * @see org.springframework.batch.core.listener.CompositeItemReadListener#onReadError(java.lang.Exception) */ @Override @@ -265,7 +256,6 @@ ItemProcessListener, ItemWriteListener, SkipListener, RetryReadLi } /** - * * @see ItemWriteListener#afterWrite(List) */ @Override @@ -279,7 +269,6 @@ ItemProcessListener, ItemWriteListener, SkipListener, RetryReadLi } /** - * @param items * @see ItemWriteListener#beforeWrite(List) */ @Override @@ -293,8 +282,6 @@ ItemProcessListener, ItemWriteListener, SkipListener, RetryReadLi } /** - * @param ex - * @param items * @see ItemWriteListener#onWriteError(Exception, List) */ @Override @@ -308,7 +295,6 @@ ItemProcessListener, ItemWriteListener, SkipListener, RetryReadLi } /** - * @param t * @see org.springframework.batch.core.listener.CompositeSkipListener#onSkipInRead(java.lang.Throwable) */ @Override @@ -317,8 +303,6 @@ ItemProcessListener, ItemWriteListener, SkipListener, RetryReadLi } /** - * @param item - * @param t * @see org.springframework.batch.core.listener.CompositeSkipListener#onSkipInWrite(java.lang.Object, * java.lang.Throwable) */ @@ -328,8 +312,6 @@ ItemProcessListener, ItemWriteListener, SkipListener, RetryReadLi } /** - * @param item - * @param t * @see org.springframework.batch.core.listener.CompositeSkipListener#onSkipInProcess(Object, * Throwable) */ diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/StepListenerMetaData.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/StepListenerMetaData.java index 31d46e66e..1ba186aa1 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/StepListenerMetaData.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/StepListenerMetaData.java @@ -125,7 +125,7 @@ public enum StepListenerMetaData implements ListenerMetaData { /** * Return the relevant meta data for the provided property name. * - * @param propertyName + * @param propertyName name of the {@link StepListenerMetaData} to retrieve. * @return meta data with supplied property name, null if none exists. */ public static StepListenerMetaData fromPropertyName(String propertyName){ diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/JobExecutionAlreadyRunningException.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/JobExecutionAlreadyRunningException.java index f37a75556..8b7fad110 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/JobExecutionAlreadyRunningException.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/JobExecutionAlreadyRunningException.java @@ -25,15 +25,15 @@ import org.springframework.batch.core.JobExecutionException; public class JobExecutionAlreadyRunningException extends JobExecutionException { /** - * @param msg + * @param msg the exception message. */ public JobExecutionAlreadyRunningException(String msg) { super(msg); } /** - * @param msg - * @param cause + * @param msg the exception message. + * @param cause the cause of the exception. */ public JobExecutionAlreadyRunningException(String msg, Throwable cause) { super(msg, cause); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/JobRepository.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/JobRepository.java index cef28dbfe..fee05375b 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/JobRepository.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/JobRepository.java @@ -71,10 +71,10 @@ public interface JobRepository { * with, the {@link JobParameters} used to execute it with and the location of the configuration * file that defines the job. * - * @param jobInstance - * @param jobParameters - * @param jobConfigurationLocation - * @return the new {@link JobExecution} + * @param jobInstance {@link JobInstance} instance to initialize the new JobExecution. + * @param jobParameters {@link JobParameters} instance to initialize the new JobExecution. + * @param jobConfigurationLocation {@link String} instance to initialize the new JobExecution. + * @return the new {@link JobExecution}. */ JobExecution createJobExecution(JobInstance jobInstance, JobParameters jobParameters, String jobConfigurationLocation); @@ -105,6 +105,7 @@ public interface JobRepository { * @param jobParameters the runtime parameters for the job * * @return a valid {@link JobExecution} for the arguments provided + * * @throws JobExecutionAlreadyRunningException if there is a * {@link JobExecution} already running for the job instance with the * provided job and parameters. @@ -124,7 +125,7 @@ public interface JobRepository { * Preconditions: {@link JobExecution} must contain a valid * {@link JobInstance} and be saved (have an id assigned). * - * @param jobExecution + * @param jobExecution {@link JobExecution} instance to be updated in the repo. */ void update(JobExecution jobExecution); @@ -136,7 +137,7 @@ public interface JobRepository { * * Preconditions: {@link StepExecution} must have a valid {@link Step}. * - * @param stepExecution + * @param stepExecution {@link StepExecution} instance to be added to the repo. */ void add(StepExecution stepExecution); @@ -147,7 +148,7 @@ public interface JobRepository { * * Preconditions: {@link StepExecution} must have a valid {@link Step}. * - * @param stepExecutions + * @param stepExecutions collection of {@link StepExecution} instances to be added to the repo. */ void addAll(Collection stepExecutions); @@ -156,7 +157,7 @@ public interface JobRepository { * * Preconditions: {@link StepExecution} must be saved (have an id assigned). * - * @param stepExecution + * @param stepExecution {@link StepExecution} instance to be updated in the repo. */ void update(StepExecution stepExecution); @@ -164,24 +165,26 @@ public interface JobRepository { * Persist the updated {@link ExecutionContext}s of the given * {@link StepExecution}. * - * @param stepExecution + * @param stepExecution {@link StepExecution} instance to be used to update the context. */ void updateExecutionContext(StepExecution stepExecution); /** * Persist the updated {@link ExecutionContext} of the given * {@link JobExecution}. - * @param jobExecution + * @param jobExecution {@link JobExecution} instance to be used to update the context. */ void updateExecutionContext(JobExecution jobExecution); /** + * @param jobInstance {@link JobInstance} instance containing the step executions. * @param stepName the name of the step execution that might have run. * @return the last execution of step for the given job instance. */ StepExecution getLastStepExecution(JobInstance jobInstance, String stepName); /** + * @param jobInstance {@link JobInstance} instance containing the step executions. * @param stepName the name of the step execution that might have run. * @return the execution count of the step within the given job instance. */ diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/DefaultExecutionContextSerializer.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/DefaultExecutionContextSerializer.java index 8c332e52b..7af67da0a 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/DefaultExecutionContextSerializer.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/DefaultExecutionContextSerializer.java @@ -46,8 +46,9 @@ public class DefaultExecutionContextSerializer implements ExecutionContextSerial * Serializes an execution context to the provided {@link OutputStream}. The * stream is not closed prior to it's return. * - * @param context - * @param out + * @param context {@link Map} containing the context information. + * @param out {@link OutputStream} where the serialized context information + * will be written. */ @Override @SuppressWarnings("unchecked") @@ -70,7 +71,7 @@ public class DefaultExecutionContextSerializer implements ExecutionContextSerial /** * Deserializes an execution context from the provided {@link InputStream}. * - * @param inputStream + * @param inputStream {@link InputStream} containing the information to be deserialized. * @return the object serialized in the provided {@link InputStream} */ @SuppressWarnings("unchecked") diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/ExecutionContextDao.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/ExecutionContextDao.java index 759012577..99761e941 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/ExecutionContextDao.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/ExecutionContextDao.java @@ -31,13 +31,13 @@ import org.springframework.batch.item.ExecutionContext; public interface ExecutionContextDao { /** - * @param jobExecution + * @param jobExecution {@link JobExecution} instance that contains the context. * @return execution context associated with the given jobExecution */ ExecutionContext getExecutionContext(JobExecution jobExecution); /** - * @param stepExecution + * @param stepExecution {@link StepExecution} instance that contains the context. * @return execution context associated with the given stepExecution */ ExecutionContext getExecutionContext(StepExecution stepExecution); @@ -45,35 +45,41 @@ public interface ExecutionContextDao { /** * Persist the execution context associated with the given jobExecution, * persistent entry for the context should not exist yet. - * @param jobExecution + * + * @param jobExecution {@link JobExecution} instance that contains the context. */ void saveExecutionContext(final JobExecution jobExecution); /** * Persist the execution context associated with the given stepExecution, * persistent entry for the context should not exist yet. - * @param stepExecution + * + * @param stepExecution {@link StepExecution} instance that contains the context. */ void saveExecutionContext(final StepExecution stepExecution); /** * Persist the execution context associated with each stepExecution in a given collection, * persistent entry for the context should not exist yet. - * @param stepExecutions + * + * @param stepExecutions a collection of {@link StepExecution}s that contain + * the contexts. */ void saveExecutionContexts(final Collection stepExecutions); /** * Persist the updates of execution context associated with the given * jobExecution. Persistent entry should already exist for this context. - * @param jobExecution + * + * @param jobExecution {@link JobExecution} instance that contains the context. */ void updateExecutionContext(final JobExecution jobExecution); /** * Persist the updates of execution context associated with the given * stepExecution. Persistent entry should already exist for this context. - * @param stepExecution + * + * @param stepExecution {@link StepExecution} instance that contains the context. */ void updateExecutionContext(final StepExecution stepExecution); } diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcExecutionContextDao.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcExecutionContextDao.java index 4aff271f0..09ac482de 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcExecutionContextDao.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcExecutionContextDao.java @@ -84,7 +84,7 @@ public class JdbcExecutionContextDao extends AbstractJdbcBatchMetadataDao implem /** * Setter for {@link Serializer} implementation * - * @param serializer + * @param serializer {@link ExecutionContextSerializer} instance to use. */ public void setSerializer(ExecutionContextSerializer serializer) { this.serializer = serializer; @@ -98,7 +98,7 @@ public class JdbcExecutionContextDao extends AbstractJdbcBatchMetadataDao implem * Default value is 2500. Clients using multi-bytes charsets on the database * server may need to reduce this value to as little as half the value of * the column size. - * @param shortContextLength + * @param shortContextLength int containing the shortContextLength. */ public void setShortContextLength(int shortContextLength) { this.shortContextLength = shortContextLength; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcJobExecutionDao.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcJobExecutionDao.java index 734881f64..9c0acabd0 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcJobExecutionDao.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcJobExecutionDao.java @@ -356,7 +356,7 @@ public class JdbcJobExecutionDao extends AbstractJdbcBatchMetadataDao implements } /** - * @param executionId + * @param executionId {@link Long} containing the id for the execution. * @return job parameters for the requested execution id */ protected JobParameters getJobParameters(Long executionId) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JobExecutionDao.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JobExecutionDao.java index 3a1514663..ead2b5543 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JobExecutionDao.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JobExecutionDao.java @@ -36,7 +36,7 @@ public interface JobExecutionDao { * Preconditions: jobInstance the jobExecution belongs to must have a * jobInstanceId. * - * @param jobExecution + * @param jobExecution {@link JobExecution} instance to be saved. */ void saveJobExecution(JobExecution jobExecution); @@ -46,13 +46,16 @@ public interface JobExecutionDao { * Preconditions: jobExecution must have an Id (which can be obtained by the * save method) and a jobInstanceId. * - * @param jobExecution + * @param jobExecution {@link JobExecution} instance to be updated. */ void updateJobExecution(JobExecution jobExecution); /** - * Return all {@link JobExecution} for given {@link JobInstance}, sorted + * Return all {@link JobExecution}s for given {@link JobInstance}, sorted * backwards by creation order (so the first element is the most recent). + * + * @param jobInstance {@link JobInstance} instance to find. + * @return {@link List} containing JobExecutions for the jobInstance. */ List findJobExecutions(JobInstance jobInstance); @@ -65,12 +68,14 @@ public interface JobExecutionDao { JobExecution getLastJobExecution(JobInstance jobInstance); /** + * @param jobName {@link String} containing the name of the job. * @return all {@link JobExecution} that are still running (or indeterminate * state), i.e. having null end date, for the specified job name. */ Set findRunningJobExecutions(String jobName); /** + * @param executionId {@link Long} containing the id of the execution. * @return the {@link JobExecution} for given identifier. */ JobExecution getJobExecution(Long executionId); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JobInstanceDao.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JobInstanceDao.java index 27b0f92c1..6e813c33a 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JobInstanceDao.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JobInstanceDao.java @@ -42,9 +42,10 @@ public interface JobInstanceDao { * PostConditions: A valid job instance will be returned which has been * persisted and contains an unique Id. * - * @param jobName - * @param jobParameters - * @return JobInstance + * @param jobName {@link String} containing the name of the job. + * @param jobParameters {@link JobParameters} containing the parameters for + * the JobInstance. + * @return JobInstance {@link JobInstance} instance that was created. */ JobInstance createJobInstance(String jobName, JobParameters jobParameters); @@ -93,6 +94,7 @@ public interface JobInstanceDao { /** * Retrieve the names of all job instances sorted alphabetically - i.e. jobs * that have ever been executed. + * * @return the names of all job instances */ List getJobNames(); @@ -101,9 +103,10 @@ public interface JobInstanceDao { * Fetch the last job instances with the provided name, sorted backwards by * primary key, using a 'like' criteria * - * @param jobName - * @param start - * @param count + * @param jobName {@link String} containing the name of the job. + * @param start int containing the offset of where list of job instances + * results should begin. + * @param count int containing the number of job instances to return. * @return a list of {@link JobInstance} for the job name requested. */ List findJobInstancesByName(String jobName, int start, int count); @@ -116,7 +119,8 @@ public interface JobInstanceDao { * @param jobName the name of the job to query for * @return the number of {@link JobInstance}s that exist within the * associated job repository - * @throws NoSuchJobException + * + * @throws NoSuchJobException thrown if no Job has the jobName specified. */ int getJobInstanceCount(String jobName) throws NoSuchJobException; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/StepExecutionDao.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/StepExecutionDao.java index f1e46e549..90353c62a 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/StepExecutionDao.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/StepExecutionDao.java @@ -30,7 +30,7 @@ public interface StepExecutionDao { * * Postconditions: Id will be set to a unique Long. * - * @param stepExecution + * @param stepExecution {@link StepExecution} instance to be saved. */ void saveStepExecution(StepExecution stepExecution); @@ -41,7 +41,7 @@ public interface StepExecutionDao { * * Postconditions: StepExecution Id will be set to a unique Long. * - * @param stepExecutions + * @param stepExecutions a collection of {@link JobExecution} instances to be saved. */ void saveStepExecutions(Collection stepExecutions); @@ -50,7 +50,7 @@ public interface StepExecutionDao { * * Preconditions: Id must not be null. * - * @param stepExecution + * @param stepExecution {@link StepExecution} instance to be updated. */ void updateStepExecution(StepExecution stepExecution); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/XStreamExecutionContextStringSerializer.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/XStreamExecutionContextStringSerializer.java index aef0bd75b..e7c0dddbc 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/XStreamExecutionContextStringSerializer.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/XStreamExecutionContextStringSerializer.java @@ -82,8 +82,10 @@ public class XStreamExecutionContextStringSerializer implements ExecutionContext /** * Serializes the passed execution context to the supplied OutputStream. * - * @param context - * @param out + * @param context {@link Map} containing the context information. + * @param out {@link OutputStream} where the serialized context information + * will be written. + * * @see Serializer#serialize(Object, OutputStream) */ @Override @@ -97,7 +99,8 @@ public class XStreamExecutionContextStringSerializer implements ExecutionContext /** * Deserializes the supplied input stream into a new execution context. * - * @param in + * @param in {@link InputStream} containing the information to be deserialized. + * @return a reconstructed execution context * @see Deserializer#deserialize(InputStream) */ diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/AbstractJobRepositoryFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/AbstractJobRepositoryFactoryBean.java index 534168dff..bb72c7df0 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/AbstractJobRepositoryFactoryBean.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/AbstractJobRepositoryFactoryBean.java @@ -63,21 +63,29 @@ public abstract class AbstractJobRepositoryFactoryBean implements FactoryBean { * context is available in the enclosing block. * * @param execution the execution to register + * @param propertyContext instance of {@link BatchPropertyContext} to be registered with this thread. * @return a new context or the current one if it has the same * execution */ diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/AbstractStep.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/AbstractStep.java index 78b5e5259..7fbe31834 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/AbstractStep.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/AbstractStep.java @@ -83,7 +83,7 @@ public abstract class AbstractStep implements Step, InitializingBean, BeanNameAw /** * Set the name property. Always overrides the default value if this object is a Spring bean. - * + * @param name the name to use for the {@link Step}. * @see #setBeanName(java.lang.String) */ public void setName(String name) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/NoSuchStepException.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/NoSuchStepException.java index eb7b42c54..57c342a7b 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/NoSuchStepException.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/NoSuchStepException.java @@ -27,7 +27,7 @@ public class NoSuchStepException extends RuntimeException { /** * Create a new exception instance with the message provided. - * @param message + * @param message the message to be used for this exception. */ public NoSuchStepException(String message) { super(message); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/StepLocatorStepFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/StepLocatorStepFactoryBean.java index 7345c6d54..957f500e4 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/StepLocatorStepFactoryBean.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/StepLocatorStepFactoryBean.java @@ -34,14 +34,14 @@ public class StepLocatorStepFactoryBean implements FactoryBean { public String stepName; /** - * @param stepLocator + * @param stepLocator instance of {@link StepLocator} to be used by the factory bean. */ public void setStepLocator(StepLocator stepLocator) { this.stepLocator = stepLocator; } /** - * @param stepName + * @param stepName the name to be associated with the step. */ public void setStepName(String stepName) { this.stepName = stepName; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/FaultTolerantStepBuilder.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/FaultTolerantStepBuilder.java index ae900078e..719447335 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/FaultTolerantStepBuilder.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/FaultTolerantStepBuilder.java @@ -359,7 +359,7 @@ public class FaultTolerantStepBuilder extends SimpleStepBuilder { /** * Explicitly request certain exceptions (and subclasses) to be skipped. * - * @param type + * @param type the class type. * @return this for fluent chaining */ public FaultTolerantStepBuilder skip(Class type) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/factory/FaultTolerantStepFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/factory/FaultTolerantStepFactoryBean.java index 1e66a6ec1..c64c24e6b 100755 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/factory/FaultTolerantStepFactoryBean.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/factory/FaultTolerantStepFactoryBean.java @@ -209,7 +209,7 @@ public class FaultTolerantStepFactoryBean extends SimpleStepFactoryBean extends SimpleChunkProvider { /** * The policy that determines whether exceptions can be skipped on read. - * @param SkipPolicy + * @param skipPolicy instance of {@link SkipPolicy} to be used by FaultTolerantChunkProvider. */ - public void setSkipPolicy(SkipPolicy SkipPolicy) { - this.skipPolicy = SkipPolicy; + public void setSkipPolicy(SkipPolicy skipPolicy) { + this.skipPolicy = skipPolicy; } /** diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/SimpleChunkProcessor.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/SimpleChunkProcessor.java index 34214d35c..ca3f90a28 100755 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/SimpleChunkProcessor.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/SimpleChunkProcessor.java @@ -84,7 +84,7 @@ public class SimpleChunkProcessor implements ChunkProcessor, Initializi * Register some {@link StepListener}s with the handler. Each will get the * callbacks in the order specified at the correct stage. * - * @param listeners + * @param listeners list of {@link StepListener} instances. */ public void setListeners(List listeners) { for (StepListener listener : listeners) { @@ -111,7 +111,7 @@ public class SimpleChunkProcessor implements ChunkProcessor, Initializi /** * @param item the input item * @return the result of the processing - * @throws Exception + * @throws Exception thrown if error occurs. */ protected final O doProcess(I item) throws Exception { @@ -137,8 +137,8 @@ public class SimpleChunkProcessor implements ChunkProcessor, Initializi /** * Surrounds the actual write call with listener callbacks. * - * @param items - * @throws Exception + * @param items list of items to be written. + * @throws Exception thrown if error occurs. */ protected final void doWrite(List items) throws Exception { @@ -161,15 +161,25 @@ public class SimpleChunkProcessor implements ChunkProcessor, Initializi /** * Call the listener's after write method. * - * @param items + * @param items list of items that will be passed to {@link MulticasterBatchListener#afterWrite(List)}. */ protected final void doAfterWrite(List items) { listener.afterWrite(items); } + + /** + * Call listener's writerError method. + * @param e exception that occured. + * @param items list of items that will be passed to {@link MulticasterBatchListener#onWriteError(Exception, List)}. + */ protected final void doOnWriteError(Exception e, List items) { listener.onWriteError(e, items); } + /** + * @param items list of items to be written. + * @throws Exception thrown if error occurs. + */ protected void writeItems(List items) throws Exception { if (itemWriter != null) { itemWriter.write(items); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/SimpleChunkProvider.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/SimpleChunkProvider.java index 47fc09d71..fc1e25e5c 100755 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/SimpleChunkProvider.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/SimpleChunkProvider.java @@ -56,7 +56,7 @@ public class SimpleChunkProvider implements ChunkProvider { * Register some {@link StepListener}s with the handler. Each will get the * callbacks in the order specified at the correct stage. * - * @param listeners + * @param listeners list of {@link StepListener}s. */ public void setListeners(List listeners) { for (StepListener listener : listeners) { @@ -83,7 +83,7 @@ public class SimpleChunkProvider implements ChunkProvider { /** * Surrounds the read call with listener callbacks. * @return item - * @throws Exception + * @throws Exception is thrown if error occurs during read. */ protected final I doRead() throws Exception { try { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/SkipWrapper.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/SkipWrapper.java index 7d678c0b5..f7c55fa92 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/SkipWrapper.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/SkipWrapper.java @@ -29,14 +29,14 @@ public class SkipWrapper { final private T item; /** - * @param item + * @param item the item that is associated with the SkipWrapper. */ public SkipWrapper(T item) { this(item, null); } /** - * @param e + * @param e instance of {@link Throwable} that is associated with the SkipWrapper. */ public SkipWrapper(Throwable e) { this(null, e); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/job/DefaultJobParametersExtractor.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/job/DefaultJobParametersExtractor.java index 600d02cd8..f513bc7f8 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/job/DefaultJobParametersExtractor.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/job/DefaultJobParametersExtractor.java @@ -133,7 +133,9 @@ public class DefaultJobParametersExtractor implements JobParametersExtractor { /** * setter to support switching off all parent parameters - * @param useAllParentParameters + * + * @param useAllParentParameters if false do not include parent parameters. + * True if all parent parameters need to be included. */ public void setUseAllParentParameters(boolean useAllParentParameters) { this.useAllParentParameters = useAllParentParameters; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/SystemCommandTasklet.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/SystemCommandTasklet.java index 6dc013fba..3df4b8a3b 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/SystemCommandTasklet.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/SystemCommandTasklet.java @@ -223,6 +223,8 @@ public class SystemCommandTasklet extends StepExecutionListenerSupport implement /** * Sets the task executor that will be used to execute the system command * NB! Avoid using a synchronous task executor + * + * @param taskExecutor instance of {@link TaskExecutor}. */ public void setTaskExecutor(TaskExecutor taskExecutor) { this.taskExecutor = taskExecutor; @@ -232,6 +234,8 @@ public class SystemCommandTasklet extends StepExecutionListenerSupport implement * If true tasklet will attempt to interrupt the thread * executing the system command if {@link #setTimeout(long)} has been * exceeded or user interrupts the job. false by default + * + * @param interruptOnCancel boolean to establish state of interruptOnCancel */ public void setInterruptOnCancel(boolean interruptOnCancel) { this.interruptOnCancel = interruptOnCancel; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/Tasklet.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/Tasklet.java index 743dcc188..7f64003e2 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/Tasklet.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/Tasklet.java @@ -39,6 +39,8 @@ public interface Tasklet { * restarts * @return an {@link RepeatStatus} indicating whether processing is * continuable. + * + * @throws Exception thrown if error occurs during execution. */ RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/TaskletStep.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/TaskletStep.java index f2a036f6e..f273a1889 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/TaskletStep.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/TaskletStep.java @@ -110,7 +110,7 @@ public class TaskletStep extends AbstractStep { } /** - * @param name + * @param name the name for the {@link TaskletStep} */ public TaskletStep(String name) { super(name); @@ -200,7 +200,7 @@ public class TaskletStep extends AbstractStep { * Register a single {@link ItemStream} for callbacks to the stream * interface. * - * @param stream + * @param stream instance of {@link ItemStream} */ public void registerStream(ItemStream stream) { this.stream.register(stream); diff --git a/spring-batch-test/src/main/java/org/springframework/batch/test/AbstractJobTests.java b/spring-batch-test/src/main/java/org/springframework/batch/test/AbstractJobTests.java index e987fc8c0..846ea6da5 100644 --- a/spring-batch-test/src/main/java/org/springframework/batch/test/AbstractJobTests.java +++ b/spring-batch-test/src/main/java/org/springframework/batch/test/AbstractJobTests.java @@ -126,6 +126,8 @@ public abstract class AbstractJobTests implements ApplicationContextAware { * Launch the entire job, including all steps. * * @return JobExecution, so that the test can validate the exit status + * + * @throws Exception is thrown if error occurs. */ protected JobExecution launchJob() throws Exception { return this.launchJob(this.getUniqueJobParameters()); @@ -136,6 +138,8 @@ public abstract class AbstractJobTests implements ApplicationContextAware { * * @param jobParameters parameters for the job * @return JobExecution, so that the test can validate the exit status + * + * @throws Exception is thrown if error occurs. */ protected JobExecution launchJob(JobParameters jobParameters) throws Exception { return getJobLauncher().run(this.job, jobParameters); diff --git a/spring-batch-test/src/main/java/org/springframework/batch/test/DataSourceInitializer.java b/spring-batch-test/src/main/java/org/springframework/batch/test/DataSourceInitializer.java index a1b42dfc6..ddc4a260a 100755 --- a/spring-batch-test/src/main/java/org/springframework/batch/test/DataSourceInitializer.java +++ b/spring-batch-test/src/main/java/org/springframework/batch/test/DataSourceInitializer.java @@ -69,7 +69,7 @@ public class DataSourceInitializer implements InitializingBean, DisposableBean { /** * Main method as convenient entry point. * - * @param args + * @param args arguments to be passed to main. */ @SuppressWarnings("resource") public static void main(String... args) { diff --git a/spring-batch-test/src/main/java/org/springframework/batch/test/JobLauncherTestUtils.java b/spring-batch-test/src/main/java/org/springframework/batch/test/JobLauncherTestUtils.java index 9bdd78ab1..e949585ba 100644 --- a/spring-batch-test/src/main/java/org/springframework/batch/test/JobLauncherTestUtils.java +++ b/spring-batch-test/src/main/java/org/springframework/batch/test/JobLauncherTestUtils.java @@ -66,8 +66,8 @@ import org.springframework.context.ApplicationContext; */ public class JobLauncherTestUtils { - private static final long JOB_PARAMETER_MAXIMUM = 1000000; - + private static final long JOB_PARAMETER_MAXIMUM = 1000000; + /** Logger */ protected final Log logger = LogFactory.getLog(getClass()); @@ -135,7 +135,7 @@ public class JobLauncherTestUtils { * Launch the entire job, including all steps. * * @return JobExecution, so that the test can validate the exit status - * @throws Exception + * @throws Exception thrown if error occurs launching the job. */ public JobExecution launchJob() throws Exception { return this.launchJob(this.getUniqueJobParameters()); @@ -144,9 +144,9 @@ public class JobLauncherTestUtils { /** * Launch the entire job, including all steps * - * @param jobParameters + * @param jobParameters instance of {@link JobParameters}. * @return JobExecution, so that the test can validate the exit status - * @throws Exception + * @throws Exception thrown if error occurs launching the job. */ public JobExecution launchJob(JobParameters jobParameters) throws Exception { return getJobLauncher().run(this.job, jobParameters); @@ -158,7 +158,7 @@ public class JobLauncherTestUtils { */ public JobParameters getUniqueJobParameters() { Map parameters = new HashMap(); - parameters.put("random", new JobParameter((long) (Math.random() * JOB_PARAMETER_MAXIMUM))); + parameters.put("random", new JobParameter((long) (Math.random() * JOB_PARAMETER_MAXIMUM))); return new JobParameters(parameters); } diff --git a/spring-batch-test/src/main/java/org/springframework/batch/test/JobRepositoryTestUtils.java b/spring-batch-test/src/main/java/org/springframework/batch/test/JobRepositoryTestUtils.java index 3959bd593..146302a49 100644 --- a/spring-batch-test/src/main/java/org/springframework/batch/test/JobRepositoryTestUtils.java +++ b/spring-batch-test/src/main/java/org/springframework/batch/test/JobRepositoryTestUtils.java @@ -123,6 +123,10 @@ public class JobRepositoryTestUtils extends AbstractJdbcBatchMetadataDao impleme * @param count the required number of instances of {@link JobExecution} to * create * @return a collection of {@link JobExecution} + * + * @throws JobExecutionAlreadyRunningException thrown if Job is already running. + * @throws JobRestartException thrown if Job is not restartable. + * @throws JobInstanceAlreadyCompleteException thrown if Job Instance is already complete. */ public List createJobExecutions(String jobName, String[] stepNames, int count) throws JobExecutionAlreadyRunningException, JobRestartException, JobInstanceAlreadyCompleteException { @@ -146,6 +150,9 @@ public class JobRepositoryTestUtils extends AbstractJdbcBatchMetadataDao impleme * @param count the required number of instances of {@link JobExecution} to * create * @return a collection of {@link JobExecution} + * @throws JobExecutionAlreadyRunningException thrown if Job is already running. + * @throws JobRestartException thrown if Job is not restartable. + * @throws JobInstanceAlreadyCompleteException thrown if Job Instance is already complete. */ public List createJobExecutions(int count) throws JobExecutionAlreadyRunningException, JobRestartException, JobInstanceAlreadyCompleteException { diff --git a/spring-batch-test/src/main/java/org/springframework/batch/test/JsrTestUtils.java b/spring-batch-test/src/main/java/org/springframework/batch/test/JsrTestUtils.java index 4b5749155..34b4188d6 100644 --- a/spring-batch-test/src/main/java/org/springframework/batch/test/JsrTestUtils.java +++ b/spring-batch-test/src/main/java/org/springframework/batch/test/JsrTestUtils.java @@ -48,9 +48,9 @@ public class JsrTestUtils { * reach one of those statuses within the given timeout, a {@link java.util.concurrent.TimeoutException} is * thrown. * - * @param jobName - * @param properties - * @param timeout + * @param jobName the name of the job. + * @param properties job parameters to be associated with the job. + * @param timeout maximum amount of time to wait in milliseconds. * @return the {@link JobExecution} for the final state of the job * @throws java.util.concurrent.TimeoutException if the timeout occurs */ @@ -82,9 +82,9 @@ public class JsrTestUtils { * reach one of those statuses within the given timeout, a {@link java.util.concurrent.TimeoutException} is * thrown. * - * @param executionId - * @param properties - * @param timeout + * @param executionId the id of the job execution to restart. + * @param properties job parameters to be associated with the job. + * @param timeout maximum amount of time to wait in milliseconds. * @return the {@link JobExecution} for the final state of the job * @throws java.util.concurrent.TimeoutException if the timeout occurs */ diff --git a/spring-batch-test/src/main/java/org/springframework/batch/test/MetaDataInstanceFactory.java b/spring-batch-test/src/main/java/org/springframework/batch/test/MetaDataInstanceFactory.java index 8b7ee7581..7818bf304 100644 --- a/spring-batch-test/src/main/java/org/springframework/batch/test/MetaDataInstanceFactory.java +++ b/spring-batch-test/src/main/java/org/springframework/batch/test/MetaDataInstanceFactory.java @@ -166,9 +166,10 @@ public class MetaDataInstanceFactory { /** * Create a {@link StepExecution} with the parameters provided. * - * @param stepName the stepName for the {@link StepExecution} - * @param executionId the id for the {@link StepExecution} - * @return a {@link StepExecution} with the given {@link JobExecution} + * @param jobExecution instance of {@link JobExecution}. + * @param stepName the name for the {@link StepExecution}. + * @param executionId the id for the {@link StepExecution}. + * @return a {@link StepExecution} with the given {@link JobExecution}. */ public static StepExecution createStepExecution(JobExecution jobExecution, String stepName, Long executionId) { StepExecution stepExecution = jobExecution.createStepExecution(stepName);