IN PROGRESS - BATCH-85: Many warnings in Javadocs (e.g. missing links and parameter names)

cleaned up the core module
This commit is contained in:
robokaso
2008-04-22 08:16:20 +00:00
parent 447997a5bc
commit 91e5467279
32 changed files with 63 additions and 84 deletions

View File

@@ -33,10 +33,10 @@ public interface ItemWriteListener extends StepListener {
void beforeWrite(Object item);
/**
* Called after {@link ItemWriter#write(Object) If the item is last in a
* Called after {@link ItemWriter#write(Object)} If the item is last in a
* chunk, this will be called before any transaction is committed, and
* before {@link ChunkListener#afterChunk()}
* @param item TODO
* @param item written item
*/
void afterWrite(Object item);

View File

@@ -140,8 +140,6 @@ public class JobExecution extends Entity {
/**
* Register a step execution with the current job execution.
*
* @param stepExecution
*/
public StepExecution createStepExecution(Step step) {
StepExecution stepExecution = new StepExecution(step, this, null);

View File

@@ -140,7 +140,7 @@ public class CommandLineJobRunner {
}
/**
* Injection setter for the {@link JvmExitCodeMapper}.
* Injection setter for the {@link ExitCodeMapper}.
*
* @param exitCodeMapper
* the exitCodeMapper to set

View File

@@ -6,7 +6,6 @@ package org.springframework.batch.core.launch.support;
* framework has specific requirements regarding the operating system process
* return status.
*
* @param The type of return status expected by the environment
* @author Stijn Maller
* @author Lucas Ward
* @author Dave Syer

View File

@@ -19,12 +19,13 @@ package org.springframework.batch.core.launch.support;
import java.util.Properties;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobParameters;
import org.springframework.batch.core.launch.JobLauncher;
/**
* Interface to expose for remote management of jobs. Similar to
* {@link JobLauncher}, but replaces {@link JobExecution} and
* {@link JobIdentifier} with Strings in return types and method parameters, so
* {@link JobParameters} with Strings in return types and method parameters, so
* it can be inspected by remote clients like the jconsole from the JRE without
* any links to Spring Batch.
*

View File

@@ -62,8 +62,8 @@ public class SimpleJobLauncher implements JobLauncher, InitializingBean {
* used to determine if this is an execution of an existing job instance, or if a new one should
* be created.
*
* @param job, the job to be run.
* @param jobParameters, the {@link JobParameters} for this particular execution.
* @param job the job to be run.
* @param jobParameters the {@link JobParameters} for this particular execution.
* @return JobExecutionAlreadyRunningException if the JobInstance already exists and has an
* execution already running.
* @throws JobRestartException if the execution would be a re-start, but a re-start is either

View File

@@ -33,7 +33,7 @@ public interface SystemExiter {
* @throws SecurityException
* if a security manager exists and its <code>checkExit</code>
* method doesn't allow exit with the specified status.
* @see System.exit
* @see System#exit(int)
*/
void exit(int status);
}

View File

@@ -42,7 +42,7 @@ public class CompositeChunkListener implements ChunkListener {
/**
* Register additional listener.
*
* @param stepListener
* @param chunkListener
*/
public void register(ChunkListener chunkListener) {
if (!listeners.contains(chunkListener)) {

View File

@@ -42,7 +42,7 @@ public class CompositeSkipListener implements SkipListener {
/**
* Register additional listener.
*
* @param stepExecutionListener
* @param listener
*/
public void register(SkipListener listener) {
if (!listeners.contains(listener)) {

View File

@@ -86,8 +86,7 @@ public class MulticasterBatchListener implements StepExecutionListener, ChunkLis
}
/**
* @return
* @see org.springframework.batch.core.listener.CompositeStepExecutionListener#afterStep()
* @see org.springframework.batch.core.listener.CompositeStepExecutionListener#afterStep(StepExecution)
*/
public ExitStatus afterStep(StepExecution stepExecution) {
return stepListener.afterStep(stepExecution);
@@ -103,8 +102,7 @@ public class MulticasterBatchListener implements StepExecutionListener, ChunkLis
/**
* @param e
* @return
* @see org.springframework.batch.core.listener.CompositeStepExecutionListener#onErrorInStep(java.lang.Throwable)
* @see org.springframework.batch.core.listener.CompositeStepExecutionListener#onErrorInStep(StepExecution, Throwable)
*/
public ExitStatus onErrorInStep(StepExecution stepExecution, Throwable e) {
return stepListener.onErrorInStep(stepExecution, e);

View File

@@ -72,7 +72,7 @@ public interface JobRepository {
* Preconditions: {@link JobExecution} must contain a valid
* {@link JobInstance}.
*
* @param jobInstance
* @param jobExecution
*/
void saveOrUpdate(JobExecution jobExecution);
@@ -83,11 +83,11 @@ public interface JobRepository {
* Instead, it should be left blank, to be assigned by a
* {@link JobRepository}. The {@link ExecutionContext} of the
* {@link StepExecution} is <em>not</em> saved: see
* {@link #saveExecutionContext(StepExecution)}.
* {@link #saveOrUpdateExecutionContext(StepExecution)}.
*
* Preconditions: {@link StepExecution} must have a valid {@link Step}.
*
* @param jobInstance
* @param stepExecution
*/
void saveOrUpdate(StepExecution stepExecution);

View File

@@ -29,7 +29,7 @@ public abstract class AbstractJdbcBatchMetadataDao implements InitializingBean {
/**
* Public setter for the table prefix property. This will be prefixed to all
* the table names before queries are executed. Defaults to
* {@value #DEFAULT_TABLE_PREFIX}.
* {@link #DEFAULT_TABLE_PREFIX}.
*
* @param tablePrefix the tablePrefix to set
*/

View File

@@ -64,7 +64,7 @@ public class JdbcJobExecutionDao extends AbstractJdbcBatchMetadataDao implements
}
/**
* @see JobDao#getJobExecutionCount(JobInstance)
* @see JobExecutionDao#getJobExecutionCount(JobInstance)
* @throws IllegalArgumentException if jobId is null.
*/
public int getJobExecutionCount(JobInstance jobInstance) {
@@ -82,7 +82,7 @@ public class JdbcJobExecutionDao extends AbstractJdbcBatchMetadataDao implements
* abstraction. Once a new id has been obtained, the JobExecution is saved
* via a SQL INSERT statement.
*
* @see JobDao#saveJobExecution(JobExecution)
* @see JobExecutionDao#saveJobExecution(JobExecution)
* @throws IllegalArgumentException if jobExecution is null, as well as any
* of it's fields to be persisted.
*/
@@ -124,7 +124,7 @@ public class JdbcJobExecutionDao extends AbstractJdbcBatchMetadataDao implements
* ID. The database is then queried to ensure that the ID exists, which
* ensures that it is valid.
*
* @see JobDao#updateJobExecution(JobExecution)
* @see JobExecutionDao#updateJobExecution(JobExecution)
*/
public void updateJobExecution(JobExecution jobExecution) {

View File

@@ -47,8 +47,8 @@ public class JdbcJobInstanceDao extends AbstractJdbcBatchMetadataDao implements
* jobIncrementer (which is likely a sequence) for the nextLong, and then
* passing the Id and parameter values into an INSERT statement.
*
* @see JobDao#createJob(JobIdentifier)
* @throws IllegalArgumentException if any {@link JobIdentifier} fields are
* @see JobInstanceDao#createJobInstance(Job, JobParameters)
* @throws IllegalArgumentException if any {@link JobParameters} fields are
* null.
*/
public JobInstance createJobInstance(Job job, JobParameters jobParameters) {
@@ -159,8 +159,8 @@ public class JdbcJobInstanceDao extends AbstractJdbcBatchMetadataDao implements
* The job table is queried for <strong>any</strong> jobs that match the
* given identifier, adding them to a list via the RowMapper callback.
*
* @see JobDao#findJobInstances(JobIdentifier)
* @throws IllegalArgumentException if any {@link JobIdentifier} fields are
* @see JobInstanceDao#getJobInstance(Job, JobParameters)
* @throws IllegalArgumentException if any {@link JobParameters} fields are
* null.
*/
public JobInstance getJobInstance(final Job job, final JobParameters jobParameters) {

View File

@@ -168,7 +168,7 @@ public class JdbcStepExecutionDao extends AbstractJdbcBatchMetadataDao implement
* stepExecutionIncrementor, and then set in the StepExecution. All values
* will then be stored via an INSERT statement.
*
* @see StepDao#saveStepExecution(StepExecution)
* @see StepExecutionDao#saveStepExecution(StepExecution)
*/
public void saveStepExecution(StepExecution stepExecution) {
@@ -213,7 +213,7 @@ public class JdbcStepExecutionDao extends AbstractJdbcBatchMetadataDao implement
* any attributes that don't match a provided type must be serialized into a
* blob.
*
* @see {@link LobCreator}
* @see LobCreator
*/
public void saveOrUpdateExecutionContext(final StepExecution stepExecution) {

View File

@@ -18,10 +18,10 @@ public interface JobInstanceDao {
*
* PreConditions: JobInstance for given name and parameters must not already exist
*
* PostConditions: A valid job instancewill be returned which has been persisted and
* PostConditions: A valid job instance will be returned which has been persisted and
* contains an unique Id.
*
* @param jobName
* @param job
* @param jobParameters
* @return JobInstance
*/
@@ -32,10 +32,10 @@ public interface JobInstanceDao {
* matching job instances are found, then a list of size 0 will be
* returned.
*
* @param jobName
* @param job
* @param jobParameters
* @return List of {@link JobInstance} objects matching
* {@link JobIdentifier}
* @return {@link JobInstance} object matching
* {@link Job} and {@link JobParameters}
*/
JobInstance getJobInstance(Job job, JobParameters jobParameters);

View File

@@ -127,9 +127,10 @@ public class SimpleJobRepository implements JobRepository {
* the same {@link JobParameters} and job name). The first transaction to
* complete in this scenario obtains a valid {@link JobExecution}, and
* others throw {@link JobExecutionAlreadyRunningException} (or timeout).
* There are no such guarantees if the {@link JobDao} does not respect the
* transaction isolation levels (e.g. if using a non-relational data-store,
* or if the platform does not support the higher isolation levels).
* There are no such guarantees if the {@link JobInstanceDao} and
* {@link JobExecutionDao} do not respect the transaction isolation levels
* (e.g. if using a non-relational data-store, or if the platform does not
* support the higher isolation levels).
* </p>
*
* @see JobRepository#createJobExecution(Job, JobParameters)
@@ -193,11 +194,11 @@ public class SimpleJobRepository implements JobRepository {
* Save or Update a JobExecution. A JobExecution is considered one
* 'execution' of a particular job. Therefore, it must have it's jobId field
* set before it is passed into this method. It also has it's own unique
* identifer, because it must be updatable separately. If an id isn't found,
* identifier, because it must be updatable separately. If an id isn't found,
* a new JobExecution is created, if one is found, the current row is
* updated.
*
* @param JobExecution to be stored.
* @param jobExecution to be stored.
* @throws IllegalArgumentException if jobExecution is null.
*/
public void saveOrUpdate(JobExecution jobExecution) {
@@ -221,7 +222,7 @@ public class SimpleJobRepository implements JobRepository {
* noted that assigning an ID randomly will likely cause an exception
* depending on the StepDao implementation.
*
* @param StepExecution to be saved.
* @param stepExecution to be saved.
* @throws IllegalArgumentException if stepExecution is null.
*/
public void saveOrUpdate(StepExecution stepExecution) {

View File

@@ -63,8 +63,6 @@ public class StepExecutionPreparedStatementSetter extends StepExecutionListenerS
* The parameter names that will be pulled from the {@link JobParameters}. It is
* assumed that their order in the List is the order of the parameters in the
* PreparedStatement.
*
* @return
*/
public void setParameterKeys(List parameterKeys) {
this.parameterKeys = parameterKeys;

View File

@@ -94,7 +94,6 @@ public class StepExecutionResourceProxy extends StepExecutionListenerSupport imp
/**
* @param relativePath
* @return
* @throws IOException
* @see org.springframework.core.io.Resource#createRelative(java.lang.String)
*/
@@ -105,7 +104,6 @@ public class StepExecutionResourceProxy extends StepExecutionListenerSupport imp
}
/**
* @return
* @see org.springframework.core.io.Resource#exists()
*/
public boolean exists() {
@@ -115,7 +113,6 @@ public class StepExecutionResourceProxy extends StepExecutionListenerSupport imp
}
/**
* @return
* @see org.springframework.core.io.Resource#getDescription()
*/
public String getDescription() {
@@ -125,7 +122,6 @@ public class StepExecutionResourceProxy extends StepExecutionListenerSupport imp
}
/**
* @return
* @throws IOException
* @see org.springframework.core.io.Resource#getFile()
*/
@@ -136,7 +132,6 @@ public class StepExecutionResourceProxy extends StepExecutionListenerSupport imp
}
/**
* @return
* @see org.springframework.core.io.Resource#getFilename()
*/
public String getFilename() {
@@ -146,7 +141,6 @@ public class StepExecutionResourceProxy extends StepExecutionListenerSupport imp
}
/**
* @return
* @throws IOException
* @see org.springframework.core.io.InputStreamSource#getInputStream()
*/
@@ -157,7 +151,6 @@ public class StepExecutionResourceProxy extends StepExecutionListenerSupport imp
}
/**
* @return
* @throws IOException
* @see org.springframework.core.io.Resource#getURI()
*/
@@ -168,7 +161,6 @@ public class StepExecutionResourceProxy extends StepExecutionListenerSupport imp
}
/**
* @return
* @throws IOException
* @see org.springframework.core.io.Resource#getURL()
*/
@@ -179,7 +171,6 @@ public class StepExecutionResourceProxy extends StepExecutionListenerSupport imp
}
/**
* @return
* @see org.springframework.core.io.Resource#isOpen()
*/
public boolean isOpen() {
@@ -288,7 +279,7 @@ public class StepExecutionResourceProxy extends StepExecutionListenerSupport imp
}
/**
* Delegates to the proxied Resource if set, otherwise returns the {@link #filePattern}.
* Delegates to the proxied Resource if set, otherwise returns the value of {@link #setFilePattern(String)}.
*/
public String toString() {
return (delegate == null) ? filePattern : delegate.toString();

View File

@@ -46,9 +46,8 @@ import org.springframework.util.Assert;
class BatchListenerFactoryHelper {
/**
* @param itemReader2
* @param itemReader
* @param listeners
* @return
*/
public ItemReader getItemReader(ItemReader itemReader, StepListener[] listeners) {
@@ -80,9 +79,8 @@ class BatchListenerFactoryHelper {
}
/**
* @param itemWriter2
* @param itemWriter
* @param listeners
* @return
*/
public ItemWriter getItemWriter(ItemWriter itemWriter, StepListener[] listeners) {
final CompositeItemWriteListener multicaster = new CompositeItemWriteListener();
@@ -115,7 +113,6 @@ class BatchListenerFactoryHelper {
/**
* @param chunkOperations
* @param listeners
* @return
*/
public RepeatOperations addChunkListeners(RepeatOperations chunkOperations, StepListener[] listeners) {
@@ -157,7 +154,6 @@ class BatchListenerFactoryHelper {
/**
* @param listeners
* @return
*/
public StepExecutionListener[] getStepListeners(StepListener[] listeners) {
List list = new ArrayList();
@@ -172,7 +168,6 @@ class BatchListenerFactoryHelper {
/**
* @param listeners
* @return
*/
public SkipListener[] getSkipListeners(StepListener[] listeners) {
List list = new ArrayList();

View File

@@ -18,9 +18,11 @@ package org.springframework.batch.core.step.item;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.batch.core.BatchStatus;
import org.springframework.batch.core.JobInterruptedException;
import org.springframework.batch.core.StepContribution;
import org.springframework.batch.core.StepExecution;
import org.springframework.batch.core.StepExecutionListener;
import org.springframework.batch.core.repository.JobRepository;
import org.springframework.batch.core.step.AbstractStep;
import org.springframework.batch.core.step.StepExecutionSynchronizer;
import org.springframework.batch.core.step.StepExecutionSynchronizerFactory;
@@ -200,7 +202,7 @@ public class ItemOrientedStep extends AbstractStep {
* is used to store the result. Various reporting information are also added
* to the current context (the {@link RepeatContext} governing the step
* execution, which would normally be available to the caller somehow
* through the step's {@link JobExecutionContext}.<br/>
* through the step's {@link ExecutionContext}.<br/>
*
* @throws JobInterruptedException if the step or a chunk is interrupted
* @throws RuntimeException if there is an exception during a chunk

View File

@@ -38,7 +38,7 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
/**
* {@link ItemHandler} that implements skip behavior. It delegates to
* {@link #itemSkipPolicy} to decide whether skip should be called or not.
* {@link #setItemSkipPolicy(ItemSkipPolicy)} to decide whether skip should be called or not.
*
* If exception is thrown while reading the item, skip is called on the
* {@link ItemReader}. If exception is thrown while writing the item, skip is

View File

@@ -76,7 +76,7 @@ public class SimpleItemHandler implements ItemHandler {
}
/**
* @return
* @return item
* @throws Exception
*/
protected final Object doRead() throws Exception {

View File

@@ -13,10 +13,10 @@ import org.springframework.batch.repeat.exception.SimpleLimitExceptionHandler;
/**
* Factory bean for step that provides options for configuring skip behavior.
* User can set {@link #skipLimit} to set how many exceptions of
* {@link #skippableExceptionClasses} types are tolerated.
* {@link #fatalExceptionClasses} will cause immediate termination of job - they
* are treated as higher priority than {@link #skippableExceptionClasses}, so
* User can set {@link #setSkipLimit(int)} to set how many exceptions of
* {@link #setSkippableExceptionClasses(Class[])} types are tolerated.
* {@link #setFatalExceptionClasses(Class[])} will cause immediate termination of job - they
* are treated as higher priority than {@link #setSkippableExceptionClasses(Class[])}, so
* the two lists don't need to be exclusive.
*
* @see SimpleStepFactoryBean
@@ -58,7 +58,7 @@ public class SkipLimitStepFactoryBean extends SimpleStepFactoryBean {
* but will result in transaction rollback and the item which handling
* caused the exception will be skipped.
*
* @param skippableExceptionClasses defaults to <code>Exception</code>
* @param exceptionClasses defaults to <code>Exception</code>
*/
public void setSkippableExceptionClasses(Class[] exceptionClasses) {
this.skippableExceptionClasses = exceptionClasses;
@@ -127,7 +127,7 @@ public class SkipLimitStepFactoryBean extends SimpleStepFactoryBean {
}
/**
* Uses the {@link #skipLimit} value to configure item handler and and
* Uses the {@link #setSkipLimit(int)} value to configure item handler and and
* exception handler.
*/
protected void applyConfiguration(ItemOrientedStep step) {
@@ -173,9 +173,6 @@ public class SkipLimitStepFactoryBean extends SimpleStepFactoryBean {
step.setItemHandler(itemHandler);
}
/**
* @return
*/
public void addFatalExceptionIfMissing(Class cls) {
List fatalExceptionList = new ArrayList(Arrays.asList(fatalExceptionClasses));
if (!fatalExceptionList.contains(cls)) {

View File

@@ -176,8 +176,8 @@ public class StatefulRetryStepFactoryBean extends SkipLimitStepFactoryBean {
/**
* @param itemReader
* @param itemWriter
* @param retryCallback
* @param retryTemplate
* @param itemKeyGenerator
* @param itemRecoverer
*/
public StatefulRetryItemHandler(ItemReader itemReader, ItemWriter itemWriter, RetryOperations retryTemplate,

View File

@@ -28,7 +28,7 @@ public class JobInstanceTests extends TestCase {
private JobInstance instance = new JobInstance(new Long(11), new JobParameters(), new JobSupport("job"));
/**
* Test method for {@link org.springframework.batch.core.JobInstance#getIdentifier()}.
* Test method for {@link org.springframework.batch.core.JobInstance#getJobName()}.
*/
public void testGetName() {
instance = new JobInstance(new Long(1), new JobParameters(), new JobSupport("foo"));

View File

@@ -30,9 +30,9 @@ public class AbstractJobTests extends TestCase {
JobSupport job = new JobSupport("job");
/**
* Test method for {@link org.springframework.batch.core.job.AbstractJob#JobConfiguration()}.
* Test method for {@link org.springframework.batch.core.job.AbstractJob#getName()}.
*/
public void testJobConfiguration() {
public void testGetName() {
job = new JobSupport();
assertNull(job.getName());
}
@@ -56,7 +56,7 @@ public class AbstractJobTests extends TestCase {
}
/**
* Test method for {@link org.springframework.batch.core.job.AbstractJob#setStepNames(java.util.List)}.
* Test method for {@link org.springframework.batch.core.job.AbstractJob#setSteps(java.util.List)}.
*/
public void testSetSteps() {
job.setSteps(Collections.singletonList(new StepSupport("step")));
@@ -65,7 +65,7 @@ public class AbstractJobTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.core.job.AbstractJob#addStepName(org.springframework.batch.core.configuration.StepConfiguration)}.
* {@link org.springframework.batch.core.job.AbstractJob#addStep(org.springframework.batch.core.Step)}.
*/
public void testAddStep() {
job.addStep(new StepSupport("step"));
@@ -73,7 +73,7 @@ public class AbstractJobTests extends TestCase {
}
/**
* Test method for {@link org.springframework.batch.core.job.AbstractJob#setStartLimit(int)}.
* Test method for {@link org.springframework.batch.core.job.JobSupport#setStartLimit(int)}.
*/
public void testSetStartLimit() {
assertEquals(Integer.MAX_VALUE, job.getStartLimit());

View File

@@ -57,7 +57,7 @@ public class CompositeJobExecutionListenerTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.core.listener.CompositeExecutionJobListener#registerJobExecutionListener(org.springframework.batch.core.JobExecutionListener)}.
* {@link org.springframework.batch.core.listener.CompositeExecutionJobListener#register(org.springframework.batch.core.JobExecutionListener)}.
*/
public void testSetListener() {
listener.register(new JobExecutionListenerSupport() {

View File

@@ -59,7 +59,7 @@ public class CompositeStepExecutionListenerTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.core.listener.CompositeStepExecutionListener#registerJobExecutionListener(org.springframework.batch.core.StepExecutionListener)}.
* {@link org.springframework.batch.core.listener.CompositeStepExecutionListener#register(org.springframework.batch.core.StepExecutionListener)}.
*/
public void testSetListener() {
listener.register(new StepExecutionListenerSupport() {

View File

@@ -30,7 +30,7 @@ public class ThreadStepInterruptionPolicyTests extends TestCase {
private StepExecution context = new StepExecution(new StepSupport(), null);
/**
* Test method for {@link org.springframework.batch.core.executor.interrupt.ThreadStepInterruptionPolicy#checkInterrupted(StepExecution)}.
* Test method for {@link org.springframework.batch.core.step.ThreadStepInterruptionPolicy#checkInterrupted(StepExecution)}.
* @throws Exception
*/
public void testCheckInterruptedNotComplete() throws Exception {
@@ -39,7 +39,7 @@ public class ThreadStepInterruptionPolicyTests extends TestCase {
}
/**
* Test method for {@link org.springframework.batch.core.executor.interrupt.ThreadStepInterruptionPolicy#checkInterrupted(StepExecution)}.
* Test method for {@link org.springframework.batch.core.step.ThreadStepInterruptionPolicy#checkInterrupted(StepExecution)}.
* @throws Exception
*/
public void testCheckInterruptedComplete() throws Exception {

View File

@@ -315,7 +315,7 @@ public class SkipLimitStepFactoryBeanTests extends TestCase {
}
/**
* @param commaDelimitedListToSet
* @param failures commaDelimitedListToSet
*/
public SkipWriterStub(Collection failures) {
this.failures = failures;

View File

@@ -221,7 +221,6 @@ public class TaskletStepTests extends TestCase {
}
/**
* @param b
* @param error
*/
public StubTasklet(Throwable error) {