From ffdde36b1bec09019fb8be729a0931ad2d69eb99 Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Wed, 27 Oct 2010 10:33:49 -0400 Subject: [PATCH] INT-786 renamed 'feed-url' attribute to just 'url' since it's already clear that it's the FEED adapter --- ...FeedMessageSourceBeanDefinitionParser.java | 2 +- .../feed/config/FeedNamespaceHandler.java | 18 +-- .../config/spring-integration-feed-2.0.xsd | 111 +++++++++--------- ...BeanDefinitionParserTests-file-context.xml | 2 +- ...finitionParserTests-file-usage-context.xml | 2 +- ...ionParserTests-file-usage-noid-context.xml | 2 +- ...BeanDefinitionParserTests-http-context.xml | 5 +- 7 files changed, 71 insertions(+), 71 deletions(-) diff --git a/spring-integration-feed/src/main/java/org/springframework/integration/feed/config/FeedMessageSourceBeanDefinitionParser.java b/spring-integration-feed/src/main/java/org/springframework/integration/feed/config/FeedMessageSourceBeanDefinitionParser.java index 5b5364a569..70896e92d7 100644 --- a/spring-integration-feed/src/main/java/org/springframework/integration/feed/config/FeedMessageSourceBeanDefinitionParser.java +++ b/spring-integration-feed/src/main/java/org/springframework/integration/feed/config/FeedMessageSourceBeanDefinitionParser.java @@ -39,7 +39,7 @@ public class FeedMessageSourceBeanDefinitionParser extends AbstractPollingInboun "org.springframework.integration.feed.FeedEntryReaderMessageSource"); BeanDefinitionBuilder feedBuilder = BeanDefinitionBuilder.genericBeanDefinition( "org.springframework.integration.feed.FeedReaderMessageSource"); - feedBuilder.addConstructorArgValue(element.getAttribute("feed-url")); + feedBuilder.addConstructorArgValue(element.getAttribute("url")); IntegrationNamespaceUtils.setReferenceIfAttributeDefined(feedEntryBuilder, element, "metadata-store"); feedEntryBuilder.addConstructorArgValue(feedBuilder.getBeanDefinition()); return BeanDefinitionReaderUtils.registerWithGeneratedName(feedEntryBuilder.getBeanDefinition(), parserContext.getRegistry()); diff --git a/spring-integration-feed/src/main/java/org/springframework/integration/feed/config/FeedNamespaceHandler.java b/spring-integration-feed/src/main/java/org/springframework/integration/feed/config/FeedNamespaceHandler.java index 5ffa3ba54d..0f28fe5f45 100644 --- a/spring-integration-feed/src/main/java/org/springframework/integration/feed/config/FeedNamespaceHandler.java +++ b/spring-integration-feed/src/main/java/org/springframework/integration/feed/config/FeedNamespaceHandler.java @@ -13,19 +13,21 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.springframework.integration.feed.config; -import org.springframework.beans.factory.xml.NamespaceHandlerSupport; - +import org.springframework.integration.config.xml.AbstractIntegrationNamespaceHandler; /** - * NamespaceHandler for FEED module + * NamespaceHandler for the feed module. * * @author Josh Long + * @since 2.0 */ -public class FeedNamespaceHandler extends NamespaceHandlerSupport { +public class FeedNamespaceHandler extends AbstractIntegrationNamespaceHandler { - public void init() { - registerBeanDefinitionParser("inbound-channel-adapter", new FeedMessageSourceBeanDefinitionParser()); - } -} \ No newline at end of file + public void init() { + registerBeanDefinitionParser("inbound-channel-adapter", new FeedMessageSourceBeanDefinitionParser()); + } + +} diff --git a/spring-integration-feed/src/main/resources/org/springframework/integration/feed/config/spring-integration-feed-2.0.xsd b/spring-integration-feed/src/main/resources/org/springframework/integration/feed/config/spring-integration-feed-2.0.xsd index c9aa79a62c..5ec2708ded 100644 --- a/spring-integration-feed/src/main/resources/org/springframework/integration/feed/config/spring-integration-feed-2.0.xsd +++ b/spring-integration-feed/src/main/resources/org/springframework/integration/feed/config/spring-integration-feed-2.0.xsd @@ -1,64 +1,61 @@ + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:beans="http://www.springframework.org/schema/beans" + xmlns:tool="http://www.springframework.org/schema/tool" + xmlns:integration="http://www.springframework.org/schema/integration" + targetNamespace="http://www.springframework.org/schema/integration/feed" + elementFormDefault="qualified" attributeFormDefault="unqualified"> - - + + - - - SyndFeed or SyndEntry objects. - - ]]> - - - - - - - - - - - - - - - - - - - - Allows you to provide cusom implementation of 'org.springframework.integration.context.metadata.MetadataStore' - to persist the state of the retrieved feeds to aviod duplicates between restarts. - - - - - - - - - - - - Allows you to specify URL for RSS/ATOM feed + + + + + + + + + + + + + The URL for an RSS or ATOM feed. - - - - - + + + + + + + + + + + + + + + Reference to a MetadataStore instance for storing metadata associated with + the retrieved feeds. If the implementation is persistent, it can help to + prevent duplicates between restarts. If shared, it can help coordinate multiple + instances of an adapter across different processes. + + + + + + + + + + + \ No newline at end of file diff --git a/spring-integration-feed/src/test/java/org/springframework/integration/feed/config/FeedMessageSourceBeanDefinitionParserTests-file-context.xml b/spring-integration-feed/src/test/java/org/springframework/integration/feed/config/FeedMessageSourceBeanDefinitionParserTests-file-context.xml index c832a3ac07..2403d1d3e0 100644 --- a/spring-integration-feed/src/test/java/org/springframework/integration/feed/config/FeedMessageSourceBeanDefinitionParserTests-file-context.xml +++ b/spring-integration-feed/src/test/java/org/springframework/integration/feed/config/FeedMessageSourceBeanDefinitionParserTests-file-context.xml @@ -10,7 +10,7 @@ channel="feedChannel" auto-startup="false" metadata-store="customMetadataStore" - feed-url="file:src/test/java/org/springframework/integration/feed/config/sample.rss"> + url="file:src/test/java/org/springframework/integration/feed/config/sample.rss"> diff --git a/spring-integration-feed/src/test/java/org/springframework/integration/feed/config/FeedMessageSourceBeanDefinitionParserTests-file-usage-context.xml b/spring-integration-feed/src/test/java/org/springframework/integration/feed/config/FeedMessageSourceBeanDefinitionParserTests-file-usage-context.xml index 041b88a519..f8c51488c4 100644 --- a/spring-integration-feed/src/test/java/org/springframework/integration/feed/config/FeedMessageSourceBeanDefinitionParserTests-file-usage-context.xml +++ b/spring-integration-feed/src/test/java/org/springframework/integration/feed/config/FeedMessageSourceBeanDefinitionParserTests-file-usage-context.xml @@ -10,7 +10,7 @@ + url="file:src/test/java/org/springframework/integration/feed/config/sample.rss"> diff --git a/spring-integration-feed/src/test/java/org/springframework/integration/feed/config/FeedMessageSourceBeanDefinitionParserTests-file-usage-noid-context.xml b/spring-integration-feed/src/test/java/org/springframework/integration/feed/config/FeedMessageSourceBeanDefinitionParserTests-file-usage-noid-context.xml index 34bc76beb8..c084ff58b0 100644 --- a/spring-integration-feed/src/test/java/org/springframework/integration/feed/config/FeedMessageSourceBeanDefinitionParserTests-file-usage-noid-context.xml +++ b/spring-integration-feed/src/test/java/org/springframework/integration/feed/config/FeedMessageSourceBeanDefinitionParserTests-file-usage-noid-context.xml @@ -7,7 +7,7 @@ http://www.springframework.org/schema/integration/feed http://www.springframework.org/schema/integration/feed/spring-integration-feed-2.0.xsd"> + url="file:src/test/java/org/springframework/integration/feed/config/sample.rss"> diff --git a/spring-integration-feed/src/test/java/org/springframework/integration/feed/config/FeedMessageSourceBeanDefinitionParserTests-http-context.xml b/spring-integration-feed/src/test/java/org/springframework/integration/feed/config/FeedMessageSourceBeanDefinitionParserTests-http-context.xml index 3e1597b65a..f4603931ab 100644 --- a/spring-integration-feed/src/test/java/org/springframework/integration/feed/config/FeedMessageSourceBeanDefinitionParserTests-http-context.xml +++ b/spring-integration-feed/src/test/java/org/springframework/integration/feed/config/FeedMessageSourceBeanDefinitionParserTests-http-context.xml @@ -8,10 +8,11 @@ + url="http://feeds.bbci.co.uk/news/rss.xml" + auto-startup="false"> + \ No newline at end of file