From 41c6b4fb2168783a192a5603f398671b1023231e Mon Sep 17 00:00:00 2001 From: trisberg Date: Fri, 12 Dec 2008 18:30:29 +0000 Subject: [PATCH] BATCH-955: removed class references --- .../core/configuration/xml/DecisionParser.java | 17 +++++++++-------- .../core/configuration/xml/FlowParser.java | 10 +++++----- .../xml/JobExecutionListenerParser.java | 8 ++++---- .../batch/core/configuration/xml/JobParser.java | 14 ++++++-------- .../configuration/xml/JobRepositoryParser.java | 3 ++- .../core/configuration/xml/SplitParser.java | 15 ++++++++------- 6 files changed, 34 insertions(+), 33 deletions(-) diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/DecisionParser.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/DecisionParser.java index b09480068..31dd8b653 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/DecisionParser.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/DecisionParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2008 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,18 +17,17 @@ package org.springframework.batch.core.configuration.xml; import java.util.Collection; -import org.springframework.batch.core.job.flow.support.StateTransition; -import org.springframework.batch.core.job.flow.support.state.DecisionState; -import org.springframework.batch.core.job.flow.support.state.JobExecutionDecider; import org.springframework.beans.factory.config.RuntimeBeanReference; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.xml.ParserContext; + import org.w3c.dom.Element; /** * Internal parser for the <decision/> elements inside a job. A decision - * element references a bean definition for a {@link JobExecutionDecider} and - * goes on to list a set of transitions to other states with <next + * element references a bean definition for a + * {@link org.springframework.batch.core.job.flow.support.state.JobExecutionDecider} + * and goes on to list a set of transitions to other states with <next * on="pattern" to="stepName"/>. Used by the {@link JobParser}. * * @see JobParser @@ -43,7 +42,8 @@ public class DecisionParser { * * @param element the <decision/gt; element to parse * @param parserContext the parser context for the bean factory - * @return a collection of bean definitions for {@link StateTransition} + * @return a collection of bean definitions for + * {@link org.springframework.batch.core.job.flow.support.StateTransition} * instances objects */ public Collection parse(Element element, ParserContext parserContext) { @@ -51,7 +51,8 @@ public class DecisionParser { String refAttribute = element.getAttribute("decider"); String idAttribute = element.getAttribute("id"); - BeanDefinitionBuilder stateBuilder = BeanDefinitionBuilder.genericBeanDefinition(DecisionState.class); + BeanDefinitionBuilder stateBuilder = + BeanDefinitionBuilder.genericBeanDefinition("org.springframework.batch.core.job.flow.support.state.DecisionState"); stateBuilder.addConstructorArgValue(new RuntimeBeanReference(refAttribute)); stateBuilder.addConstructorArgValue(idAttribute); return StepParser.getNextElements(parserContext, stateBuilder.getBeanDefinition(), element); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/FlowParser.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/FlowParser.java index 7e952d19c..9310db40f 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/FlowParser.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/FlowParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2008 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,14 +18,13 @@ package org.springframework.batch.core.configuration.xml; import java.util.ArrayList; import java.util.List; -import org.springframework.batch.core.job.flow.Flow; -import org.springframework.batch.core.job.flow.support.SimpleFlow; import org.springframework.beans.factory.config.RuntimeBeanReference; import org.springframework.beans.factory.support.AbstractBeanDefinition; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.support.ManagedList; import org.springframework.beans.factory.xml.ParserContext; import org.springframework.util.xml.DomUtils; + import org.w3c.dom.Element; /** @@ -38,7 +37,7 @@ public class FlowParser { * @param element the top level element containing a flow definition * @param parserContext the {@link ParserContext} * @param flowName the name of the flow - * @return a bean definition for a {@link Flow} + * @return a bean definition for a {@link org.springframework.batch.core.job.flow.Flow} */ public AbstractBeanDefinition parse(Element element, ParserContext parserContext, String flowName) { List stateTransitions = new ArrayList(); @@ -64,7 +63,8 @@ public class FlowParser { stateTransitions.addAll(splitParser.parse(stepElement, parserContext)); } - BeanDefinitionBuilder flowBuilder = BeanDefinitionBuilder.genericBeanDefinition(SimpleFlow.class); + BeanDefinitionBuilder flowBuilder = + BeanDefinitionBuilder.genericBeanDefinition("org.springframework.batch.core.job.flow.support.SimpleFlow"); flowBuilder.addConstructorArgValue(flowName ); ManagedList managedList = new ManagedList(); @SuppressWarnings( { "unchecked", "unused" }) diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/JobExecutionListenerParser.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/JobExecutionListenerParser.java index d554b166a..49761d2e2 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/JobExecutionListenerParser.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/JobExecutionListenerParser.java @@ -21,8 +21,6 @@ import static org.springframework.util.StringUtils.hasText; import java.util.ArrayList; import java.util.List; -import org.springframework.batch.core.JobExecutionListener; -import org.springframework.batch.core.listener.JobListenerFactoryBean; import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.config.BeanReference; import org.springframework.beans.factory.config.RuntimeBeanReference; @@ -35,11 +33,12 @@ import org.springframework.beans.factory.xml.BeanDefinitionParser; import org.springframework.beans.factory.xml.ParserContext; import org.springframework.util.StringUtils; import org.springframework.util.xml.DomUtils; + import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; /** - * {@link BeanDefinitionParser} for {@link JobExecutionListener}s + * {@link BeanDefinitionParser} for {@link org.springframework.batch.core.JobExecutionListener}s * * @author Lucas Ward * @@ -52,7 +51,8 @@ public class JobExecutionListenerParser { List listeners = new ArrayList(); List listenerElements = (List) DomUtils.getChildElementsByTagName(element, "listener"); for(Element listenerElement : listenerElements){ - BeanDefinitionBuilder listenerBuilder = BeanDefinitionBuilder.genericBeanDefinition(JobListenerFactoryBean.class); + BeanDefinitionBuilder listenerBuilder = + BeanDefinitionBuilder.genericBeanDefinition("org.springframework.batch.core.listener.JobListenerFactoryBean"); String id = listenerElement.getAttribute("id"); String listenerRef = listenerElement.getAttribute("ref"); String className = listenerElement.getAttribute("class"); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/JobParser.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/JobParser.java index 691bf9a8a..00281206e 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/JobParser.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/JobParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2008 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,9 +15,6 @@ */ package org.springframework.batch.core.configuration.xml; -import org.springframework.batch.core.Job; -import org.springframework.batch.core.job.flow.FlowJob; -import org.springframework.batch.core.repository.JobRepository; import org.springframework.beans.factory.support.AbstractBeanDefinition; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.support.ManagedList; @@ -25,11 +22,12 @@ import org.springframework.beans.factory.xml.AbstractBeanDefinitionParser; import org.springframework.beans.factory.xml.ParserContext; import org.springframework.util.StringUtils; import org.springframework.util.xml.DomUtils; + import org.w3c.dom.Element; /** * Parser for the lt;job/gt; element in the Batch namespace. Sets up and returns - * a bean definition for a {@link Job}. + * a bean definition for a {@link org.springframework.batch.core.Job}. * * @author Dave Syer * @@ -37,9 +35,9 @@ import org.w3c.dom.Element; public class JobParser extends AbstractBeanDefinitionParser { /** - * Create a bean definition for a {@link FlowJob}. The + * Create a bean definition for a {@link org.springframework.batch.core.job.flow.FlowJob}. The * jobRepository attribute is a reference to a - * {@link JobRepository} and defaults to "jobRepository". Nested step + * {@link org.springframework.batch.core.repository.JobRepository} and defaults to "jobRepository". Nested step * elements are delegated to a {@link StepParser}. * * @see AbstractBeanDefinitionParser#parseInternal(Element, ParserContext) @@ -47,7 +45,7 @@ public class JobParser extends AbstractBeanDefinitionParser { @Override protected AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) { - BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(FlowJob.class); + BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition("org.springframework.batch.core.job.flow.FlowJob"); String jobName = element.getAttribute("id"); builder.addConstructorArgValue(jobName); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/JobRepositoryParser.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/JobRepositoryParser.java index 7573c6283..3cb1b0395 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/JobRepositoryParser.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/JobRepositoryParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2008 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ import org.springframework.beans.factory.config.RuntimeBeanReference; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser; import org.springframework.util.StringUtils; + import org.w3c.dom.Element; /** diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/SplitParser.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/SplitParser.java index 3a9098dc9..7dfe14459 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/SplitParser.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/SplitParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2008 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,20 +19,19 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; -import org.springframework.batch.core.job.flow.support.StateTransition; -import org.springframework.batch.core.job.flow.support.state.JobExecutionDecider; -import org.springframework.batch.core.job.flow.support.state.SplitState; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.RuntimeBeanReference; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.support.ManagedList; import org.springframework.beans.factory.xml.ParserContext; import org.springframework.util.xml.DomUtils; + import org.w3c.dom.Element; /** * Internal parser for the <split/> elements inside a job. A split element - * references a bean definition for a {@link JobExecutionDecider} and goes on to + * references a bean definition for a + * {@link org.springframework.batch.core.job.flow.support.state.JobExecutionDecider} and goes on to * list a set of transitions to other states with <next on="pattern" * to="stepName"/>. Used by the {@link JobParser}. * @@ -48,7 +47,8 @@ public class SplitParser { * * @param element the <split/gt; element to parse * @param parserContext the parser context for the bean factory - * @return a collection of bean definitions for {@link StateTransition} + * @return a collection of bean definitions for + * {@link org.springframework.batch.core.job.flow.support.StateTransition} * instances objects */ public Collection parse(Element element, ParserContext parserContext) { @@ -58,7 +58,8 @@ public class SplitParser { @SuppressWarnings("unchecked") List flowElements = (List) DomUtils.getChildElementsByTagName(element, "flow"); - BeanDefinitionBuilder stateBuilder = BeanDefinitionBuilder.genericBeanDefinition(SplitState.class); + BeanDefinitionBuilder stateBuilder = + BeanDefinitionBuilder.genericBeanDefinition("org.springframework.batch.core.job.flow.support.state.SplitState"); Collection flows = new ArrayList(); FlowParser flowParser = new FlowParser();