From f285f5ffe06065ec8c880cf739f8f005206a2674 Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Thu, 2 Jul 2009 00:49:38 +0000 Subject: [PATCH] INT-697 Adjusted schema for recipient-list-router attributes. --- .../config/xml/RecipientListRouterParser.java | 8 +++--- .../config/xml/spring-integration-1.0.xsd | 27 ++++++++++++------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/config/xml/RecipientListRouterParser.java b/org.springframework.integration/src/main/java/org/springframework/integration/config/xml/RecipientListRouterParser.java index 4f8c67167c..af8bad0ca8 100644 --- a/org.springframework.integration/src/main/java/org/springframework/integration/config/xml/RecipientListRouterParser.java +++ b/org.springframework.integration/src/main/java/org/springframework/integration/config/xml/RecipientListRouterParser.java @@ -13,17 +13,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.springframework.integration.config.xml; import java.util.List; +import org.w3c.dom.Element; + 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.Assert; import org.springframework.util.xml.DomUtils; -import org.w3c.dom.Element; /** * Parser for the <recipient-list-router/> element. @@ -34,13 +36,13 @@ import org.w3c.dom.Element; public class RecipientListRouterParser extends AbstractConsumerEndpointParser { @Override + @SuppressWarnings("unchecked") protected BeanDefinitionBuilder parseHandler(Element element, ParserContext parserContext) { BeanDefinitionBuilder recipientListRouterBuilder = BeanDefinitionBuilder.genericBeanDefinition( IntegrationNamespaceUtils.BASE_PACKAGE + ".router.RecipientListRouter"); List childElements = DomUtils.getChildElementsByTagName(element, "recipient"); Assert.notEmpty(childElements, - "Recipient channel(s) must be defined (e.g., )"); - + "At least one recipient channel must be defined (e.g., )."); ManagedList channelList = new ManagedList(); for (Element childElement : childElements) { channelList.add(new RuntimeBeanReference(childElement.getAttribute("channel"))); diff --git a/org.springframework.integration/src/main/resources/org/springframework/integration/config/xml/spring-integration-1.0.xsd b/org.springframework.integration/src/main/resources/org/springframework/integration/config/xml/spring-integration-1.0.xsd index 37f646489a..53eba8384c 100644 --- a/org.springframework.integration/src/main/resources/org/springframework/integration/config/xml/spring-integration-1.0.xsd +++ b/org.springframework.integration/src/main/resources/org/springframework/integration/config/xml/spring-integration-1.0.xsd @@ -863,7 +863,7 @@ - + @@ -892,7 +892,7 @@ - + @@ -900,6 +900,8 @@ + + @@ -914,7 +916,7 @@ - + @@ -937,7 +939,7 @@ - + @@ -968,12 +970,11 @@ - - + - + @@ -984,10 +985,16 @@ - - + + + + + + + + +