INT-786, added namespace support for metadata-support strategy and tests
This commit is contained in:
@@ -20,6 +20,7 @@ import org.springframework.beans.factory.support.BeanDefinitionReaderUtils;
|
||||
import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.integration.config.xml.AbstractPollingInboundChannelAdapterParser;
|
||||
import org.springframework.integration.config.xml.IntegrationNamespaceUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
/**
|
||||
@@ -40,6 +41,11 @@ public class FeedMessageSourceBeanDefinitionParser extends AbstractPollingInboun
|
||||
BeanDefinitionBuilder.genericBeanDefinition("org.springframework.integration.feed.FeedReaderMessageSource");
|
||||
feedBuilder.addConstructorArgValue(element.getAttribute("feedUrl"));
|
||||
|
||||
String metadataStoreStrategy = element.getAttribute("metadata-store");
|
||||
if (StringUtils.hasText(metadataStoreStrategy)){
|
||||
feedEntryBuilder.addPropertyReference("metadataStore", metadataStoreStrategy);
|
||||
}
|
||||
|
||||
feedEntryBuilder.addConstructorArgValue(feedBuilder.getBeanDefinition());
|
||||
|
||||
return BeanDefinitionReaderUtils.registerWithGeneratedName(feedEntryBuilder.getBeanDefinition(), parserContext.getRegistry());
|
||||
|
||||
@@ -37,6 +37,15 @@
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="metadata-store" use="optional" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:appinfo>
|
||||
<tool:annotation kind="ref">
|
||||
<tool:expected-type type="org.springframework.integration.context.metadata.MetadataStore"/>
|
||||
</tool:annotation>
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="feedUrl" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="persisterMap" type="xsd:string" use="optional">
|
||||
<xsd:annotation>
|
||||
|
||||
Reference in New Issue
Block a user