You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@batchee.apache.org by rm...@apache.org on 2015/12/01 23:36:28 UTC
[2/2] incubator-batchee git commit: adding @Documentation on all our
components
adding @Documentation on all our components
Project: http://git-wip-us.apache.org/repos/asf/incubator-batchee/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-batchee/commit/95e199aa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-batchee/tree/95e199aa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-batchee/diff/95e199aa
Branch: refs/heads/master
Commit: 95e199aad4b5b05ca8a1beb8acca48b4452c45f6
Parents: e87abcf
Author: Romain Manni-Bucau <rm...@gmail.com>
Authored: Tue Dec 1 23:37:09 2015 +0100
Committer: Romain Manni-Bucau <rm...@gmail.com>
Committed: Tue Dec 1 23:37:09 2015 +0100
----------------------------------------------------------------------
.gitignore | 1 +
.../org/apache/batchee/beanio/BeanIOReader.java | 8 +
.../org/apache/batchee/beanio/BeanIOWriter.java | 6 +
.../batchee/camel/CamelChainItemProcessor.java | 3 +
.../batchee/camel/CamelItemProcessor.java | 5 +
.../apache/batchee/camel/CamelItemReader.java | 7 +
.../apache/batchee/camel/CamelItemWriter.java | 5 +
extensions/cdi/pom.xml | 8 +-
.../apache/batchee/csv/CommonsCsvReader.java | 22 +
.../apache/batchee/csv/CommonsCsvWriter.java | 22 +
.../extras/async/AsynchronousItemProcessor.java | 7 +-
.../org/apache/batchee/extras/chain/Chain.java | 5 +
.../batchee/extras/flat/FlatFileItemReader.java | 6 +
.../batchee/extras/flat/FlatFileItemWriter.java | 9 +
.../batchee/extras/jdbc/JdbcBatchlet.java | 3 +
.../jdbc/JdbcConnectionConfiguration.java | 7 +
.../apache/batchee/extras/jdbc/JdbcReader.java | 5 +
.../apache/batchee/extras/jdbc/JdbcWriter.java | 5 +
.../extras/jpa/EntityManagerLocator.java | 3 +
.../batchee/extras/jpa/JpaItemReader.java | 8 +
.../batchee/extras/jpa/JpaItemWriter.java | 5 +
.../batchee/extras/stax/StaxItemReader.java | 6 +
.../batchee/extras/stax/StaxItemWriter.java | 8 +
.../validation/BeanValidationItemProcessor.java | 5 +
.../apache/batchee/groovy/GroovyBatchlet.java | 4 +
.../batchee/groovy/GroovyItemProcessor.java | 4 +
.../apache/batchee/groovy/GroovyItemReader.java | 4 +
.../apache/batchee/groovy/GroovyItemWriter.java | 4 +
.../hazelcast/HazelcastLockBatchlet.java | 5 +
.../HazelcastSynchroInstanceAware.java | 5 +
.../hazelcast/HazelcastUnlockBatchlet.java | 3 +
.../batchee/jackson/JacksonJSonWriter.java | 7 +
.../batchee/jackson/JacksonJsonReader.java | 6 +
.../apache/batchee/jsefa/JSefaCsvReader.java | 13 +
.../apache/batchee/jsefa/JSefaCsvWriter.java | 13 +
.../apache/batchee/jsefa/JSefaFlrReader.java | 8 +
.../apache/batchee/jsefa/JSefaFlrWriter.java | 8 +
.../org/apache/batchee/jsefa/JSefaReader.java | 10 +-
.../org/apache/batchee/jsefa/JSefaWriter.java | 11 +-
.../apache/batchee/jsefa/JSefaXmlReader.java | 8 +
.../apache/batchee/jsefa/JSefaXmlWriter.java | 8 +
.../modelmapper/ModelMapperItemProcessor.java | 6 +-
extensions/pom.xml | 59 +++
.../apache/batchee/doc/api/Configuration.java | 32 --
.../apache/batchee/doc/api/Documentation.java | 32 ++
.../batchee/tools/maven/DocumentationMojo.java | 296 +------------
.../doc/ComponentDocumentationGenerator.java | 439 +++++++++++++++++++
.../tools/maven/DocumentationMojoTest.java | 64 ++-
48 files changed, 880 insertions(+), 338 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 8aba325..988997f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@ idea/
.idea
.classpath
.project
+batchee-site-generated
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/beanio/src/main/java/org/apache/batchee/beanio/BeanIOReader.java
----------------------------------------------------------------------
diff --git a/extensions/beanio/src/main/java/org/apache/batchee/beanio/BeanIOReader.java b/extensions/beanio/src/main/java/org/apache/batchee/beanio/BeanIOReader.java
index 7fb72d1..04bb635 100644
--- a/extensions/beanio/src/main/java/org/apache/batchee/beanio/BeanIOReader.java
+++ b/extensions/beanio/src/main/java/org/apache/batchee/beanio/BeanIOReader.java
@@ -16,6 +16,7 @@
*/
package org.apache.batchee.beanio;
+import org.apache.batchee.doc.api.Documentation;
import org.apache.batchee.extras.transaction.CountedReader;
import org.beanio.BeanReader;
import org.beanio.BeanReaderErrorHandler;
@@ -28,29 +29,36 @@ import java.io.FileReader;
import java.io.Serializable;
import java.util.Locale;
+@Documentation("Uses BeanIO to read a file.")
public class BeanIOReader extends CountedReader implements ItemReader {
@Inject
@BatchProperty(name = "file")
+ @Documentation("The file to read")
protected String filePath;
@Inject
@BatchProperty(name = "skippedHeaderLines")
+ @Documentation("Number of lines to skip")
protected int skippedHeaderLines;
@Inject
@BatchProperty
+ @Documentation("The BeanIO stream name")
protected String streamName;
@Inject
@BatchProperty
+ @Documentation("The configuration path in the classpath")
protected String configuration;
@Inject
@BatchProperty(name = "locale")
+ @Documentation("The locale to use")
protected String localeStr;
@Inject
@BatchProperty(name = "errorHandler")
+ @Documentation("The error handler class (resolved using locator)")
protected String errorHandlerStr;
private BeanReader reader;
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/beanio/src/main/java/org/apache/batchee/beanio/BeanIOWriter.java
----------------------------------------------------------------------
diff --git a/extensions/beanio/src/main/java/org/apache/batchee/beanio/BeanIOWriter.java b/extensions/beanio/src/main/java/org/apache/batchee/beanio/BeanIOWriter.java
index b8a6dbe..f87c94f 100644
--- a/extensions/beanio/src/main/java/org/apache/batchee/beanio/BeanIOWriter.java
+++ b/extensions/beanio/src/main/java/org/apache/batchee/beanio/BeanIOWriter.java
@@ -16,6 +16,7 @@
*/
package org.apache.batchee.beanio;
+import org.apache.batchee.doc.api.Documentation;
import org.apache.batchee.extras.transaction.TransactionalWriter;
import org.beanio.BeanWriter;
@@ -27,21 +28,26 @@ import java.io.File;
import java.io.Serializable;
import java.util.List;
+@Documentation("Reads a file using BeanIO.")
public class BeanIOWriter implements ItemWriter {
@Inject
@BatchProperty(name = "file")
+ @Documentation("The file to write")
protected String filePath;
@Inject
@BatchProperty
+ @Documentation("The BeanIO stream name")
protected String streamName;
@Inject
@BatchProperty
+ @Documentation("The configuration path in the classpath")
protected String configuration;
@Inject
@BatchProperty
+ @Documentation("The output encoding")
protected String encoding;
private BeanWriter writer;
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/camel/src/main/java/org/apache/batchee/camel/CamelChainItemProcessor.java
----------------------------------------------------------------------
diff --git a/extensions/camel/src/main/java/org/apache/batchee/camel/CamelChainItemProcessor.java b/extensions/camel/src/main/java/org/apache/batchee/camel/CamelChainItemProcessor.java
index de9a642..2d26e41 100644
--- a/extensions/camel/src/main/java/org/apache/batchee/camel/CamelChainItemProcessor.java
+++ b/extensions/camel/src/main/java/org/apache/batchee/camel/CamelChainItemProcessor.java
@@ -16,6 +16,7 @@
*/
package org.apache.batchee.camel;
+import org.apache.batchee.doc.api.Documentation;
import org.apache.batchee.extras.chain.Chain;
import org.apache.batchee.extras.locator.BeanLocator;
@@ -23,9 +24,11 @@ import javax.batch.api.BatchProperty;
import javax.batch.api.chunk.ItemProcessor;
import javax.inject.Inject;
+@Documentation("A chain of camelItemProcessor")
public class CamelChainItemProcessor extends Chain<ItemProcessor> implements ItemProcessor {
@Inject
@BatchProperty
+ @Documentation("The locator to use to find camel item processors.")
private String templateLocator;
private BeanLocator locatorInstance;
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/camel/src/main/java/org/apache/batchee/camel/CamelItemProcessor.java
----------------------------------------------------------------------
diff --git a/extensions/camel/src/main/java/org/apache/batchee/camel/CamelItemProcessor.java b/extensions/camel/src/main/java/org/apache/batchee/camel/CamelItemProcessor.java
index 43c8c45..3a11022 100644
--- a/extensions/camel/src/main/java/org/apache/batchee/camel/CamelItemProcessor.java
+++ b/extensions/camel/src/main/java/org/apache/batchee/camel/CamelItemProcessor.java
@@ -16,17 +16,22 @@
*/
package org.apache.batchee.camel;
+import org.apache.batchee.doc.api.Documentation;
+
import javax.batch.api.BatchProperty;
import javax.batch.api.chunk.ItemProcessor;
import javax.inject.Inject;
+@Documentation("Uses camel producer template to process the incoming item.")
public class CamelItemProcessor implements ItemProcessor {
@Inject
@BatchProperty
+ @Documentation("Endpoint URI")
private String endpoint;
@Inject
@BatchProperty
+ @Documentation("The locator to use to find the producer template")
private String templateLocator;
@Override
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/camel/src/main/java/org/apache/batchee/camel/CamelItemReader.java
----------------------------------------------------------------------
diff --git a/extensions/camel/src/main/java/org/apache/batchee/camel/CamelItemReader.java b/extensions/camel/src/main/java/org/apache/batchee/camel/CamelItemReader.java
index bf4d289..0816b5e 100644
--- a/extensions/camel/src/main/java/org/apache/batchee/camel/CamelItemReader.java
+++ b/extensions/camel/src/main/java/org/apache/batchee/camel/CamelItemReader.java
@@ -16,26 +16,33 @@
*/
package org.apache.batchee.camel;
+import org.apache.batchee.doc.api.Documentation;
+
import javax.batch.api.BatchProperty;
import javax.batch.api.chunk.ItemReader;
import javax.inject.Inject;
import java.io.Serializable;
+@Documentation("Uses a camel consumer as reader.")
public class CamelItemReader implements ItemReader {
@Inject
@BatchProperty
+ @Documentation("Endpoint URI")
private String endpoint;
@Inject
@BatchProperty(name = "timeout")
+ @Documentation("Timeout after which we consider the consumption is done")
private String timeoutStr;
@Inject
@BatchProperty
+ @Documentation("Consumer stream type")
private String expectedClass;
@Inject
@BatchProperty
+ @Documentation("Locator for the consumer template")
private String templateLocator;
@Override
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/camel/src/main/java/org/apache/batchee/camel/CamelItemWriter.java
----------------------------------------------------------------------
diff --git a/extensions/camel/src/main/java/org/apache/batchee/camel/CamelItemWriter.java b/extensions/camel/src/main/java/org/apache/batchee/camel/CamelItemWriter.java
index 77b9eb3..fe4c6c5 100644
--- a/extensions/camel/src/main/java/org/apache/batchee/camel/CamelItemWriter.java
+++ b/extensions/camel/src/main/java/org/apache/batchee/camel/CamelItemWriter.java
@@ -16,19 +16,24 @@
*/
package org.apache.batchee.camel;
+import org.apache.batchee.doc.api.Documentation;
+
import javax.batch.api.BatchProperty;
import javax.batch.api.chunk.ItemWriter;
import javax.inject.Inject;
import java.io.Serializable;
import java.util.List;
+@Documentation("Uses camel to write processed items.")
public class CamelItemWriter implements ItemWriter {
@Inject
@BatchProperty
+ @Documentation("Endpoint URI")
private String endpoint;
@Inject
@BatchProperty
+ @Documentation("Locator for the producer template")
private String templateLocator;
@Override
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/cdi/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/cdi/pom.xml b/extensions/cdi/pom.xml
index c9b9c7b..498e00d 100644
--- a/extensions/cdi/pom.xml
+++ b/extensions/cdi/pom.xml
@@ -31,6 +31,7 @@
<properties>
<deltaspike.version>1.5.1</deltaspike.version>
</properties>
+
<dependencies>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
@@ -110,13 +111,6 @@
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-annotation_1.2_spec</artifactId>
- <version>1.0</version>
- <scope>test</scope>
- </dependency>
-
</dependencies>
</profile>
</profiles>
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/commons-csv/src/main/java/org/apache/batchee/csv/CommonsCsvReader.java
----------------------------------------------------------------------
diff --git a/extensions/commons-csv/src/main/java/org/apache/batchee/csv/CommonsCsvReader.java b/extensions/commons-csv/src/main/java/org/apache/batchee/csv/CommonsCsvReader.java
index fe0d244..e6e6f7d 100644
--- a/extensions/commons-csv/src/main/java/org/apache/batchee/csv/CommonsCsvReader.java
+++ b/extensions/commons-csv/src/main/java/org/apache/batchee/csv/CommonsCsvReader.java
@@ -17,6 +17,7 @@
package org.apache.batchee.csv;
import org.apache.batchee.csv.mapper.DefaultMapper;
+import org.apache.batchee.doc.api.Documentation;
import org.apache.batchee.extras.buffered.IteratorReader;
import org.apache.batchee.extras.locator.BeanLocator;
import org.apache.batchee.extras.transaction.CountedReader;
@@ -34,6 +35,7 @@ import java.io.Reader;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
+@Documentation("Reads a CSV file using commons-csv.")
public class CommonsCsvReader extends CountedReader {
private static final CsvReaderMapper<CSVRecord> NOOP_MAPPER = new CsvReaderMapper<CSVRecord>() {
@Override
@@ -44,82 +46,102 @@ public class CommonsCsvReader extends CountedReader {
@Inject
@BatchProperty
+ @Documentation("format to use (Default, RFC4180, Excel, TDF, MySQL)")
private String format;
@Inject
@BatchProperty
+ @Documentation("file to read")
private String input;
@Inject
@BatchProperty
+ @Documentation("input encoding")
private String encoding;
@Inject
@BatchProperty
+ @Documentation("record mapper if mapping is null")
private String mapper;
@Inject
@BatchProperty
+ @Documentation("mapping type if mapper is null")
private String mapping;
@Inject
@BatchProperty
+ @Documentation("locator to lookup the mapper")
private String locator;
@Inject
@BatchProperty
+ @Documentation("is missing column names allowed")
private String allowMissingColumnNames;
@Inject
@BatchProperty
+ @Documentation("delimiter of the file")
private String delimiter;
@Inject
@BatchProperty
+ @Documentation("quote character")
private String quoteCharacter;
@Inject
@BatchProperty
+ @Documentation("quote mode (ALL, MINIMAL, NON_NUMERIC, NONE)")
private String quoteMode;
@Inject
@BatchProperty
+ @Documentation("comment marker")
private String commentMarker;
@Inject
@BatchProperty
+ @Documentation("escape character")
private String escapeCharacter;
@Inject
@BatchProperty
+ @Documentation("should the parser ignore surrounding spaces")
private String ignoreSurroundingSpaces;
@Inject
@BatchProperty
+ @Documentation("should empty lines be skipped")
private String ignoreEmptyLines;
@Inject
@BatchProperty
+ @Documentation("record separator")
private String recordSeparator;
@Inject
@BatchProperty
+ @Documentation("string replacement for null")
private String nullString;
@Inject
@BatchProperty
+ @Documentation("header comments")
private String headerComments;
@Inject
@BatchProperty
+ @Documentation("headers")
private String header;
@Inject
@BatchProperty
+ @Documentation("should headers be skipped")
private String skipHeaderRecord;
@Inject
@BatchProperty
+ @Documentation("should headers be used")
private String readHeaders;
private IteratorReader<CSVRecord> iterator;
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/commons-csv/src/main/java/org/apache/batchee/csv/CommonsCsvWriter.java
----------------------------------------------------------------------
diff --git a/extensions/commons-csv/src/main/java/org/apache/batchee/csv/CommonsCsvWriter.java b/extensions/commons-csv/src/main/java/org/apache/batchee/csv/CommonsCsvWriter.java
index 20d6d35..3ab27d1 100644
--- a/extensions/commons-csv/src/main/java/org/apache/batchee/csv/CommonsCsvWriter.java
+++ b/extensions/commons-csv/src/main/java/org/apache/batchee/csv/CommonsCsvWriter.java
@@ -17,6 +17,7 @@
package org.apache.batchee.csv;
import org.apache.batchee.csv.mapper.DefaultMapper;
+import org.apache.batchee.doc.api.Documentation;
import org.apache.batchee.extras.locator.BeanLocator;
import org.apache.batchee.extras.transaction.TransactionalWriter;
import org.apache.commons.csv.CSVFormat;
@@ -30,85 +31,106 @@ import java.io.File;
import java.io.Serializable;
import java.util.List;
+@Documentation("Writes a CSV file using commons-csv.")
public class CommonsCsvWriter implements ItemWriter {
@Inject
@BatchProperty
+ @Documentation("format to use (Default, RFC4180, Excel, TDF, MySQL)")
private String format;
@Inject
@BatchProperty
+ @Documentation("file to write")
private String output;
@Inject
@BatchProperty
+ @Documentation("output encoding")
private String encoding;
@Inject
@BatchProperty
+ @Documentation("record mapper if mapping is null")
private String mapper;
@Inject
@BatchProperty
+ @Documentation("mapping type if mapper is null")
private String mapping;
@Inject
@BatchProperty
+ @Documentation("locator to lookup the mapper")
private String locator;
@Inject
@BatchProperty
+ @Documentation("is missing column names allowed")
private String allowMissingColumnNames;
@Inject
@BatchProperty
+ @Documentation("delimiter of the file")
private String delimiter;
@Inject
@BatchProperty
+ @Documentation("quote character")
private String quoteCharacter;
@Inject
@BatchProperty
+ @Documentation("quote mode (ALL, MINIMAL, NON_NUMERIC, NONE)")
private String quoteMode;
@Inject
@BatchProperty
+ @Documentation("comment marker")
private String commentMarker;
@Inject
@BatchProperty
+ @Documentation("escape character")
private String escapeCharacter;
@Inject
@BatchProperty
+ @Documentation("should the parser ignore surrounding spaces")
private String ignoreSurroundingSpaces;
@Inject
@BatchProperty
+ @Documentation("should empty lines be skipped")
private String ignoreEmptyLines;
@Inject
@BatchProperty
+ @Documentation("record separator")
private String recordSeparator;
@Inject
@BatchProperty
+ @Documentation("string replacement for null")
private String nullString;
@Inject
@BatchProperty
+ @Documentation("header comments")
private String headerComments;
@Inject
@BatchProperty
+ @Documentation("headers")
private String header;
@Inject
@BatchProperty
+ @Documentation("should headers be skipped")
private String skipHeaderRecord;
@Inject
@BatchProperty
+ @Documentation("should headers be written")
private String writeHeaders;
private CSVPrinter writer;
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/extras/src/main/java/org/apache/batchee/extras/async/AsynchronousItemProcessor.java
----------------------------------------------------------------------
diff --git a/extensions/extras/src/main/java/org/apache/batchee/extras/async/AsynchronousItemProcessor.java b/extensions/extras/src/main/java/org/apache/batchee/extras/async/AsynchronousItemProcessor.java
index 257a13a..902c714 100644
--- a/extensions/extras/src/main/java/org/apache/batchee/extras/async/AsynchronousItemProcessor.java
+++ b/extensions/extras/src/main/java/org/apache/batchee/extras/async/AsynchronousItemProcessor.java
@@ -16,6 +16,7 @@
*/
package org.apache.batchee.extras.async;
+import org.apache.batchee.doc.api.Documentation;
import org.apache.batchee.extras.locator.BeanLocator;
import javax.batch.api.BatchProperty;
@@ -27,20 +28,24 @@ import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicInteger;
-public class AsynchronousItemProcessor<T> implements ItemProcessor {
+@Documentation("Processes asynchronously the items and send to the write a Future<?>.")
+public class AsynchronousItemProcessor implements ItemProcessor {
protected ExecutorService es = null;
protected ItemProcessor delegate = null;
@Inject
@BatchProperty
+ @Documentation("the pool size, if <= 0 cached threads are used")
private String poolSize;
@Inject
@BatchProperty
+ @Documentation("Locator for the delegate processor")
private String locator;
@Inject
@BatchProperty
+ @Documentation("The actual processor (delegate)")
private String delegateRef;
protected ExecutorService getExecutor() {
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/extras/src/main/java/org/apache/batchee/extras/chain/Chain.java
----------------------------------------------------------------------
diff --git a/extensions/extras/src/main/java/org/apache/batchee/extras/chain/Chain.java b/extensions/extras/src/main/java/org/apache/batchee/extras/chain/Chain.java
index bc03f9a..fe84653 100644
--- a/extensions/extras/src/main/java/org/apache/batchee/extras/chain/Chain.java
+++ b/extensions/extras/src/main/java/org/apache/batchee/extras/chain/Chain.java
@@ -16,6 +16,7 @@
*/
package org.apache.batchee.extras.chain;
+import org.apache.batchee.doc.api.Documentation;
import org.apache.batchee.extras.locator.BeanLocator;
import javax.batch.api.BatchProperty;
@@ -27,18 +28,22 @@ import java.util.Collection;
public abstract class Chain<T> {
@Inject
@BatchProperty
+ @Documentation("The locator to use to create chain components")
protected String locator;
@Inject
@BatchProperty
+ @Documentation("The list of components of the chain")
protected String chain;
@Inject
@BatchProperty
+ @Documentation("The separator to use in chain string (default to ',')")
protected String separator;
@Inject
@BatchProperty
+ @Documentation("Should release phase of the lifecycle be called (default to false), use true for @Dependent beans.")
protected String forceRelease;
private Collection<BeanLocator.LocatorInstance<T>> runtimeChain = new ArrayList<BeanLocator.LocatorInstance<T>>();
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/extras/src/main/java/org/apache/batchee/extras/flat/FlatFileItemReader.java
----------------------------------------------------------------------
diff --git a/extensions/extras/src/main/java/org/apache/batchee/extras/flat/FlatFileItemReader.java b/extensions/extras/src/main/java/org/apache/batchee/extras/flat/FlatFileItemReader.java
index a87cd8f..dca3cb7 100644
--- a/extensions/extras/src/main/java/org/apache/batchee/extras/flat/FlatFileItemReader.java
+++ b/extensions/extras/src/main/java/org/apache/batchee/extras/flat/FlatFileItemReader.java
@@ -16,6 +16,7 @@
*/
package org.apache.batchee.extras.flat;
+import org.apache.batchee.doc.api.Documentation;
import org.apache.batchee.extras.locator.BeanLocator;
import org.apache.batchee.extras.transaction.CountedReader;
@@ -28,21 +29,26 @@ import java.io.File;
import java.io.FileReader;
import java.io.Serializable;
+@Documentation("Reads a flat file.")
public class FlatFileItemReader extends CountedReader implements ItemReader {
@Inject
@BatchProperty
+ @Documentation("Locator to find line mapper")
private String locator;
@Inject
@BatchProperty
+ @Documentation("The line mapper implementation or reference (see locator)")
private String lineMapper;
@Inject
@BatchProperty
+ @Documentation("Input file path")
private String input;
@Inject
@BatchProperty(name = "comments")
+ @Documentation("Comments prefix marker (default #)")
private String commentStr;
private BufferedReader reader = null;
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/extras/src/main/java/org/apache/batchee/extras/flat/FlatFileItemWriter.java
----------------------------------------------------------------------
diff --git a/extensions/extras/src/main/java/org/apache/batchee/extras/flat/FlatFileItemWriter.java b/extensions/extras/src/main/java/org/apache/batchee/extras/flat/FlatFileItemWriter.java
index dd4b46e..862823c 100644
--- a/extensions/extras/src/main/java/org/apache/batchee/extras/flat/FlatFileItemWriter.java
+++ b/extensions/extras/src/main/java/org/apache/batchee/extras/flat/FlatFileItemWriter.java
@@ -16,6 +16,7 @@
*/
package org.apache.batchee.extras.flat;
+import org.apache.batchee.doc.api.Documentation;
import org.apache.batchee.extras.transaction.TransactionalWriter;
import javax.batch.api.BatchProperty;
@@ -26,17 +27,21 @@ import java.io.File;
import java.io.Serializable;
import java.util.List;
+@Documentation("Writes a flat file.")
public class FlatFileItemWriter implements ItemWriter {
@Inject
@BatchProperty
+ @Documentation("output file path")
private String output;
@Inject
@BatchProperty
+ @Documentation("output file encoding")
private String encoding;
@Inject
@BatchProperty(name = "line.separator")
+ @Documentation("line separator to use, default is OS dependent")
private String lineSeparator;
private TransactionalWriter writer = null;
@@ -52,6 +57,10 @@ public class FlatFileItemWriter implements ItemWriter {
}
if (lineSeparator == null) {
lineSeparator = System.getProperty("line.separator", "\n");
+ } else if ("\\n".equals(lineSeparator)) {
+ lineSeparator = "\n";
+ } else if ("\\r\\n".equals(lineSeparator)) {
+ lineSeparator = "\r\n";
}
writer = new TransactionalWriter(file, encoding, checkpoint);
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/extras/src/main/java/org/apache/batchee/extras/jdbc/JdbcBatchlet.java
----------------------------------------------------------------------
diff --git a/extensions/extras/src/main/java/org/apache/batchee/extras/jdbc/JdbcBatchlet.java b/extensions/extras/src/main/java/org/apache/batchee/extras/jdbc/JdbcBatchlet.java
index 008ccac..197ebc6 100644
--- a/extensions/extras/src/main/java/org/apache/batchee/extras/jdbc/JdbcBatchlet.java
+++ b/extensions/extras/src/main/java/org/apache/batchee/extras/jdbc/JdbcBatchlet.java
@@ -16,6 +16,7 @@
*/
package org.apache.batchee.extras.jdbc;
+import org.apache.batchee.doc.api.Documentation;
import org.apache.batchee.extras.transaction.integration.Synchronizations;
import javax.batch.api.BatchProperty;
@@ -24,9 +25,11 @@ import javax.inject.Inject;
import java.sql.Connection;
import java.sql.PreparedStatement;
+@Documentation("Executes an update or delete query.")
public class JdbcBatchlet extends JdbcConnectionConfiguration implements Batchlet {
@Inject
@BatchProperty
+ @Documentation("The update query to execute (UPDATE or DELETE)")
private String sql;
@Override
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/extras/src/main/java/org/apache/batchee/extras/jdbc/JdbcConnectionConfiguration.java
----------------------------------------------------------------------
diff --git a/extensions/extras/src/main/java/org/apache/batchee/extras/jdbc/JdbcConnectionConfiguration.java b/extensions/extras/src/main/java/org/apache/batchee/extras/jdbc/JdbcConnectionConfiguration.java
index 085ea98..fe1a7f5 100644
--- a/extensions/extras/src/main/java/org/apache/batchee/extras/jdbc/JdbcConnectionConfiguration.java
+++ b/extensions/extras/src/main/java/org/apache/batchee/extras/jdbc/JdbcConnectionConfiguration.java
@@ -16,6 +16,8 @@
*/
package org.apache.batchee.extras.jdbc;
+import org.apache.batchee.doc.api.Documentation;
+
import javax.batch.api.BatchProperty;
import javax.batch.operations.BatchRuntimeException;
import javax.inject.Inject;
@@ -27,22 +29,27 @@ import java.sql.DriverManager;
public abstract class JdbcConnectionConfiguration {
@Inject
@BatchProperty
+ @Documentation("The JNDI name of the datasource")
private String jndi;
@Inject
@BatchProperty
+ @Documentation("The datasource driver to use if jndi is null")
protected String driver;
@Inject
@BatchProperty
+ @Documentation("The datasource url to use if jndi is null")
protected String url;
@Inject
@BatchProperty
+ @Documentation("The datasource user to use if jndi is null")
protected String user;
@Inject
@BatchProperty
+ @Documentation("The datasource password to use if jndi is null")
protected String password;
protected Connection connection() throws Exception {
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/extras/src/main/java/org/apache/batchee/extras/jdbc/JdbcReader.java
----------------------------------------------------------------------
diff --git a/extensions/extras/src/main/java/org/apache/batchee/extras/jdbc/JdbcReader.java b/extensions/extras/src/main/java/org/apache/batchee/extras/jdbc/JdbcReader.java
index bbf9fee..2143f8e 100644
--- a/extensions/extras/src/main/java/org/apache/batchee/extras/jdbc/JdbcReader.java
+++ b/extensions/extras/src/main/java/org/apache/batchee/extras/jdbc/JdbcReader.java
@@ -16,6 +16,7 @@
*/
package org.apache.batchee.extras.jdbc;
+import org.apache.batchee.doc.api.Documentation;
import org.apache.batchee.extras.locator.BeanLocator;
import javax.batch.api.BatchProperty;
@@ -27,17 +28,21 @@ import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.LinkedList;
+@Documentation("Reads data from a SQL query")
public class JdbcReader extends JdbcConnectionConfiguration implements ItemReader {
@Inject
@BatchProperty(name = "mapper")
+ @Documentation("The ResultSet mapper")
private String mapperStr;
@Inject
@BatchProperty
+ @Documentation("The locator to lookup the mapper")
private String locator;
@Inject
@BatchProperty
+ @Documentation("The query to execute to find data")
private String query;
private LinkedList<Object> items;
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/extras/src/main/java/org/apache/batchee/extras/jdbc/JdbcWriter.java
----------------------------------------------------------------------
diff --git a/extensions/extras/src/main/java/org/apache/batchee/extras/jdbc/JdbcWriter.java b/extensions/extras/src/main/java/org/apache/batchee/extras/jdbc/JdbcWriter.java
index e23ed54..469809c 100644
--- a/extensions/extras/src/main/java/org/apache/batchee/extras/jdbc/JdbcWriter.java
+++ b/extensions/extras/src/main/java/org/apache/batchee/extras/jdbc/JdbcWriter.java
@@ -16,6 +16,7 @@
*/
package org.apache.batchee.extras.jdbc;
+import org.apache.batchee.doc.api.Documentation;
import org.apache.batchee.extras.locator.BeanLocator;
import org.apache.batchee.extras.transaction.integration.Synchronizations;
@@ -27,17 +28,21 @@ import java.sql.Connection;
import java.sql.PreparedStatement;
import java.util.List;
+@Documentation("Store the items in a database.")
public class JdbcWriter extends JdbcConnectionConfiguration implements ItemWriter {
@Inject
@BatchProperty
+ @Documentation("The locator to lookup the mapper")
private String locator;
@Inject
@BatchProperty(name = "mapper")
+ @Documentation("The mapper to convert items to JDBC domain")
private String mapperStr;
@Inject
@BatchProperty
+ @Documentation("The update query")
private String sql;
private BeanLocator.LocatorInstance<ObjectMapper> mapper;
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/extras/src/main/java/org/apache/batchee/extras/jpa/EntityManagerLocator.java
----------------------------------------------------------------------
diff --git a/extensions/extras/src/main/java/org/apache/batchee/extras/jpa/EntityManagerLocator.java b/extensions/extras/src/main/java/org/apache/batchee/extras/jpa/EntityManagerLocator.java
index 11857d0..8cf1c22 100644
--- a/extensions/extras/src/main/java/org/apache/batchee/extras/jpa/EntityManagerLocator.java
+++ b/extensions/extras/src/main/java/org/apache/batchee/extras/jpa/EntityManagerLocator.java
@@ -16,6 +16,7 @@
*/
package org.apache.batchee.extras.jpa;
+import org.apache.batchee.doc.api.Documentation;
import org.apache.batchee.extras.locator.BeanLocator;
import javax.batch.api.BatchProperty;
@@ -27,10 +28,12 @@ import javax.persistence.EntityManager;
public class EntityManagerLocator {
@Inject
@BatchProperty
+ @Documentation("The reference of qualified name of the proviedr for the entity manager")
protected String entityManagerProvider;
@Inject
@BatchProperty
+ @Documentation("The locator to use to find the entity manager provider")
protected String locator;
protected BeanLocator.LocatorInstance<EntityManagerProvider> emProvider;
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/extras/src/main/java/org/apache/batchee/extras/jpa/JpaItemReader.java
----------------------------------------------------------------------
diff --git a/extensions/extras/src/main/java/org/apache/batchee/extras/jpa/JpaItemReader.java b/extensions/extras/src/main/java/org/apache/batchee/extras/jpa/JpaItemReader.java
index a2a1a86..6273047 100644
--- a/extensions/extras/src/main/java/org/apache/batchee/extras/jpa/JpaItemReader.java
+++ b/extensions/extras/src/main/java/org/apache/batchee/extras/jpa/JpaItemReader.java
@@ -16,6 +16,7 @@
*/
package org.apache.batchee.extras.jpa;
+import org.apache.batchee.doc.api.Documentation;
import org.apache.batchee.extras.locator.BeanLocator;
import javax.batch.api.BatchProperty;
@@ -29,29 +30,36 @@ import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
+@Documentation("Read JPA entities from a query.")
public class JpaItemReader extends EntityManagerLocator implements ItemReader {
@Inject
@BatchProperty
+ @Documentation("The parameter provider ref or qualified name")
private String parameterProvider;
@Inject
@BatchProperty
+ @Documentation("The named query to execute")
private String namedQuery;
@Inject
@BatchProperty
+ @Documentation("The query to execute if the named query is empty")
private String query;
@Inject
@BatchProperty
+ @Documentation("Pagination size")
private String pageSize;
@Inject
@BatchProperty
+ @Documentation("Should entities be detached (default false)")
private String detachEntities;
@Inject
@BatchProperty
+ @Documentation("Should JPA transaction be used (default false)")
private String jpaTransaction;
private int page = 10;
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/extras/src/main/java/org/apache/batchee/extras/jpa/JpaItemWriter.java
----------------------------------------------------------------------
diff --git a/extensions/extras/src/main/java/org/apache/batchee/extras/jpa/JpaItemWriter.java b/extensions/extras/src/main/java/org/apache/batchee/extras/jpa/JpaItemWriter.java
index 3c4f12a..12146c5 100644
--- a/extensions/extras/src/main/java/org/apache/batchee/extras/jpa/JpaItemWriter.java
+++ b/extensions/extras/src/main/java/org/apache/batchee/extras/jpa/JpaItemWriter.java
@@ -16,6 +16,8 @@
*/
package org.apache.batchee.extras.jpa;
+import org.apache.batchee.doc.api.Documentation;
+
import javax.batch.api.BatchProperty;
import javax.batch.api.chunk.ItemWriter;
import javax.inject.Inject;
@@ -23,13 +25,16 @@ import javax.persistence.EntityManager;
import java.io.Serializable;
import java.util.List;
+@Documentation("Write all items using JPA")
public class JpaItemWriter extends EntityManagerLocator implements ItemWriter {
@Inject
@BatchProperty
+ @Documentation("If set to true merge() will be used instead of persist()")
private String useMerge;
@Inject
@BatchProperty
+ @Documentation("Should JPA transaction be used (default false)")
private String jpaTransaction;
private boolean merge;
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/extras/src/main/java/org/apache/batchee/extras/stax/StaxItemReader.java
----------------------------------------------------------------------
diff --git a/extensions/extras/src/main/java/org/apache/batchee/extras/stax/StaxItemReader.java b/extensions/extras/src/main/java/org/apache/batchee/extras/stax/StaxItemReader.java
index 447b1dd..d9bf9f7 100644
--- a/extensions/extras/src/main/java/org/apache/batchee/extras/stax/StaxItemReader.java
+++ b/extensions/extras/src/main/java/org/apache/batchee/extras/stax/StaxItemReader.java
@@ -16,6 +16,7 @@
*/
package org.apache.batchee.extras.stax;
+import org.apache.batchee.doc.api.Documentation;
import org.apache.batchee.extras.transaction.CountedReader;
import org.apache.batchee.extras.stax.util.JAXBContextFactory;
@@ -36,21 +37,26 @@ import java.io.FileNotFoundException;
import java.io.InputStream;
import java.io.Serializable;
+@Documentation("Reads XML items using StAX.")
public class StaxItemReader extends CountedReader implements ItemReader {
@Inject
@BatchProperty
+ @Documentation("JAXB type(s) to instantiate for items, supports CSV values")
private String marshallingClasses;
@Inject
@BatchProperty
+ @Documentation("JAXB package if needed (optional)")
private String marshallingPackage;
@Inject
@BatchProperty
+ @Documentation("Tag to match - others are ignored")
private String tag;
@Inject
@BatchProperty
+ @Documentation("Input file path")
private String input;
private XMLEventReader reader;
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/extras/src/main/java/org/apache/batchee/extras/stax/StaxItemWriter.java
----------------------------------------------------------------------
diff --git a/extensions/extras/src/main/java/org/apache/batchee/extras/stax/StaxItemWriter.java b/extensions/extras/src/main/java/org/apache/batchee/extras/stax/StaxItemWriter.java
index 9ecbee6..d21915c 100644
--- a/extensions/extras/src/main/java/org/apache/batchee/extras/stax/StaxItemWriter.java
+++ b/extensions/extras/src/main/java/org/apache/batchee/extras/stax/StaxItemWriter.java
@@ -16,6 +16,7 @@
*/
package org.apache.batchee.extras.stax;
+import org.apache.batchee.doc.api.Documentation;
import org.apache.batchee.extras.stax.util.JAXBContextFactory;
import org.apache.batchee.extras.stax.util.SAXStAXHandler;
import org.apache.batchee.extras.transaction.TransactionalWriter;
@@ -33,29 +34,36 @@ import java.io.File;
import java.io.Serializable;
import java.util.List;
+@Documentation("Write a file using StAX")
public class StaxItemWriter implements ItemWriter {
@Inject
@BatchProperty(name = "marshallingClasses")
+ @Documentation("JAXB type(s) to instantiate for items, supports CSV values")
private String marshallingClasses;
@Inject
@BatchProperty(name = "marshallingPackage")
+ @Documentation("JAXB package if needed (optional)")
private String marshallingPackage;
@Inject
@BatchProperty(name = "rootTag")
+ @Documentation("output root tag")
private String rootTag;
@Inject
@BatchProperty(name = "encoding")
+ @Documentation("output encoding")
private String encoding;
@Inject
@BatchProperty(name = "version")
+ @Documentation("XML document version")
private String version;
@Inject
@BatchProperty(name = "output")
+ @Documentation("output file path")
private String output;
private Marshaller marshaller;
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/extras/src/main/java/org/apache/batchee/extras/validation/BeanValidationItemProcessor.java
----------------------------------------------------------------------
diff --git a/extensions/extras/src/main/java/org/apache/batchee/extras/validation/BeanValidationItemProcessor.java b/extensions/extras/src/main/java/org/apache/batchee/extras/validation/BeanValidationItemProcessor.java
index 09847bc..10678de 100644
--- a/extensions/extras/src/main/java/org/apache/batchee/extras/validation/BeanValidationItemProcessor.java
+++ b/extensions/extras/src/main/java/org/apache/batchee/extras/validation/BeanValidationItemProcessor.java
@@ -16,6 +16,8 @@
*/
package org.apache.batchee.extras.validation;
+import org.apache.batchee.doc.api.Documentation;
+
import javax.batch.api.BatchProperty;
import javax.batch.api.chunk.ItemProcessor;
import javax.inject.Inject;
@@ -27,13 +29,16 @@ import javax.validation.Validation;
import javax.validation.Validator;
import java.util.Set;
+@Documentation("Uses bean validation to validate incoming items.")
public class BeanValidationItemProcessor implements ItemProcessor {
@Inject
@BatchProperty
+ @Documentation("optional bean validation group to validate")
private String group;
@Inject
@BatchProperty
+ @Documentation("whether a validation failure throws a ConstraintViolationException or just returns null")
private String skipNotValidated;
@Override
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/groovy/src/main/java/org/apache/batchee/groovy/GroovyBatchlet.java
----------------------------------------------------------------------
diff --git a/extensions/groovy/src/main/java/org/apache/batchee/groovy/GroovyBatchlet.java b/extensions/groovy/src/main/java/org/apache/batchee/groovy/GroovyBatchlet.java
index 0a3928d..3932ef7 100644
--- a/extensions/groovy/src/main/java/org/apache/batchee/groovy/GroovyBatchlet.java
+++ b/extensions/groovy/src/main/java/org/apache/batchee/groovy/GroovyBatchlet.java
@@ -16,15 +16,19 @@
*/
package org.apache.batchee.groovy;
+import org.apache.batchee.doc.api.Documentation;
+
import javax.batch.api.BatchProperty;
import javax.batch.api.Batchlet;
import javax.batch.runtime.context.JobContext;
import javax.batch.runtime.context.StepContext;
import javax.inject.Inject;
+@Documentation("Reads and executes a batchlet from a groovy script")
public class GroovyBatchlet implements Batchlet {
@Inject
@BatchProperty
+ @Documentation("The script to execute")
private String scriptPath;
@Inject
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/groovy/src/main/java/org/apache/batchee/groovy/GroovyItemProcessor.java
----------------------------------------------------------------------
diff --git a/extensions/groovy/src/main/java/org/apache/batchee/groovy/GroovyItemProcessor.java b/extensions/groovy/src/main/java/org/apache/batchee/groovy/GroovyItemProcessor.java
index 921e171..7dcb39d 100644
--- a/extensions/groovy/src/main/java/org/apache/batchee/groovy/GroovyItemProcessor.java
+++ b/extensions/groovy/src/main/java/org/apache/batchee/groovy/GroovyItemProcessor.java
@@ -16,15 +16,19 @@
*/
package org.apache.batchee.groovy;
+import org.apache.batchee.doc.api.Documentation;
+
import javax.batch.api.BatchProperty;
import javax.batch.api.chunk.ItemProcessor;
import javax.batch.runtime.context.JobContext;
import javax.batch.runtime.context.StepContext;
import javax.inject.Inject;
+@Documentation("Reads and executes a processor from a groovy script")
public class GroovyItemProcessor implements ItemProcessor {
@Inject
@BatchProperty
+ @Documentation("The script to execute")
private String scriptPath;
@Inject
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/groovy/src/main/java/org/apache/batchee/groovy/GroovyItemReader.java
----------------------------------------------------------------------
diff --git a/extensions/groovy/src/main/java/org/apache/batchee/groovy/GroovyItemReader.java b/extensions/groovy/src/main/java/org/apache/batchee/groovy/GroovyItemReader.java
index 692352f..5d6191a 100644
--- a/extensions/groovy/src/main/java/org/apache/batchee/groovy/GroovyItemReader.java
+++ b/extensions/groovy/src/main/java/org/apache/batchee/groovy/GroovyItemReader.java
@@ -16,6 +16,8 @@
*/
package org.apache.batchee.groovy;
+import org.apache.batchee.doc.api.Documentation;
+
import javax.batch.api.BatchProperty;
import javax.batch.api.chunk.ItemReader;
import javax.batch.runtime.context.JobContext;
@@ -23,9 +25,11 @@ import javax.batch.runtime.context.StepContext;
import javax.inject.Inject;
import java.io.Serializable;
+@Documentation("Reads and executes a reader from a groovy script")
public class GroovyItemReader implements ItemReader {
@Inject
@BatchProperty
+ @Documentation("The script to execute")
private String scriptPath;
@Inject
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/groovy/src/main/java/org/apache/batchee/groovy/GroovyItemWriter.java
----------------------------------------------------------------------
diff --git a/extensions/groovy/src/main/java/org/apache/batchee/groovy/GroovyItemWriter.java b/extensions/groovy/src/main/java/org/apache/batchee/groovy/GroovyItemWriter.java
index 173d7a9..0132e6e 100644
--- a/extensions/groovy/src/main/java/org/apache/batchee/groovy/GroovyItemWriter.java
+++ b/extensions/groovy/src/main/java/org/apache/batchee/groovy/GroovyItemWriter.java
@@ -16,6 +16,8 @@
*/
package org.apache.batchee.groovy;
+import org.apache.batchee.doc.api.Documentation;
+
import javax.batch.api.BatchProperty;
import javax.batch.api.chunk.ItemWriter;
import javax.batch.runtime.context.JobContext;
@@ -24,9 +26,11 @@ import javax.inject.Inject;
import java.io.Serializable;
import java.util.List;
+@Documentation("Reads and executes a writer from a groovy script")
public class GroovyItemWriter implements ItemWriter {
@Inject
@BatchProperty
+ @Documentation("The script to execute")
private String scriptPath;
@Inject
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/hazelcast/src/main/java/org/apache/batchee/hazelcast/HazelcastLockBatchlet.java
----------------------------------------------------------------------
diff --git a/extensions/hazelcast/src/main/java/org/apache/batchee/hazelcast/HazelcastLockBatchlet.java b/extensions/hazelcast/src/main/java/org/apache/batchee/hazelcast/HazelcastLockBatchlet.java
index a27c50f..e10e2d9 100644
--- a/extensions/hazelcast/src/main/java/org/apache/batchee/hazelcast/HazelcastLockBatchlet.java
+++ b/extensions/hazelcast/src/main/java/org/apache/batchee/hazelcast/HazelcastLockBatchlet.java
@@ -16,18 +16,23 @@
*/
package org.apache.batchee.hazelcast;
+import org.apache.batchee.doc.api.Documentation;
+
import javax.batch.api.BatchProperty;
import javax.batch.api.Batchlet;
import javax.inject.Inject;
import java.util.concurrent.TimeUnit;
+@Documentation("Obtain a hazelcast lock")
public class HazelcastLockBatchlet extends HazelcastSynchroInstanceAware implements Batchlet {
@Inject
@BatchProperty
+ @Documentation("The duration this task can wait to get the lock")
protected String tryDuration;
@Inject
@BatchProperty
+ @Documentation("The duration unit associated to tryDuration")
protected String tryDurationUnit;
@Override
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/hazelcast/src/main/java/org/apache/batchee/hazelcast/HazelcastSynchroInstanceAware.java
----------------------------------------------------------------------
diff --git a/extensions/hazelcast/src/main/java/org/apache/batchee/hazelcast/HazelcastSynchroInstanceAware.java b/extensions/hazelcast/src/main/java/org/apache/batchee/hazelcast/HazelcastSynchroInstanceAware.java
index 3fbed63..71f5742 100644
--- a/extensions/hazelcast/src/main/java/org/apache/batchee/hazelcast/HazelcastSynchroInstanceAware.java
+++ b/extensions/hazelcast/src/main/java/org/apache/batchee/hazelcast/HazelcastSynchroInstanceAware.java
@@ -18,6 +18,7 @@ package org.apache.batchee.hazelcast;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.core.ILock;
+import org.apache.batchee.doc.api.Documentation;
import javax.batch.api.BatchProperty;
import javax.inject.Inject;
@@ -26,18 +27,22 @@ import java.io.IOException;
public class HazelcastSynchroInstanceAware {
@Inject
@BatchProperty
+ @Documentation("The hazelcast instance name")
protected String instanceName;
@Inject
@BatchProperty
+ @Documentation("The hazelcast xml configuration")
protected String xmlConfiguration;
@Inject
@BatchProperty
+ @Documentation("Is the instance local, if false the component will create a client")
protected String local;
@Inject
@BatchProperty
+ @Documentation("The lock name to use")
protected String lockName;
protected HazelcastInstance instance() throws IOException {
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/hazelcast/src/main/java/org/apache/batchee/hazelcast/HazelcastUnlockBatchlet.java
----------------------------------------------------------------------
diff --git a/extensions/hazelcast/src/main/java/org/apache/batchee/hazelcast/HazelcastUnlockBatchlet.java b/extensions/hazelcast/src/main/java/org/apache/batchee/hazelcast/HazelcastUnlockBatchlet.java
index e060591..c1b1ac2 100644
--- a/extensions/hazelcast/src/main/java/org/apache/batchee/hazelcast/HazelcastUnlockBatchlet.java
+++ b/extensions/hazelcast/src/main/java/org/apache/batchee/hazelcast/HazelcastUnlockBatchlet.java
@@ -16,8 +16,11 @@
*/
package org.apache.batchee.hazelcast;
+import org.apache.batchee.doc.api.Documentation;
+
import javax.batch.api.Batchlet;
+@Documentation("Unlock a hazelcast lock")
public class HazelcastUnlockBatchlet extends HazelcastSynchroInstanceAware implements Batchlet {
@Override
public String process() throws Exception {
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/jackson/src/main/java/org/apache/batchee/jackson/JacksonJSonWriter.java
----------------------------------------------------------------------
diff --git a/extensions/jackson/src/main/java/org/apache/batchee/jackson/JacksonJSonWriter.java b/extensions/jackson/src/main/java/org/apache/batchee/jackson/JacksonJSonWriter.java
index a2b96c7..81e0dff 100644
--- a/extensions/jackson/src/main/java/org/apache/batchee/jackson/JacksonJSonWriter.java
+++ b/extensions/jackson/src/main/java/org/apache/batchee/jackson/JacksonJSonWriter.java
@@ -18,6 +18,7 @@ package org.apache.batchee.jackson;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.batchee.doc.api.Documentation;
import org.apache.batchee.extras.transaction.TransactionalWriter;
import javax.batch.api.BatchProperty;
@@ -28,25 +29,31 @@ import java.io.File;
import java.io.Serializable;
import java.util.List;
+@Documentation("Write a JSON file using jackson")
public class JacksonJSonWriter implements ItemWriter {
@Inject
@BatchProperty
+ @Documentation("output file")
private String file;
@Inject
@BatchProperty
+ @Documentation("output encoding")
private String encoding;
@Inject
@BatchProperty
+ @Documentation("DeserializationFeature and SerializationFeature comma separated key-value configurations")
private String configuration;
@Inject
@BatchProperty
+ @Documentation("is the array wrapped in an object or not")
private String skipRoot;
@Inject
@BatchProperty
+ @Documentation("how to generate field names for each item, default uses item1, item2, ...")
private String fieldNameGeneratorClass;
private JsonGenerator generator;
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/jackson/src/main/java/org/apache/batchee/jackson/JacksonJsonReader.java
----------------------------------------------------------------------
diff --git a/extensions/jackson/src/main/java/org/apache/batchee/jackson/JacksonJsonReader.java b/extensions/jackson/src/main/java/org/apache/batchee/jackson/JacksonJsonReader.java
index e4486d3..e2cf9d5 100644
--- a/extensions/jackson/src/main/java/org/apache/batchee/jackson/JacksonJsonReader.java
+++ b/extensions/jackson/src/main/java/org/apache/batchee/jackson/JacksonJsonReader.java
@@ -19,6 +19,7 @@ package org.apache.batchee.jackson;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonToken;
import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.batchee.doc.api.Documentation;
import org.apache.batchee.extras.transaction.CountedReader;
import javax.batch.api.BatchProperty;
@@ -26,21 +27,26 @@ import javax.inject.Inject;
import java.io.File;
import java.io.Serializable;
+@Documentation("Reads a JSON file using jackson.")
public class JacksonJsonReader extends CountedReader {
@Inject
@BatchProperty
+ @Documentation("Incoming file")
private String file;
@Inject
@BatchProperty
+ @Documentation("Type to instantiate")
private String type;
@Inject
@BatchProperty
+ @Documentation("DeserializationFeature and SerializationFeature comma separated key-value configurations")
private String configuration;
@Inject
@BatchProperty
+ @Documentation("Should root be skipped (default: true)")
private String skipRoot;
private JsonParser parser;
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaCsvReader.java
----------------------------------------------------------------------
diff --git a/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaCsvReader.java b/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaCsvReader.java
index 170ff54..6939571 100644
--- a/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaCsvReader.java
+++ b/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaCsvReader.java
@@ -18,53 +18,66 @@ package org.apache.batchee.jsefa;
import net.sf.jsefa.Deserializer;
import net.sf.jsefa.csv.CsvIOFactory;
+import org.apache.batchee.doc.api.Documentation;
import javax.batch.api.BatchProperty;
import javax.inject.Inject;
+@Documentation("Reads a CSV file using JSefa.")
public class JSefaCsvReader extends JSefaReader {
@Inject
@BatchProperty
+ @Documentation("Which ref or implementation to use to filter lines")
private String lineFilter;
@Inject
@BatchProperty
+ @Documentation("low level configuration implementation")
private String lowLevelConfiguration;
@Inject
@BatchProperty
+ @Documentation("if not using a custom line filter how many lines to filter")
private String lineFilterLimit;
@Inject
@BatchProperty
+ @Documentation("record delimiter")
private String specialRecordDelimiter;
@Inject
@BatchProperty
+ @Documentation("EOL")
private String lineBreak;
@Inject
@BatchProperty
+ @Documentation("which string to use for null values")
private String defaultNoValueString;
@Inject
@BatchProperty
+ @Documentation("quote mode (ALWAYS, ON_DEMAND, NEVER, DEFAULT)")
private String defaultQuoteMode;
@Inject
@BatchProperty
+ @Documentation("field delimiter")
private String fieldDelimiter;
@Inject
@BatchProperty
+ @Documentation("quote charater to use")
private String quoteCharacter;
@Inject
@BatchProperty
+ @Documentation("escape mode (ESCAPE_CHARACTER, DOUBLING)")
private String quoteCharacterEscapeMode;
@Inject
@BatchProperty
+ @Documentation("should deliimter be used after last field")
private String useDelimiterAfterLastField;
@Override
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaCsvWriter.java
----------------------------------------------------------------------
diff --git a/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaCsvWriter.java b/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaCsvWriter.java
index 4db1025..502dd5f 100644
--- a/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaCsvWriter.java
+++ b/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaCsvWriter.java
@@ -18,53 +18,66 @@ package org.apache.batchee.jsefa;
import net.sf.jsefa.Serializer;
import net.sf.jsefa.csv.CsvIOFactory;
+import org.apache.batchee.doc.api.Documentation;
import javax.batch.api.BatchProperty;
import javax.inject.Inject;
+@Documentation("Writes a CSV file using JSefa.")
public class JSefaCsvWriter extends JSefaWriter {
@Inject
@BatchProperty
+ @Documentation("Which ref or implementation to use to filter lines")
private String lineFilter;
@Inject
@BatchProperty
+ @Documentation("low level configuration implementation")
private String lowLevelConfiguration;
@Inject
@BatchProperty
+ @Documentation("if not using a custom line filter how many lines to filter")
private String lineFilterLimit;
@Inject
@BatchProperty
+ @Documentation("record delimiter")
private String specialRecordDelimiter;
@Inject
@BatchProperty
+ @Documentation("EOL")
private String lineBreak;
@Inject
@BatchProperty
+ @Documentation("which string to use for null values")
private String defaultNoValueString;
@Inject
@BatchProperty
+ @Documentation("quote mode (ALWAYS, ON_DEMAND, NEVER, DEFAULT)")
private String defaultQuoteMode;
@Inject
@BatchProperty
+ @Documentation("field delimiter")
private String fieldDelimiter;
@Inject
@BatchProperty
+ @Documentation("quote charater to use")
private String quoteCharacter;
@Inject
@BatchProperty
+ @Documentation("escape mode (ESCAPE_CHARACTER, DOUBLING)")
private String quoteCharacterEscapeMode;
@Inject
@BatchProperty
+ @Documentation("should deliimter be used after last field")
private String useDelimiterAfterLastField;
@Override
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaFlrReader.java
----------------------------------------------------------------------
diff --git a/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaFlrReader.java b/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaFlrReader.java
index 27f57fc..5a7841b 100644
--- a/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaFlrReader.java
+++ b/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaFlrReader.java
@@ -18,33 +18,41 @@ package org.apache.batchee.jsefa;
import net.sf.jsefa.Deserializer;
import net.sf.jsefa.flr.FlrIOFactory;
+import org.apache.batchee.doc.api.Documentation;
import javax.batch.api.BatchProperty;
import javax.inject.Inject;
+@Documentation("Reads a FLR file using JSefa.")
public class JSefaFlrReader extends JSefaReader {
@Inject
@BatchProperty
+ @Documentation("Which ref or implementation to use to filter lines")
private String lineFilter;
@Inject
@BatchProperty
+ @Documentation("low level configuration implementation")
private String lowLevelConfiguration;
@Inject
@BatchProperty
+ @Documentation("if not using a custom line filter how many lines to filter")
private String lineFilterLimit;
@Inject
@BatchProperty
+ @Documentation("record delimiter")
private String specialRecordDelimiter;
@Inject
@BatchProperty
+ @Documentation("EOL")
private String lineBreak;
@Inject
@BatchProperty
+ @Documentation("pad character")
private String defaultPadCharacter;
@Override
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaFlrWriter.java
----------------------------------------------------------------------
diff --git a/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaFlrWriter.java b/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaFlrWriter.java
index 53aa5a4..0e66da7 100644
--- a/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaFlrWriter.java
+++ b/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaFlrWriter.java
@@ -18,33 +18,41 @@ package org.apache.batchee.jsefa;
import net.sf.jsefa.Serializer;
import net.sf.jsefa.flr.FlrIOFactory;
+import org.apache.batchee.doc.api.Documentation;
import javax.batch.api.BatchProperty;
import javax.inject.Inject;
+@Documentation("Writes a FLR file using JSefa.")
public class JSefaFlrWriter extends JSefaWriter {
@Inject
@BatchProperty
+ @Documentation("Which ref or implementation to use to filter lines")
private String lineFilter;
@Inject
@BatchProperty
+ @Documentation("low level configuration implementation")
private String lowLevelConfiguration;
@Inject
@BatchProperty
+ @Documentation("if not using a custom line filter how many lines to filter")
private String lineFilterLimit;
@Inject
@BatchProperty
+ @Documentation("record delimiter")
private String specialRecordDelimiter;
@Inject
@BatchProperty
+ @Documentation("EOL")
private String lineBreak;
@Inject
@BatchProperty
+ @Documentation("pad character")
private String defaultPadCharacter;
@Override
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaReader.java
----------------------------------------------------------------------
diff --git a/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaReader.java b/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaReader.java
index 544bfa9..05cb3a6 100644
--- a/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaReader.java
+++ b/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaReader.java
@@ -16,8 +16,9 @@
*/
package org.apache.batchee.jsefa;
-import org.apache.batchee.extras.transaction.CountedReader;
import net.sf.jsefa.Deserializer;
+import org.apache.batchee.doc.api.Documentation;
+import org.apache.batchee.extras.transaction.CountedReader;
import javax.batch.api.BatchProperty;
import javax.inject.Inject;
@@ -27,30 +28,37 @@ import java.io.Serializable;
public abstract class JSefaReader extends CountedReader {
@Inject
@BatchProperty
+ @Documentation("object types to use")
protected String objectTypes;
@Inject
@BatchProperty
+ @Documentation("validation mode (AUTO, CALLBACK, NONE)")
protected String validationMode;
@Inject
@BatchProperty
+ @Documentation("object accessor provider implementation")
protected String objectAccessorProvider;
@Inject
@BatchProperty
+ @Documentation("validation provider implementation")
protected String validationProvider;
@Inject
@BatchProperty
+ @Documentation("simple type provider implementation")
protected String simpleTypeProvider;
@Inject
@BatchProperty
+ @Documentation("type mapping registry to use")
protected String typeMappingRegistry;
@Inject
@BatchProperty
+ @Documentation("file to read")
protected String file;
protected Deserializer deserializer;
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaWriter.java
----------------------------------------------------------------------
diff --git a/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaWriter.java b/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaWriter.java
index 9ac4e22..c53040b 100644
--- a/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaWriter.java
+++ b/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaWriter.java
@@ -16,8 +16,9 @@
*/
package org.apache.batchee.jsefa;
-import org.apache.batchee.extras.transaction.TransactionalWriter;
import net.sf.jsefa.Serializer;
+import org.apache.batchee.doc.api.Documentation;
+import org.apache.batchee.extras.transaction.TransactionalWriter;
import javax.batch.api.BatchProperty;
import javax.batch.api.chunk.ItemWriter;
@@ -30,34 +31,42 @@ import java.util.List;
public abstract class JSefaWriter implements ItemWriter {
@Inject
@BatchProperty
+ @Documentation("object types to use")
protected String objectTypes;
@Inject
@BatchProperty
+ @Documentation("validation mode (AUTO, CALLBACK, NONE)")
protected String validationMode;
@Inject
@BatchProperty
+ @Documentation("object accessor provider implementation")
protected String objectAccessorProvider;
@Inject
@BatchProperty
+ @Documentation("validation provider implementation")
protected String validationProvider;
@Inject
@BatchProperty
+ @Documentation("simple type provider implementation")
protected String simpleTypeProvider;
@Inject
@BatchProperty
+ @Documentation("type mapping registry to use")
protected String typeMappingRegistry;
@Inject
@BatchProperty
+ @Documentation("file to write")
protected String file;
@Inject
@BatchProperty
+ @Documentation("output file encoding")
protected String encoding;
protected Serializer serializer;
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaXmlReader.java
----------------------------------------------------------------------
diff --git a/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaXmlReader.java b/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaXmlReader.java
index 16fed53..26df843 100644
--- a/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaXmlReader.java
+++ b/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaXmlReader.java
@@ -18,33 +18,41 @@ package org.apache.batchee.jsefa;
import net.sf.jsefa.Deserializer;
import net.sf.jsefa.xml.XmlIOFactory;
+import org.apache.batchee.doc.api.Documentation;
import javax.batch.api.BatchProperty;
import javax.inject.Inject;
+@Documentation("Reads a XML file using JSefa.")
public class JSefaXmlReader extends JSefaReader {
@Inject
@BatchProperty
+ @Documentation("low level configuration implementation")
private String lowLevelConfiguration;
@Inject
@BatchProperty
+ @Documentation("EOL")
private String lineBreak;
@Inject
@BatchProperty
+ @Documentation("registry name for data type")
private String dataTypeDefaultNameRegistry;
@Inject
@BatchProperty
+ @Documentation("indentation")
private String lineIndentation;
@Inject
@BatchProperty
+ @Documentation("namespace manager to use")
private String namespaceManager;
@Inject
@BatchProperty
+ @Documentation("data type attribute name")
private String dataTypeAttributeName;
@Override
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaXmlWriter.java
----------------------------------------------------------------------
diff --git a/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaXmlWriter.java b/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaXmlWriter.java
index 928daaa..6bee49d 100644
--- a/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaXmlWriter.java
+++ b/extensions/jsefa/src/main/java/org/apache/batchee/jsefa/JSefaXmlWriter.java
@@ -18,33 +18,41 @@ package org.apache.batchee.jsefa;
import net.sf.jsefa.Serializer;
import net.sf.jsefa.xml.XmlIOFactory;
+import org.apache.batchee.doc.api.Documentation;
import javax.batch.api.BatchProperty;
import javax.inject.Inject;
+@Documentation("Reads a XML file using JSefa.")
public class JSefaXmlWriter extends JSefaWriter {
@Inject
@BatchProperty
+ @Documentation("low level configuration implementation")
private String lowLevelConfiguration;
@Inject
@BatchProperty
+ @Documentation("EOL")
private String lineBreak;
@Inject
@BatchProperty
+ @Documentation("Registry name for data type")
private String dataTypeDefaultNameRegistry;
@Inject
@BatchProperty
+ @Documentation("indentation")
private String lineIndentation;
@Inject
@BatchProperty
+ @Documentation("namespace manager to use")
private String namespaceManager;
@Inject
@BatchProperty
+ @Documentation("data type attribute name")
private String dataTypeAttributeName;
@Override
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/modelmapper/src/main/java/org/apache/batchee/modelmapper/ModelMapperItemProcessor.java
----------------------------------------------------------------------
diff --git a/extensions/modelmapper/src/main/java/org/apache/batchee/modelmapper/ModelMapperItemProcessor.java b/extensions/modelmapper/src/main/java/org/apache/batchee/modelmapper/ModelMapperItemProcessor.java
index d52cace..464d8b5 100644
--- a/extensions/modelmapper/src/main/java/org/apache/batchee/modelmapper/ModelMapperItemProcessor.java
+++ b/extensions/modelmapper/src/main/java/org/apache/batchee/modelmapper/ModelMapperItemProcessor.java
@@ -16,25 +16,29 @@
*/
package org.apache.batchee.modelmapper;
+import org.apache.batchee.doc.api.Documentation;
import org.modelmapper.ModelMapper;
import org.modelmapper.config.Configuration;
import org.modelmapper.convention.MatchingStrategies;
import org.modelmapper.spi.MatchingStrategy;
-import java.util.Locale;
import javax.batch.api.BatchProperty;
import javax.batch.api.chunk.ItemProcessor;
import javax.inject.Inject;
+import java.util.Locale;
+@Documentation("uses model mapper to process the item")
public class ModelMapperItemProcessor implements ItemProcessor {
private volatile ModelMapper mapper = null;
@Inject
@BatchProperty
+ @Documentation("matching strategy to use (LOOSE, STANDARD, STRICT or custom implementation)")
private String matchingStrategy;
@Inject
@BatchProperty
+ @Documentation("target type")
private String destinationType;
private volatile Class<?> destinationTypeClass = null;
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/extensions/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/pom.xml b/extensions/pom.xml
index ade854e..5a93fd2 100644
--- a/extensions/pom.xml
+++ b/extensions/pom.xml
@@ -51,6 +51,12 @@
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-atinject_1.0_spec</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.batchee</groupId>
+ <artifactId>batchee-doc-api</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
<dependency>
<groupId>org.testng</groupId>
@@ -66,8 +72,61 @@
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
</dependency>
+
+ <dependency> <!-- just there for mvn-exec and deps ordering -->
+ <groupId>org.apache.batchee</groupId>
+ <artifactId>batchee-maven-plugin</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.batchee</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin> <!-- would be cool to reuse our plugin but doesnt work in the same build -->
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.4.0</version>
+ <executions>
+ <execution>
+ <phase>pre-site</phase>
+ <goals>
+ <goal>java</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <mainClass>org.apache.batchee.tools.maven.doc.ComponentDocumentationGenerator</mainClass>
+ <includePluginDependencies>true</includePluginDependencies>
+ <arguments>
+ <argument>${project.build.outputDirectory}</argument>
+ <argument>${project.parent.parent.basedir}/src/site/markdown/batchee-site-generated/${project.artifactId}.md</argument>
+ <argument>md</argument>
+ </arguments>
+ </configuration>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.batchee</groupId>
+ <artifactId>batchee-maven-plugin</artifactId>
+ <version>${project.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.batchee</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+
<profiles>
<profile>
<id>cdi-1.0</id>
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/tools/doc-api/src/main/java/org/apache/batchee/doc/api/Configuration.java
----------------------------------------------------------------------
diff --git a/tools/doc-api/src/main/java/org/apache/batchee/doc/api/Configuration.java b/tools/doc-api/src/main/java/org/apache/batchee/doc/api/Configuration.java
deleted file mode 100644
index 2de07f8..0000000
--- a/tools/doc-api/src/main/java/org/apache/batchee/doc/api/Configuration.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.batchee.doc.api;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.CLASS;
-
-@Retention(CLASS)
-@Target({ FIELD, METHOD, PARAMETER, TYPE })
-public @interface Configuration {
- String value();
-}
http://git-wip-us.apache.org/repos/asf/incubator-batchee/blob/95e199aa/tools/doc-api/src/main/java/org/apache/batchee/doc/api/Documentation.java
----------------------------------------------------------------------
diff --git a/tools/doc-api/src/main/java/org/apache/batchee/doc/api/Documentation.java b/tools/doc-api/src/main/java/org/apache/batchee/doc/api/Documentation.java
new file mode 100644
index 0000000..c5ea36d
--- /dev/null
+++ b/tools/doc-api/src/main/java/org/apache/batchee/doc/api/Documentation.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.batchee.doc.api;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.CLASS;
+
+@Retention(CLASS)
+@Target({ FIELD, METHOD, PARAMETER, TYPE })
+public @interface Documentation {
+ String value();
+}