From 5cfbe2f70a1f104c018fb050039889e20ef975d8 Mon Sep 17 00:00:00 2001 From: lucasward Date: Tue, 7 Oct 2008 03:48:45 +0000 Subject: [PATCH] OPEN - issue BATCH-767: Update documentation for M2 http://jira.springframework.org/browse/BATCH-767 Updated the javadocs on ItemProcessor. --- .../batch/item/ItemProcessor.java | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ItemProcessor.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ItemProcessor.java index 1f2544e92..168f54ef4 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ItemProcessor.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ItemProcessor.java @@ -1,13 +1,26 @@ package org.springframework.batch.item; /** - * Interface for item transformations. If the return value is null it may be - * ignored, so this interface is also able to act as a filter. - * + *

Interface for item transformation. Given an item as input, this interface provides + * an extension point which allows for the application of business logic in an item + * oriented processing scenario. It should be noted that while it's possible to return + * a different type than the one provided, it's not strictly necessary. Furthermore, + * returning null indicates that the item should not be continued to be processed.

+ * * @author Robert Kasanicky * @author Dave Syer */ public interface ItemProcessor { + /** + * Process the provided item, returning a potentially modified or new item for continued + * processing. If the returned result is null, it is assumed that processing of the item + * should not continue. + * + * @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 + */ O process(I item) throws Exception; }