resolves INT-577 by adding namespace support for setting of default output channel

This commit is contained in:
Jonas Partner
2009-02-19 10:08:55 +00:00
parent de0a85b31a
commit 59ed94a3da
3 changed files with 35 additions and 1 deletions

View File

@@ -54,6 +54,7 @@ public class XPathRouterParser extends AbstractConsumerEndpointParser {
String xPathExpressionRef = element.getAttribute("xpath-expression-ref");
String channelResolver = element.getAttribute("channel-resolver");
String resolutionRequired = element.getAttribute("resolution-required");
String defaultOutputChannel = element.getAttribute("default-output-channel");
NodeList xPathExpressionNodes = element.getElementsByTagNameNS(
element.getNamespaceURI(), "xpath-expression");
@@ -87,6 +88,9 @@ public class XPathRouterParser extends AbstractConsumerEndpointParser {
builder.addPropertyReference("channelResolver", channelResolver);
}
if(StringUtils.hasText(defaultOutputChannel)){
builder.addPropertyReference("defaultOutputChannel", defaultOutputChannel);
}
return builder;
}

View File

@@ -189,6 +189,16 @@
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="resolution-required" type="xsd:boolean" use="optional"/>
<xsd:attribute name="default-output-channel" type="xsd:string">
<xsd:annotation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type
type="org.springframework.integration.core.MessageChannel" />
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
</xsd:element>