Remove first set of JavaDoc warnings

This commit is contained in:
Glenn Renfro
2017-08-28 14:10:46 -04:00
committed by Michael Minella
parent 834920f8f6
commit 9fc6ba149b
47 changed files with 357 additions and 77 deletions

View File

@@ -58,7 +58,9 @@ public class ExecutionContext implements Serializable {
}
/**
* @param executionContext
* Initializes a new execution context with the contents of another executionContext.
*
* @param executionContext containing the entries to be copied to this current context.
*/
public ExecutionContext(ExecutionContext executionContext) {
this();
@@ -325,6 +327,9 @@ public class ExecutionContext implements Serializable {
/**
* Removes the mapping for a key from this context if it is present.
*
* @param key {@link String} that identifies the entry to be removed from the context.
* @return the value that was removed from the context.
*
* @see java.util.Map#remove(Object)
*/
public Object remove(String key) {

View File

@@ -36,7 +36,8 @@ public interface ItemProcessor<I, O> {
* @param item to be processed
* @return potentially modified or new item for continued processing, null if processing of the
* provided item should not continue.
* @throws Exception
*
* @throws Exception thrown if exception occurs during processing.
*/
O process(I item) throws Exception;
}

View File

@@ -25,7 +25,7 @@ package org.springframework.batch.item;
public class ItemStreamException extends RuntimeException {
/**
* @param message
* @param message the String that contains a detailed message.
*/
public ItemStreamException(String message) {
super(message);
@@ -35,6 +35,7 @@ public class ItemStreamException extends RuntimeException {
* Constructs a new instance with a message and nested exception.
*
* @param msg the exception message.
* @param nested the cause of the exception.
*
*/
public ItemStreamException(String msg, Throwable nested) {
@@ -43,6 +44,8 @@ public class ItemStreamException extends RuntimeException {
/**
* Constructs a new instance with a nested exception and empty message.
*
* @param nested the cause of the exception.
*/
public ItemStreamException(Throwable nested) {
super(nested);

View File

@@ -59,7 +59,8 @@ public abstract class KeyValueItemWriter<K, V> implements ItemWriter<V>, Initial
/**
* Set the {@link Converter} to use to derive the key from the item
* @param itemKeyMapper
*
* @param itemKeyMapper the {@link Converter} used to derive a key from an item.
*/
public void setItemKeyMapper(Converter<V, K> itemKeyMapper) {
this.itemKeyMapper = itemKeyMapper;
@@ -67,7 +68,9 @@ public abstract class KeyValueItemWriter<K, V> implements ItemWriter<V>, Initial
/**
* Sets the delete flag to have the item writer perform deletes
* @param delete
*
* @param delete if true {@link ItemWriter} will perform deletes,
* if False not to perform deletes.
*/
public void setDelete(boolean delete) {
this.delete = delete;

View File

@@ -50,9 +50,10 @@ public abstract class AbstractMethodInvokingDelegator<T> implements Initializing
/**
* Invoker the target method with arguments set by
* {@link #setArguments(Object[])}.
*
* @return object returned by invoked method
* @throws DynamicMethodInvocationException if the {@link MethodInvoker}
* used throws exception
*
* @throws Exception if the {@link MethodInvoker} used, throws an Exception.
*/
protected T invokeDelegateMethod() throws Exception {
MethodInvoker invoker = createMethodInvoker(targetObject, targetMethod);
@@ -62,10 +63,11 @@ public abstract class AbstractMethodInvokingDelegator<T> implements Initializing
/**
* Invokes the target method with given argument.
*
* @param object argument for the target method
* @return object returned by target method
* @throws DynamicMethodInvocationException if the {@link MethodInvoker}
* used throws exception
*
* @throws Exception if the {@link MethodInvoker} used throws exception
*/
protected T invokeDelegateMethodWithArgument(Object object) throws Exception {
MethodInvoker invoker = createMethodInvoker(targetObject, targetMethod);
@@ -75,10 +77,11 @@ public abstract class AbstractMethodInvokingDelegator<T> implements Initializing
/**
* Invokes the target method with given arguments.
*
* @param args arguments for the invoked method
* @return object returned by invoked method
* @throws DynamicMethodInvocationException if the {@link MethodInvoker}
* used throws exception
*
* @throws Exception if the {@link MethodInvoker} used, throws an exception
*/
protected T invokeDelegateMethodWithArguments(Object[] args) throws Exception {
MethodInvoker invoker = createMethodInvoker(targetObject, targetMethod);

View File

@@ -66,7 +66,7 @@ public class RepositoryItemWriter<T> implements ItemWriter<T>, InitializingBean
* Specifies what method on the repository to call. This method must have the type of
* object passed to this writer as the <em>sole</em> argument.
*
* @param methodName
* @param methodName {@link String} containing the method name.
*/
public void setMethodName(String methodName) {
this.methodName = methodName;
@@ -99,6 +99,8 @@ public class RepositoryItemWriter<T> implements ItemWriter<T>, InitializingBean
* a subclass if necessary.
*
* @param items the list of items to be persisted.
*
* @throws Exception thrown if error occurs during writing.
*/
protected void doWrite(List<? extends T> items) throws Exception {
if (logger.isDebugEnabled()) {

View File

@@ -222,8 +222,9 @@ public class HibernateCursorItemReaderBuilder<T> {
/**
* Used to configure a {@link HibernateNativeQueryProvider}. This is ignored if
* @param nativeQuery
* @return
*
* @param nativeQuery {@link String} containing the native query.
* @return this instance for method chaining
*/
public HibernateCursorItemReaderBuilder<T> nativeQuery(String nativeQuery) {
this.nativeQuery = nativeQuery;

View File

@@ -183,8 +183,9 @@ public class JpaPagingItemReaderBuilder<T> {
* The {@link EntityManagerFactory} to be used for executing the configured
* {@link #queryString}.
*
* @param entityManagerFactory
* @return
* @param entityManagerFactory {@link EntityManagerFactory} used to create
* {@link javax.persistence.EntityManager}
* @return this instance for method chaining
*/
public JpaPagingItemReaderBuilder<T> entityManagerFactory(EntityManagerFactory entityManagerFactory) {
this.entityManagerFactory = entityManagerFactory;

View File

@@ -42,7 +42,7 @@ public interface JpaQueryProvider {
/**
* Provide an {@link EntityManager} for the query to be built.
*
* @param entityManager
* @param entityManager to be used by the JpQueryProvider.
*/
void setEntityManager(EntityManager entityManager);

View File

@@ -41,11 +41,16 @@ public interface DataFieldMaxValueIncrementerFactory {
/**
* Returns boolean indicated whether or not the provided string is supported by this
* factory.
*
* @param databaseType {@link String} containing the database type.
* @return true if the incrementerType is supported by this database type. Else false is returned.
*/
public boolean isSupportedIncrementerType(String databaseType);
/**
* Returns the list of supported database incrementer types
*
* @return an array of {@link String}s containing the supported incrementer types.
*/
public String[] getSupportedIncrementerTypes();
}

View File

@@ -61,6 +61,7 @@ PreparedStatementSetter, InitializingBean {
* It is assumed that their order in the List is the order of the parameters
* in the PreparedStatement.
*
* @param parameters list containing the parameter values to be used.
* @deprecated In favor of the constructor
*/
@Deprecated

View File

@@ -156,6 +156,7 @@ public class SqlPagingQueryUtils {
*
* @param provider {@link AbstractSqlPagingQueryProvider} providing the
* implementation specifics
* @param selectClause {@link String} containing the select portion of the query.
* @param remainingPageQuery is this query for the remaining pages (true) as
* opposed to the first page (false)
* @param rowNumClause the implementation specific row num clause to be used
@@ -242,7 +243,8 @@ public class SqlPagingQueryUtils {
/**
* Generates ORDER BY attributes based on the sort keys.
*
* @param provider
* @param provider the {@link AbstractSqlPagingQueryProvider} to be used for
* used for pagination.
* @return a String that can be appended to an ORDER BY clause.
*/
public static String buildSortClause(AbstractSqlPagingQueryProvider provider) {
@@ -252,7 +254,8 @@ public class SqlPagingQueryUtils {
/**
* Generates ORDER BY attributes based on the sort keys.
*
* @param sortKeys
* @param sortKeys {@link Map} where the key is the name of the column to be
* sorted and the value contains the {@link Order}.
* @return a String that can be appended to an ORDER BY clause.
*/
public static String buildSortClause(Map<String, Order> sortKeys) {
@@ -280,8 +283,10 @@ public class SqlPagingQueryUtils {
/**
* Appends the where conditions required to query for the subsequent pages.
*
* @param provider
* @param sql
* @param provider the {@link AbstractSqlPagingQueryProvider} to be used for
* pagination.
* @param sql {@link StringBuilder} containing the sql to be used for the
* query.
*/
public static void buildSortConditions(
AbstractSqlPagingQueryProvider provider, StringBuilder sql) {

View File

@@ -29,6 +29,10 @@ public interface FlatFileFooterCallback {
/**
* Write contents to a file using the supplied {@link Writer}. It is not
* required to flush the writer inside this method.
*
* @param writer the {@link Writer} to be used to write the footer.
*
* @throws IOException if error occurs during writing.
*/
void writeFooter(Writer writer) throws IOException;
}

View File

@@ -29,6 +29,10 @@ public interface FlatFileHeaderCallback {
/**
* Write contents to a file using the supplied {@link Writer}. It is not
* required to flush the writer inside this method.
*
* @param writer the {@link Writer} to be used to write the header.
*
* @throws IOException if error occurs during writing.
*/
void writeHeader(Writer writer) throws IOException;
}

View File

@@ -161,6 +161,9 @@ InitializingBean {
/**
* Sets encoding for output template.
*
* @param newEncoding {@link String} containing the encoding to be used for
* the writer.
*/
public void setEncoding(String newEncoding) {
this.encoding = newEncoding;
@@ -217,6 +220,10 @@ InitializingBean {
/**
* headerCallback will be called before writing the first item to file.
* Newline will be automatically appended after the header is written.
*
* @param headerCallback {@link FlatFileHeaderCallback} to be used after
* header is written.
*
*/
public void setHeaderCallback(FlatFileHeaderCallback headerCallback) {
this.headerCallback = headerCallback;
@@ -225,6 +232,10 @@ InitializingBean {
/**
* footerCallback will be called after writing the last item to file, but
* before the file is closed.
*
* @param footerCallback {@link FlatFileFooterCallback} to be used after
* footer is written.
*
*/
public void setFooterCallback(FlatFileFooterCallback footerCallback) {
this.footerCallback = footerCallback;
@@ -233,6 +244,9 @@ InitializingBean {
/**
* Flag to indicate that writing to the buffer should be delayed if a
* transaction is active. Defaults to true.
*
* @param transactional true if writing to buffer should be delayed.
*
*/
public void setTransactional(boolean transactional) {
this.transactional = transactional;

View File

@@ -91,6 +91,8 @@ public class MultiResourceItemWriter<T> extends AbstractItemStreamItemWriter<T>
/**
* Allows customization of the suffix of the created resources based on the
* index.
*
* @param suffixCreator {@link ResourceSuffixCreator} to be used by the writer.
*/
public void setResourceSuffixCreator(ResourceSuffixCreator suffixCreator) {
this.suffixCreator = suffixCreator;
@@ -99,6 +101,9 @@ public class MultiResourceItemWriter<T> extends AbstractItemStreamItemWriter<T>
/**
* After this limit is exceeded the next chunk will be written into newly
* created resource.
*
* @param itemCountLimitPerResource int containing the limit to determine
* when the next chunk will be written to a newly created resource.
*/
public void setItemCountLimitPerResource(int itemCountLimitPerResource) {
this.itemCountLimitPerResource = itemCountLimitPerResource;
@@ -106,6 +111,9 @@ public class MultiResourceItemWriter<T> extends AbstractItemStreamItemWriter<T>
/**
* Delegate used for actual writing of the output.
*
* @param delegate {@link ResourceAwareItemWriterItemStream} that will be used
* to write the output.
*/
public void setDelegate(ResourceAwareItemWriterItemStream<? super T> delegate) {
this.delegate = delegate;
@@ -116,11 +124,20 @@ public class MultiResourceItemWriter<T> extends AbstractItemStreamItemWriter<T>
* the same directory and use the same name as this prototype with appended
* suffix (according to
* {@link #setResourceSuffixCreator(ResourceSuffixCreator)}.
*
* @param resource The prototype resource.
*/
public void setResource(Resource resource) {
this.resource = resource;
}
/**
* Establishes that state of each resource is saved to the context when
* update is called.
*
* @param saveState true the state is saved.
*/
public void setSaveState(boolean saveState) {
this.saveState = saveState;
}

View File

@@ -44,7 +44,7 @@ public class SimpleBinaryBufferedReaderFactory implements BufferedReaderFactory
private String lineEnding = DEFAULT_LINE_ENDING;
/**
* @param lineEnding
* @param lineEnding {@link String} contains the line ending to use.
*/
public void setLineEnding(String lineEnding) {
this.lineEnding = lineEnding;

View File

@@ -23,7 +23,7 @@ package org.springframework.batch.item.file.transform;
public class ConversionException extends RuntimeException {
/**
* @param msg
* @param msg the detail message.
*/
public ConversionException(String msg) {
super(msg);

View File

@@ -649,6 +649,8 @@ public class DefaultFieldSet implements FieldSet {
/**
* Read and trim the {@link String} value at '<code>index</code>'.
*
* @param index the offset in the token array to obtain the value to be trimmed.
*
* @return null if the field value is <code>null</code>.
*/
@@ -664,9 +666,12 @@ public class DefaultFieldSet implements FieldSet {
}
/**
* Read and trim the {@link String} value from column with given '
* <code>name</code>.
*
* Retrieve the index of where a specified column is located based on the
* name parameter.
*
* @param name the value to search in the {@link List} of names.
* @return the index in the {@link List} of names where the name was found.
*
* @throws IllegalArgumentException if a column with given name is not
* defined.
*/

View File

@@ -24,7 +24,7 @@ package org.springframework.batch.item.file.transform;
public interface FieldExtractor<T> {
/**
* @param item
* @param item the object that contains the the information to be extracted.
* @return an array containing item's parts
*/
Object[] extract(T item);

View File

@@ -57,6 +57,8 @@ public interface FieldSet {
* Read the {@link String} value at index '<code>index</code>'.
*
* @param index the field index.
* @return {@link String} containing the value at the index.
*
* @throws IndexOutOfBoundsException if the index is out of bounds.
*/
String readString(int index);
@@ -65,6 +67,7 @@ public interface FieldSet {
* Read the {@link String} value from column with given '<code>name</code>'.
*
* @param name the field name.
* @return {@link String} containing the value from the specified name.
*/
String readString(String name);
@@ -73,6 +76,8 @@ public interface FieldSet {
* trailing whitespace (don't trim).
*
* @param index the field index.
* @return {@link String} containing the value from the specified index.
*
* @throws IndexOutOfBoundsException if the index is out of bounds.
*/
String readRawString(int index);
@@ -82,6 +87,7 @@ public interface FieldSet {
* including trailing whitespace (don't trim).
*
* @param name the field name.
* @return {@link String} containing the value from the specified name.
*/
String readRawString(String name);
@@ -89,6 +95,8 @@ public interface FieldSet {
* Read the '<code>boolean</code>' value at index '<code>index</code>'.
*
* @param index the field index.
* @return boolean containing the value from the specified index.
*
* @throws IndexOutOfBoundsException if the index is out of bounds.
*/
boolean readBoolean(int index);
@@ -97,6 +105,8 @@ public interface FieldSet {
* Read the '<code>boolean</code>' value from column with given '<code>name</code>'.
*
* @param name the field name.
* @return boolean containing the value from the specified name.
*
* @throws IllegalArgumentException if a column with given name is not
* defined.
*/
@@ -108,6 +118,8 @@ public interface FieldSet {
* @param index the field index.
* @param trueValue the value that signifies {@link Boolean#TRUE true};
* case-sensitive.
* @return boolean containing the value from the specified index.
*
* @throws IndexOutOfBoundsException if the index is out of bounds, or if
* the supplied <code>trueValue</code> is <code>null</code>.
*/
@@ -119,6 +131,8 @@ public interface FieldSet {
* @param name the field name.
* @param trueValue the value that signifies {@link Boolean#TRUE true};
* case-sensitive.
* @return boolean containing the value from the specified name.
*
* @throws IllegalArgumentException if a column with given name is not
* defined, or if the supplied <code>trueValue</code> is <code>null</code>.
*/
@@ -128,6 +142,8 @@ public interface FieldSet {
* Read the '<code>char</code>' value at index '<code>index</code>'.
*
* @param index the field index.
* @return char containing the value from the specified index.
*
* @throws IndexOutOfBoundsException if the index is out of bounds.
*/
char readChar(int index);
@@ -136,6 +152,8 @@ public interface FieldSet {
* Read the '<code>char</code>' value from column with given '<code>name</code>'.
*
* @param name the field name.
* @return char containing the value from the specified name.
*
* @throws IllegalArgumentException if a column with given name is not
* defined.
*/
@@ -145,6 +163,8 @@ public interface FieldSet {
* Read the '<code>byte</code>' value at index '<code>index</code>'.
*
* @param index the field index.
* @return byte containing the value from the specified index.
*
* @throws IndexOutOfBoundsException if the index is out of bounds.
*/
byte readByte(int index);
@@ -152,7 +172,8 @@ public interface FieldSet {
/**
* Read the '<code>byte</code>' value from column with given '<code>name</code>'.
*
* @param name the field name.
* @param name the field name.*
* @return byte containing the value from the specified name.
*/
byte readByte(String name);
@@ -160,6 +181,8 @@ public interface FieldSet {
* Read the '<code>short</code>' value at index '<code>index</code>'.
*
* @param index the field index.
* @return short containing the value from the specified index.
*
* @throws IndexOutOfBoundsException if the index is out of bounds.
*/
short readShort(int index);
@@ -168,6 +191,8 @@ public interface FieldSet {
* Read the '<code>short</code>' value from column with given '<code>name</code>'.
*
* @param name the field name.
* @return short containing the value from the specified name.
*
* @throws IllegalArgumentException if a column with given name is not
* defined.
*/
@@ -177,6 +202,8 @@ public interface FieldSet {
* Read the '<code>int</code>' value at index '<code>index</code>'.
*
* @param index the field index.
* @return int containing the value from the specified index.
*
* @throws IndexOutOfBoundsException if the index is out of bounds.
*/
int readInt(int index);
@@ -185,6 +212,8 @@ public interface FieldSet {
* Read the '<code>int</code>' value from column with given '<code>name</code>'.
*
* @param name the field name.
* @return int containing the value from the specified name.
*
* @throws IllegalArgumentException if a column with given name is not
* defined.
*/
@@ -196,6 +225,9 @@ public interface FieldSet {
* blank.
*
* @param index the field index.
* @param defaultValue the value to use if the field value is blank.
* @return int containing the value from the specified index.
*
* @throws IndexOutOfBoundsException if the index is out of bounds.
*/
int readInt(int index, int defaultValue);
@@ -206,6 +238,9 @@ public interface FieldSet {
* blank.
*
* @param name the field name.
* @param defaultValue the value to use if the field value is blank.
* @return int containing the value from the specified name.
*
* @throws IllegalArgumentException if a column with given name is not
* defined.
*/
@@ -215,6 +250,8 @@ public interface FieldSet {
* Read the '<code>long</code>' value at index '<code>index</code>'.
*
* @param index the field index.
* @return long containing the value from the specified index.
*
* @throws IndexOutOfBoundsException if the index is out of bounds.
*/
long readLong(int index);
@@ -223,6 +260,8 @@ public interface FieldSet {
* Read the '<code>long</code>' value from column with given '<code>name</code>'.
*
* @param name the field name.
* @return long containing the value from the specified name.
*
* @throws IllegalArgumentException if a column with given name is not
* defined.
*/
@@ -234,6 +273,9 @@ public interface FieldSet {
* blank.
*
* @param index the field index.
* @param defaultValue the value to use if the field value is blank.
* @return long containing the value from the specified index.
*
* @throws IndexOutOfBoundsException if the index is out of bounds.
*/
long readLong(int index, long defaultValue);
@@ -244,6 +286,9 @@ public interface FieldSet {
* blank.
*
* @param name the field name.
* @param defaultValue the value to use if the field value is blank.
* @return long containing the value from the specified name.
*
* @throws IllegalArgumentException if a column with given name is not
* defined.
*/
@@ -253,6 +298,8 @@ public interface FieldSet {
* Read the '<code>float</code>' value at index '<code>index</code>'.
*
* @param index the field index.
* @return float containing the value from the specified index.
*
* @throws IndexOutOfBoundsException if the index is out of bounds.
*/
float readFloat(int index);
@@ -261,6 +308,8 @@ public interface FieldSet {
* Read the '<code>float</code>' value from column with given '<code>name</code>.
*
* @param name the field name.
* @return float containing the value from the specified name.
*
* @throws IllegalArgumentException if a column with given name is not
* defined.
*/
@@ -270,6 +319,8 @@ public interface FieldSet {
* Read the '<code>double</code>' value at index '<code>index</code>'.
*
* @param index the field index.
* @return double containing the value from the specified index.
*
* @throws IndexOutOfBoundsException if the index is out of bounds.
*/
double readDouble(int index);
@@ -278,6 +329,8 @@ public interface FieldSet {
* Read the '<code>double</code>' value from column with given '<code>name</code>.
*
* @param name the field name.
* @return double containing the value from the specified name.
*
* @throws IllegalArgumentException if a column with given name is not
* defined.
*/
@@ -287,6 +340,8 @@ public interface FieldSet {
* Read the {@link java.math.BigDecimal} value at index '<code>index</code>'.
*
* @param index the field index.
* @return {@link BigDecimal} containing the value from the specified index.
*
* @throws IndexOutOfBoundsException if the index is out of bounds.
*/
BigDecimal readBigDecimal(int index);
@@ -295,6 +350,8 @@ public interface FieldSet {
* Read the {@link java.math.BigDecimal} value from column with given '<code>name</code>.
*
* @param name the field name.
* @return {@link BigDecimal} containing the value from the specified name.
*
* @throws IllegalArgumentException if a column with given name is not
* defined.
*/
@@ -306,6 +363,9 @@ public interface FieldSet {
* value at index '<code>index</code>' is blank.
*
* @param index the field index.
* @param defaultValue the value to use if the field value is blank.
* @return {@link BigDecimal} containing the value from the specified index.
*
* @throws IndexOutOfBoundsException if the index is out of bounds.
*/
BigDecimal readBigDecimal(int index, BigDecimal defaultValue);
@@ -317,6 +377,8 @@ public interface FieldSet {
*
* @param name the field name.
* @param defaultValue the default value to use if the field is blank
* @return {@link BigDecimal} containing the value from the specified name.
*
* @throws IllegalArgumentException if a column with given name is not
* defined.
*/
@@ -327,6 +389,8 @@ public interface FieldSet {
* designated column <code>index</code>.
*
* @param index the field index.
* @return {@link Date} containing the value from the specified index.
*
* @throws IndexOutOfBoundsException if the index is out of bounds.
* @throws IllegalArgumentException if the value is not parseable
* @throws NullPointerException if the value is empty
@@ -338,6 +402,8 @@ public interface FieldSet {
* with given <code>name</code>.
*
* @param name the field name.
* @return {@link Date} containing the value from the specified name.
*
* @throws IllegalArgumentException if a column with given name is not
* defined or if the value is not parseable
* @throws NullPointerException if the value is empty
@@ -350,6 +416,8 @@ public interface FieldSet {
*
* @param index the field index.
* @param defaultValue the default value to use if the field is blank
* @return {@link Date} containing the value from the specified index.
*
* @throws IndexOutOfBoundsException if the index is out of bounds.
* @throws IllegalArgumentException if the value is not parseable
* @throws NullPointerException if the value is empty
@@ -362,6 +430,8 @@ public interface FieldSet {
*
* @param name the field name.
* @param defaultValue the default value to use if the field is blank
* @return {@link Date} containing the value from the specified name.
*
* @throws IllegalArgumentException if a column with given name is not
* defined.
*/
@@ -373,6 +443,8 @@ public interface FieldSet {
*
* @param index the field index.
* @param pattern the pattern describing the date and time format
* @return {@link Date} containing the value from the specified index.
*
* @throws IndexOutOfBoundsException if the index is out of bounds.
* @throws IllegalArgumentException if the date cannot be parsed.
*
@@ -385,6 +457,8 @@ public interface FieldSet {
*
* @param name the field name.
* @param pattern the pattern describing the date and time format
* @return {@link Date} containing the value from the specified name.
*
* @throws IllegalArgumentException if a column with given name is not
* defined or if the specified field cannot be parsed
*
@@ -398,6 +472,8 @@ public interface FieldSet {
* @param index the field index.
* @param pattern the pattern describing the date and time format
* @param defaultValue the default value to use if the field is blank
* @return {@link Date} containing the value from the specified index.
*
* @throws IndexOutOfBoundsException if the index is out of bounds.
* @throws IllegalArgumentException if the date cannot be parsed.
*
@@ -411,6 +487,8 @@ public interface FieldSet {
* @param name the field name.
* @param pattern the pattern describing the date and time format
* @param defaultValue the default value to use if the field is blank
* @return {@link Date} containing the value from the specified name.
*
* @throws IllegalArgumentException if a column with given name is not
* defined or if the specified field cannot be parsed
*
@@ -419,6 +497,8 @@ public interface FieldSet {
/**
* Return the number of fields in this '<code>FieldSet</code>'.
*
* @return int containing the number of fields in this field set.
*/
int getFieldCount();

View File

@@ -26,8 +26,11 @@ public interface FieldSetFactory {
/**
* Create a FieldSet with named tokens. The token values can then be
* retrieved either by name or by column number.
*
* @param values the token values
* @param names the names of the tokens
* @return an instance of {@link FieldSet}.
*
* @see DefaultFieldSet#readString(String)
*/
FieldSet create(String[] values, String[] names);
@@ -35,7 +38,10 @@ public interface FieldSetFactory {
/**
* Create a FieldSet with anonymous tokens. They can only be retrieved by
* column number.
*
* @param values the token values
* @return an instance of {@link FieldSet}.
*
* @see FieldSet#readString(int)
*/
FieldSet create(String[] values);

View File

@@ -34,6 +34,8 @@ public class FlatFileFormatException extends RuntimeException {
* Create a new {@link FlatFileFormatException} based on a message.
*
* @param message the message for this exception
* @param input {@link String} containing the input for that caused this
* exception to be thrown.
*/
public FlatFileFormatException(String message, String input) {
super(message);
@@ -58,5 +60,10 @@ public class FlatFileFormatException extends RuntimeException {
super(message, cause);
}
/**
* Retrieve the input that caused this exception.
*
* @return String containing the input.
*/
public String getInput() { return input; }
}

View File

@@ -60,7 +60,9 @@ public class FormatterLineAggregator<T> extends ExtractorLineAggregator<T> {
/**
* Set the format string used to aggregate items.
*
*
* @param format {@link String} containing the format to use.
*
* @see Formatter
*/
public void setFormat(String format) {

View File

@@ -30,6 +30,12 @@ public class IncorrectLineLengthException extends FlatFileFormatException {
private int expectedLength;
/**
* @param message the message for this exception.
* @param expectedLength int containing the length that was expected.
* @param actualLength int containing the actual length.
* @param input the {@link String} that contained the contents that caused
* the exception to be thrown.
*
* @since 2.2.6
*/
public IncorrectLineLengthException(String message, int expectedLength, int actualLength, String input) {
@@ -38,6 +44,11 @@ public class IncorrectLineLengthException extends FlatFileFormatException {
this.actualLength = actualLength;
}
/**
* @param message the message for this exception.
* @param expectedLength int containing the length that was expected.
* @param actualLength int containing the actual length.
*/
public IncorrectLineLengthException(String message, int expectedLength, int actualLength) {
super(message);
this.expectedLength = expectedLength;
@@ -45,6 +56,11 @@ public class IncorrectLineLengthException extends FlatFileFormatException {
}
/**
* @param expectedLength int containing the length that was expected.
* @param actualLength int containing the actual length.
* @param input the {@link String} that contained the contents that caused
* the exception to be thrown.
* @since 2.2.6
*/
public IncorrectLineLengthException(int expectedLength, int actualLength, String input) {
@@ -53,16 +69,30 @@ public class IncorrectLineLengthException extends FlatFileFormatException {
this.expectedLength = expectedLength;
}
/**
* @param expectedLength int containing the length that was expected.
* @param actualLength int containing the actual length.
*/
public IncorrectLineLengthException(int expectedLength, int actualLength) {
super("Incorrect line length in record: expected " + expectedLength + " actual " + actualLength);
this.actualLength = actualLength;
this.expectedLength = expectedLength;
}
/**
* Retrieves the actual length that was recorded for this exception.
*
* @return int containing the actual length.
*/
public int getActualLength() {
return actualLength;
}
/**
* Retrieves the expected length that was recorded for this exception.
*
* @return int containing the expected length.
*/
public int getExpectedLength() {
return expectedLength;
}

View File

@@ -55,7 +55,7 @@ public class RangeArrayPropertyEditor extends PropertyEditorSupport {
* Set force disjoint ranges. If set to TRUE, ranges are validated to be disjoint.
* For example: defining ranges '1-10, 5-15' will cause IllegalArgumentException in
* case of forceDisjointRanges=TRUE.
* @param forceDisjointRanges
* @param forceDisjointRanges true to force disjoint ranges.
*/
public void setForceDisjointRanges(boolean forceDisjointRanges) {
this.forceDisjointRanges = forceDisjointRanges;

View File

@@ -163,7 +163,9 @@ public class MappingLdifReaderBuilder<T> {
/**
* Setter for object mapper. This property is required to be set.
*
* @param recordMapper maps record to an object
* @return this instance for method chaining.
*/
public MappingLdifReaderBuilder<T> recordMapper(RecordMapper<T> recordMapper) {
this.recordMapper = recordMapper;

View File

@@ -63,7 +63,7 @@ public class SimpleMailMessageItemWriter implements ItemWriter<SimpleMailMessage
/**
* A {@link MailSender} to be used to send messages in {@link #write(List)}.
*
* @param mailSender
* @param mailSender The {@link MailSender} to be used.
*/
public void setMailSender(MailSender mailSender) {
this.mailSender = mailSender;

View File

@@ -34,18 +34,19 @@ public class CompositeItemStream implements ItemStream {
private List<ItemStream> streams = new ArrayList<ItemStream>();
/**
* Public setter for the listeners.
* Public setter for the streams.
*
* @param listeners
* @param streams array of {@link ItemStream}.
*/
public void setStreams(ItemStream[] listeners) {
this.streams = Arrays.asList(listeners);
public void setStreams(ItemStream[] streams) {
this.streams = Arrays.asList(streams);
}
/**
* Register a {@link ItemStream} as one of the interesting providers under
* the provided key.
*
*
* @param stream an instance of {@link ItemStream} to be added to the list of streams.
*/
public void register(ItemStream stream) {
synchronized (streams) {
@@ -77,7 +78,10 @@ public class CompositeItemStream implements ItemStream {
/**
* Broadcast the call to close.
* @throws ItemStreamException
* @throws ItemStreamException thrown if one of the {@link ItemStream}s in
* the list fails to close. This is a sequential operation so all itemStreams
* in the list after the one that failed to close will remain open.
*/
@Override
public void close() throws ItemStreamException {
@@ -88,7 +92,10 @@ public class CompositeItemStream implements ItemStream {
/**
* Broadcast the call to open.
* @throws ItemStreamException
*
* @throws ItemStreamException thrown if one of the {@link ItemStream}s in
* the list fails to open. This is a sequential operation so all itemStreams
* in the list after the one that failed to open will not be opened.
*/
@Override
public void open(ExecutionContext executionContext) throws ItemStreamException {

View File

@@ -82,7 +82,7 @@ public class ScriptItemProcessor<I, O> implements ItemProcessor<I, O>, Initializ
* </p>
*
* @param scriptSource the {@link String} form of the script source code to use.
* @param language the language of the script as returned by the {@link javax.script.ScriptEngineFactory}
* @param language the language of the script.
*/
public void setScriptSource(String scriptSource, String language) {
Assert.hasText(language, "Language must contain the script language");

View File

@@ -54,10 +54,13 @@ public class ExecutionContextUserSupport {
/**
* Prefix the argument with {@link #getName()} to create a unique key that can be safely used to identify data
* stored in {@link ExecutionContext}.
*
* @param suffix {@link String} to be used to generate the key.
* @return the key that was generated based on the name and the suffix.
*/
public String getKey(String s) {
public String getKey(String suffix) {
Assert.hasText(name, "Name must be assigned for the sake of defining the execution context keys prefix.");
return name + "." + s;
return name + "." + suffix;
}
}

View File

@@ -95,6 +95,20 @@ public final class FileUtils {
}
/**
* Set up output file for batch processing. This method implements common logic for handling output files when
* starting or restarting file I/O. When starting output file processing, creates/overwrites new file. When
* restarting output file processing, checks whether file is writable.
*
* @param file file to be set up
* @param restarted true signals that we are restarting output file processing
* @param overwriteOutputFile If set to true, output file will be overwritten (this flag is ignored when processing
* is restart)
*
* @throws IllegalArgumentException when file is null
* @throws ItemStreamException when starting output file processing, file exists and flag "overwriteOutputFile" is
* set to false
* @throws ItemStreamException when unable to create file or file is not writable
*
* @deprecated use the version with explicit append parameter instead. Here append=false is assumed.
*/
@Deprecated
@@ -106,6 +120,10 @@ public final class FileUtils {
* Create a new file if it doesn't already exist.
*
* @param file the file to create on the filesystem
* @return true if file was created else false.
*
* @throws IOException is thrown if error occurs during creation and file
* does not exist.
*/
public static boolean createNewFile(File file) throws IOException {

View File

@@ -43,6 +43,8 @@ public class ValidatingItemProcessor<T> implements ItemProcessor<T, T>, Initiali
/**
* Creates a ValidatingItemProcessor based on the given Validator.
*
* @param validator the {@link Validator} instance to be used.
*/
public ValidatingItemProcessor(Validator<? super T> validator) {
this.validator = validator;
@@ -51,7 +53,7 @@ public class ValidatingItemProcessor<T> implements ItemProcessor<T, T>, Initiali
/**
* Set the validator used to validate each item.
*
* @param validator
* @param validator the {@link Validator} instance to be used.
*/
public void setValidator(Validator<? super T> validator) {
this.validator = validator;
@@ -60,7 +62,8 @@ public class ValidatingItemProcessor<T> implements ItemProcessor<T, T>, Initiali
/**
* Should the processor filter invalid records instead of skipping them?
*
* @param filter
* @param filter true if filter is to return null or false if filter is to
* throw a {@link ValidationException}.
*/
public void setFilter(boolean filter) {
this.filter = filter;

View File

@@ -139,6 +139,8 @@ ResourceAwareItemReaderItemStream<T>, InitializingBean {
*
* This implementation simply looks for the next corresponding element, it does not care about element nesting. You
* will need to override this method to correctly handle composite fragments.
*
* @param reader the {@link XMLEventReader} to be used to find next fragment.
*
* @return <code>true</code> if next fragment was found, <code>false</code> otherwise.
*

View File

@@ -184,6 +184,8 @@ ResourceAwareItemWriterItemStream<T>, InitializingBean {
/**
* headerCallback is called before writing any items.
*
* @param headerCallback the {@link StaxWriterCallback} to be called prior to writing items.
*/
public void setHeaderCallback(StaxWriterCallback headerCallback) {
this.headerCallback = headerCallback;
@@ -191,7 +193,9 @@ ResourceAwareItemWriterItemStream<T>, InitializingBean {
/**
* footerCallback is called after writing all items but before closing the
* file
* file.
*
*@param footerCallback the {@link StaxWriterCallback} to be called after writing items.
*/
public void setFooterCallback(StaxWriterCallback footerCallback) {
this.footerCallback = footerCallback;
@@ -250,7 +254,7 @@ ResourceAwareItemWriterItemStream<T>, InitializingBean {
/**
* Get XML version.
*
*
* @return the XML version used
*/
public String getVersion() {
@@ -336,7 +340,8 @@ ResourceAwareItemWriterItemStream<T>, InitializingBean {
* Set "overwrite" flag for the output file. Flag is ignored when output
* file processing is restarted.
*
* @param overwriteOutput
* @param overwriteOutput If set to true, output file will be overwritten
* (this flag is ignored when processing is restart).
*/
public void setOverwriteOutput(boolean overwriteOutput) {
this.overwriteOutput = overwriteOutput;
@@ -347,7 +352,7 @@ ResourceAwareItemWriterItemStream<T>, InitializingBean {
}
/**
* @throws Exception
* @throws Exception thrown if error occurs
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
*/
@Override
@@ -365,6 +370,8 @@ ResourceAwareItemWriterItemStream<T>, InitializingBean {
/**
* Open the output source
*
* @param executionContext the batch context.
*
* @see org.springframework.batch.item.ItemStream#open(ExecutionContext)
*/
@@ -499,10 +506,13 @@ ResourceAwareItemWriterItemStream<T>, InitializingBean {
/**
* Subclasses can override to customize the writer.
* @param outputFactory
* @param writer
*
* @param outputFactory the factory to be used to create an {@link XMLEventWriter}.
* @param writer the {@link Writer} to be used by the {@link XMLEventWriter} for
* writing to character streams.
* @return an xml writer
* @throws XMLStreamException
*
* @throws XMLStreamException thrown if error occured creating {@link XMLEventWriter}.
*/
protected XMLEventWriter createXmlEventWriter(XMLOutputFactory outputFactory, Writer writer)
throws XMLStreamException {
@@ -511,8 +521,10 @@ ResourceAwareItemWriterItemStream<T>, InitializingBean {
/**
* Subclasses can override to customize the factory.
*
* @return a factory for the xml output
* @throws FactoryConfigurationError
*
* @throws FactoryConfigurationError throw if an instance of this factory cannot be loaded.
*/
protected XMLOutputFactory createXmlOutputFactory() throws FactoryConfigurationError {
return XMLOutputFactory.newInstance();
@@ -520,8 +532,10 @@ ResourceAwareItemWriterItemStream<T>, InitializingBean {
/**
* Subclasses can override to customize the event factory.
*
* @return a factory for the xml events
* @throws FactoryConfigurationError
*
* @throws FactoryConfigurationError thrown if an instance of this factory cannot be loaded.
*/
protected XMLEventFactory createXmlEventFactory() throws FactoryConfigurationError {
XMLEventFactory factory = XMLEventFactory.newInstance();
@@ -530,8 +544,10 @@ ResourceAwareItemWriterItemStream<T>, InitializingBean {
/**
* Subclasses can override to customize the STAX result.
*
* @return a result for writing to
* @throws Exception
*
* @throws Exception thrown if an error occurs curing the creation of the result.
*/
protected Result createStaxResult() throws Exception {
return StaxUtils.getResult(eventWriter);
@@ -545,7 +561,9 @@ ResourceAwareItemWriterItemStream<T>, InitializingBean {
* </ul>
*
* @param writer XML event writer
* @throws XMLStreamException
*
* @throws XMLStreamException thrown if error occurs while setting the
* prefix or default name space.
*/
protected void initNamespaceContext(XMLEventWriter writer) throws XMLStreamException {
if (StringUtils.hasText(getRootTagNamespace())) {
@@ -582,7 +600,8 @@ ResourceAwareItemWriterItemStream<T>, InitializingBean {
* version and root tag name can be retrieved with corresponding getters.
*
* @param writer XML event writer
* @throws XMLStreamException
*
* @throws XMLStreamException thrown if error occurs.
*/
protected void startDocument(XMLEventWriter writer) throws XMLStreamException {
@@ -634,7 +653,8 @@ ResourceAwareItemWriterItemStream<T>, InitializingBean {
* Writes the EndDocument tag manually.
*
* @param writer XML event writer
* @throws XMLStreamException
*
* @throws XMLStreamException thrown if error occurs.
*/
protected void endDocument(XMLEventWriter writer) throws XMLStreamException {
@@ -732,8 +752,9 @@ ResourceAwareItemWriterItemStream<T>, InitializingBean {
* Write the value objects and flush them to the file.
*
* @param items the value object
* @throws IOException
* @throws XmlMappingException
*
* @throws Exception thrown if general error occurs.
* @throws XmlMappingException thrown if error occurs during XML Mapping.
*/
@Override
public void write(List<? extends T> items) throws XmlMappingException, Exception {
@@ -767,6 +788,8 @@ ResourceAwareItemWriterItemStream<T>, InitializingBean {
/**
* Get the restart data.
*
* @param executionContext the batch context.
*
* @see org.springframework.batch.item.ItemStream#update(ExecutionContext)
*/

View File

@@ -31,6 +31,10 @@ public interface StaxWriterCallback {
/**
* Write contents using the supplied {@link XMLEventWriter}. It is not
* required to flush the writer inside this method.
*
* @param writer the {@link XMLEventWriter} to be used to write the contents.
*
* @throws IOException thrown if an error occurs during writing.
*/
void write(XMLEventWriter writer) throws IOException;
}

View File

@@ -41,7 +41,7 @@ public class RepeatContextSupport extends SynchronizedAttributeAccessor implemen
* Constructor for {@link RepeatContextSupport}. The parent can be null, but
* should be set to the enclosing repeat context if there is one, e.g. if
* this context is an inner loop.
* @param parent
* @param parent {@link RepeatContext} to be used as the parent context.
*/
public RepeatContextSupport(RepeatContext parent) {
super();

View File

@@ -86,7 +86,8 @@ public class LogOrRethrowExceptionHandler implements ExceptionHandler {
* Classify the throwables and decide whether to rethrow based on the
* result. The context is not used.
*
* @throws Throwable
* @throws Throwable thrown if {@link LogOrRethrowExceptionHandler#exceptionClassifier}
* is classified as {@link Level#RETHROW}.
*
* @see ExceptionHandler#handleException(RepeatContext, Throwable)
*/

View File

@@ -85,7 +85,7 @@ public class RethrowOnThresholdExceptionHandler implements ExceptionHandler {
* result. The context is used to accumulate the number of exceptions of the
* same type according to the classifier.
*
* @throws Throwable
* @throws Throwable is thrown if number of exceptions exceeds threshold.
* @see ExceptionHandler#handleException(RepeatContext, Throwable)
*/
@Override

View File

@@ -24,6 +24,8 @@ import org.springframework.batch.repeat.RepeatContext;
import org.springframework.batch.repeat.RepeatListener;
/**
* Allows a user to register one or more RepeatListeners to be notified on batch events.
*
* @author Dave Syer
*
*/
@@ -34,7 +36,7 @@ public class CompositeRepeatListener implements RepeatListener {
/**
* Public setter for the listeners.
*
* @param listeners
* @param listeners array of RepeatListeners to be used by the CompositeRepeatListener.
*/
public void setListeners(RepeatListener[] listeners) {
this.listeners = Arrays.asList(listeners);
@@ -43,7 +45,7 @@ public class CompositeRepeatListener implements RepeatListener {
/**
* Register additional listener.
*
* @param listener
* @param listener the RepeatListener to be added to the list of listeners to be notified.
*/
public void register(RepeatListener listener) {
if (!listeners.contains(listener)) {

View File

@@ -39,7 +39,8 @@ public class CompositeCompletionPolicy implements CompletionPolicy {
/**
* Setter for the policies.
*
* @param policies
* @param policies an array of completion policies to be used to determine
* isComplete by consensus.
*/
public void setPolicies(CompletionPolicy[] policies) {
this.policies = Arrays.asList(policies).toArray(new CompletionPolicy[policies.length]);

View File

@@ -52,7 +52,7 @@ public class TimeoutTerminationPolicy extends CompletionPolicySupport {
* Construct a {@link TimeoutTerminationPolicy} with the specified timeout
* value (in milliseconds).
*
* @param timeout
* @param timeout the milliseconds to be used for the timeout.
*/
public TimeoutTerminationPolicy(long timeout) {
super();

View File

@@ -434,7 +434,10 @@ public class RepeatTemplate implements RepeatOperations {
/**
* Delegate to the {@link CompletionPolicy}.
*
* @param context the current batch context.
* @param result the result of the latest batch item processing.
* @return true if complete according to policy and result value, else false.
*
* @see org.springframework.batch.repeat.CompletionPolicy#isComplete(RepeatContext,
* RepeatStatus)
*/
@@ -448,6 +451,8 @@ public class RepeatTemplate implements RepeatOperations {
/**
* Delegate to {@link CompletionPolicy}.
* @param context the current batch context.
* @return true if complete according to policy alone not including result value, else false.
*
* @see org.springframework.batch.repeat.CompletionPolicy#isComplete(RepeatContext)
*/
@@ -461,6 +466,9 @@ public class RepeatTemplate implements RepeatOperations {
/**
* Delegate to the {@link CompletionPolicy}.
*
* @return a RepeatContext object that can be used by the implementation to store
* internal state for a batch step.
*
* @see org.springframework.batch.repeat.CompletionPolicy#start(RepeatContext)
*/
@@ -474,6 +482,7 @@ public class RepeatTemplate implements RepeatOperations {
/**
* Delegate to the {@link CompletionPolicy}.
* @param context the value returned by start.
*
* @see org.springframework.batch.repeat.CompletionPolicy#update(RepeatContext)
*/

View File

@@ -40,7 +40,9 @@ public class AnnotationMethodResolver implements MethodResolver {
/**
* Create a MethodResolver for the specified Method-level annotation type
* Create a MethodResolver for the specified Method-level annotation type.
*
* @param annotationType establish the annotation to be used.
*/
public AnnotationMethodResolver(Class<? extends Annotation> annotationType) {
Assert.notNull(annotationType, "annotationType must not be null");

View File

@@ -72,8 +72,9 @@ public enum DatabaseType {
/**
* Static method to obtain a DatabaseType from the provided product name.
*
* @param productName
* @return DatabaseType for given product name.
* @param productName {@link String} containing the product name.
* @return the {@link DatabaseType} for given product name.
*
* @throws IllegalArgumentException if none is found.
*/
public static DatabaseType fromProductName(String productName){
@@ -89,9 +90,10 @@ public enum DatabaseType {
/**
* Convenience method that pulls a database product name from the DataSource's metadata.
*
* @param dataSource
* @return DatabaseType
* @throws MetaDataAccessException
* @param dataSource {@link DataSource} to the database to be used.
* @return {@link DatabaseType} for the {@link DataSource} specified.
*
* @throws MetaDataAccessException thrown if error occured during Metadata lookup.
*/
public static DatabaseType fromMetaData(DataSource dataSource) throws MetaDataAccessException {
String databaseProductName =

View File

@@ -182,8 +182,10 @@ public class MethodInvokerUtils {
* Create a {@link MethodInvoker} for the delegate from a single public
* method.
*
* @param target an object to search for an appropriate method
* @return a MethodInvoker that calls a method on the delegate
* @param target an object to search for an appropriate method.
* @param <C> the class.
* @param <T> the type.
* @return a MethodInvoker that calls a method on the delegate.
*/
public static <C, T> MethodInvoker getMethodInvokerForSingleArgument(Object target) {
final AtomicReference<Method> methodHolder = new AtomicReference<>();

View File

@@ -96,7 +96,7 @@ public final class PropertiesConverter {
* an empty properties object is passed in, a blank string is returned,
* otherwise it's string representation is returned.
*
* @param propertiesToParse
* @param propertiesToParse contains the properties be converted.
* @return String representation of properties object
*/
public static String propertiesToString(Properties propertiesToParse) {