Review process. Split step package into item and tasklet.

This commit is contained in:
dsyer
2008-03-14 10:50:53 +00:00
parent 39755ea3a6
commit de2715614b
51 changed files with 91 additions and 64 deletions

View File

@@ -17,6 +17,8 @@ package org.springframework.batch.core.step;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.repository.JobRepository;
import org.springframework.batch.core.step.item.ItemOrientedStep;
import org.springframework.batch.core.step.item.SimpleItemHandler;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemWriter;
import org.springframework.beans.factory.BeanNameAware;

View File

@@ -27,7 +27,7 @@ import org.springframework.batch.core.StepExecution;
import org.springframework.batch.core.StepListener;
import org.springframework.batch.core.listener.CompositeStepListener;
import org.springframework.batch.core.repository.JobRepository;
import org.springframework.batch.core.tasklet.Tasklet;
import org.springframework.batch.core.step.tasklet.Tasklet;
import org.springframework.batch.repeat.ExitStatus;
import org.springframework.beans.factory.BeanNameAware;
import org.springframework.beans.factory.InitializingBean;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.core.step;
package org.springframework.batch.core.step.item;
import org.springframework.batch.core.ItemSkipPolicy;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.core.step;
package org.springframework.batch.core.step.item;
import org.springframework.batch.core.StepExecution;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.core.step;
package org.springframework.batch.core.step.item;
import java.util.ArrayList;
import java.util.List;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.core.step;
package org.springframework.batch.core.step.item;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.core.step;
package org.springframework.batch.core.step.item;
import org.springframework.batch.repeat.ExitStatus;
import org.springframework.batch.support.ExceptionClassifier;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.core.step;
package org.springframework.batch.core.step.item;
import org.springframework.batch.core.StepContribution;
import org.springframework.batch.item.ClearFailedException;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.core.step;
package org.springframework.batch.core.step.item;
import java.util.Date;
@@ -27,7 +27,8 @@ import org.springframework.batch.core.StepListener;
import org.springframework.batch.core.UnexpectedJobExecutionException;
import org.springframework.batch.core.listener.CompositeStepListener;
import org.springframework.batch.core.repository.JobRepository;
import org.springframework.batch.core.tasklet.Tasklet;
import org.springframework.batch.core.step.AbstractStep;
import org.springframework.batch.core.step.tasklet.Tasklet;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemStream;
import org.springframework.batch.item.ItemWriter;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.core.step;
package org.springframework.batch.core.step.item;
import org.springframework.batch.core.ItemSkipPolicy;
import org.springframework.batch.core.StepContribution;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.core.step;
package org.springframework.batch.core.step.item;
import java.util.concurrent.Semaphore;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.core.step;
package org.springframework.batch.core.step.item;
import java.io.FileNotFoundException;
import java.util.Collections;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.core.step;
package org.springframework.batch.core.step.item;
import org.springframework.batch.core.ItemSkipPolicy;

View File

@@ -13,11 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.core.step;
package org.springframework.batch.core.step.item;
import org.springframework.batch.core.BatchListener;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.StepListener;
import org.springframework.batch.core.step.AbstractStepFactoryBean;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemStream;
import org.springframework.batch.item.ItemWriter;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.core.step;
package org.springframework.batch.core.step.item;
import java.io.PrintWriter;
import java.io.StringWriter;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.core.step;
package org.springframework.batch.core.step.item;
import org.springframework.batch.core.StepContribution;
import org.springframework.batch.item.ClearFailedException;
@@ -72,7 +72,7 @@ public class SimpleItemHandler implements ItemHandler {
* Get the next item from {@link #read(StepContribution)} and if not null
* pass the item to {@link #write(Object, StepContribution)}.
*
* @see org.springframework.batch.core.step.ItemHandler#handle(org.springframework.batch.core.StepContribution)
* @see org.springframework.batch.core.step.item.ItemHandler#handle(org.springframework.batch.core.StepContribution)
*/
public ExitStatus handle(StepContribution contribution) throws Exception {
Object item = read(contribution);

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.core.step;
package org.springframework.batch.core.step.item;
import org.springframework.batch.repeat.RepeatContext;
import org.springframework.batch.repeat.exception.ExceptionHandler;

View File

@@ -13,12 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.core.step;
package org.springframework.batch.core.step.item;
import org.springframework.batch.core.BatchListener;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.StepListener;
import org.springframework.batch.core.listener.MulticasterBatchListener;
import org.springframework.batch.core.step.AbstractStepFactoryBean;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemStream;
import org.springframework.batch.item.ItemWriter;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.core.step;
package org.springframework.batch.core.step.item;
import org.springframework.batch.core.UnexpectedJobExecutionException;

View File

@@ -1,4 +1,4 @@
package org.springframework.batch.core.step;
package org.springframework.batch.core.step.item;
import java.util.Arrays;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.core.step;
package org.springframework.batch.core.step.item;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.StepContribution;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.core.step;
package org.springframework.batch.core.step.item;
import org.springframework.batch.core.StepExecution;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.core.step;
package org.springframework.batch.core.step.item;
import org.springframework.core.JdkVersion;
import org.springframework.util.ClassUtils;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.core.step;
package org.springframework.batch.core.step.item;
import org.springframework.batch.core.JobInterruptedException;
import org.springframework.batch.core.Step;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.core.step;
package org.springframework.batch.core.step.item;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@@ -0,0 +1,7 @@
<html>
<body>
<p>
Specific implementations of step concerns for item-oriented approach.
</p>
</body>
</html>

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.core.tasklet;
package org.springframework.batch.core.step.tasklet;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.StepExecution;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.core.tasklet;
package org.springframework.batch.core.step.tasklet;
import org.springframework.batch.item.adapter.AbstractMethodInvokingDelegator;
import org.springframework.batch.repeat.ExitStatus;
@@ -38,7 +38,7 @@ public class TaskletAdapter extends AbstractMethodInvokingDelegator implements T
* delegate method should not be void, otherwise there is no way to
* determine when the result indicates a finished job.
*
* @see org.springframework.batch.core.tasklet.Tasklet#execute()
* @see org.springframework.batch.core.step.tasklet.Tasklet#execute()
*/
public ExitStatus execute() throws Exception {
return mapResult(invokeDelegateMethod());