INT-3124 JMX Check Mutually Exclusive Attributes
Only one of query-name and query-name-ref Only one of query-expression and query-expression-ref
This commit is contained in:
@@ -53,6 +53,14 @@ public class MBeanTreePollingChannelAdapterParser extends AbstractPollingInbound
|
||||
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "query-name", "queryName");
|
||||
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "query-expression", "queryExpression");
|
||||
|
||||
if (StringUtils.hasText(element.getAttribute("query-name"))
|
||||
&& StringUtils.hasText(element.getAttribute("query-name-ref"))) {
|
||||
parserContext.getReaderContext().error("Cannot have both `query-name' and 'query-name-ref'", element);
|
||||
}
|
||||
if (StringUtils.hasText(element.getAttribute("query-expression"))
|
||||
&& StringUtils.hasText(element.getAttribute("query-expression-ref"))) {
|
||||
parserContext.getReaderContext().error("Cannot have both `query-expression' and 'query-expression-ref'", element);
|
||||
}
|
||||
BeanComponentDefinition innerBeanDef = IntegrationNamespaceUtils.parseInnerHandlerDefinition(element, parserContext);
|
||||
String beanName = element.getAttribute("converter");
|
||||
|
||||
|
||||
@@ -223,14 +223,16 @@
|
||||
<xsd:attribute name="query-name" type="xsd:string" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A string to be parsed into an ObjectName object
|
||||
A string to be parsed into an ObjectName object. If this
|
||||
attribute is specified you cannot specify `query-name-ref`.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="query-name-ref" type="xsd:string" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A reference to an ObjectName instance
|
||||
A reference to an ObjectName instance. If this
|
||||
attribute is specified you cannot specify `query-name`.
|
||||
</xsd:documentation>
|
||||
<xsd:appinfo>
|
||||
<tool:annotation>
|
||||
@@ -242,14 +244,16 @@
|
||||
<xsd:attribute name="query-expression" type="xsd:string" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A string to be parsed into a QueryExp object
|
||||
A string to be parsed into a QueryExp object. If this
|
||||
attribute is specified you cannot specify `query-expression-ref`.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="query-expression-ref" type="xsd:string" use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
A reference to a QueryExp instance
|
||||
A reference to a QueryExp instance. If this
|
||||
attribute is specified you cannot specify `query-expression`.
|
||||
</xsd:documentation>
|
||||
<xsd:appinfo>
|
||||
<tool:annotation>
|
||||
|
||||
Reference in New Issue
Block a user