public abstract class IntegrationNamespaceUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AUTO_STARTUP |
static java.lang.String |
BASE_PACKAGE |
static java.lang.String |
EXPRESSION_ATTRIBUTE |
static java.lang.String |
HANDLER_ALIAS_SUFFIX |
static java.lang.String |
METHOD_ATTRIBUTE |
static java.lang.String |
ORDER |
static java.lang.String |
PHASE |
static java.lang.String |
REF_ATTRIBUTE |
static java.lang.String |
REQUEST_HANDLER_ADVICE_CHAIN |
Constructor and Description |
---|
IntegrationNamespaceUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
autoCreateDirectChannel(java.lang.String channelName,
org.springframework.beans.factory.support.BeanDefinitionRegistry registry) |
static org.springframework.beans.factory.support.ManagedList |
configureAdviceChain(org.w3c.dom.Element adviceChainElement,
org.w3c.dom.Element txElement,
org.springframework.beans.factory.config.BeanDefinition parentBeanDefinition,
org.springframework.beans.factory.xml.ParserContext parserContext) |
static void |
configureAndSetAdviceChainIfPresent(org.w3c.dom.Element adviceChainElement,
org.w3c.dom.Element txElement,
org.springframework.beans.factory.config.BeanDefinition parentBeanDefinition,
org.springframework.beans.factory.xml.ParserContext parserContext) |
static void |
configureAndSetAdviceChainIfPresent(org.w3c.dom.Element adviceChainElement,
org.w3c.dom.Element txElement,
org.springframework.beans.factory.config.BeanDefinition parentBeanDefinition,
org.springframework.beans.factory.xml.ParserContext parserContext,
java.lang.String propertyName) |
static void |
configureHeaderMapper(org.w3c.dom.Element element,
org.springframework.beans.factory.support.BeanDefinitionBuilder rootBuilder,
org.springframework.beans.factory.xml.ParserContext parserContext,
java.lang.Class<?> headerMapperClass,
java.lang.String replyHeaderValue)
Utility method to configure HeaderMapper for Inbound and Outbound channel adapters/gateway
|
static void |
configurePollerMetadata(org.w3c.dom.Element pollerElement,
org.springframework.beans.factory.support.BeanDefinitionBuilder targetBuilder,
org.springframework.beans.factory.xml.ParserContext parserContext)
Parse a "poller" element to provide a reference for the target BeanDefinitionBuilder.
|
static org.springframework.beans.factory.config.BeanDefinition |
configureTransactionAttributes(org.w3c.dom.Element txElement)
Parse a "transactional" element and configure a
TransactionInterceptor
with "transactionManager" and other "transactionDefinition" properties. |
static org.springframework.beans.factory.config.BeanDefinition |
configureTransactionDefinition(org.w3c.dom.Element txElement)
Parse attributes of "transactional" element and configure a
DefaultTransactionAttribute
with provided "transactionDefinition" properties. |
static java.lang.String |
createDirectChannel(org.w3c.dom.Element element,
org.springframework.beans.factory.xml.ParserContext parserContext) |
static java.lang.String |
createElementDescription(org.w3c.dom.Element element)
Provides a user friendly description of an element based on its node name and, if available, its "id" attribute
value.
|
static org.springframework.beans.factory.config.BeanDefinition |
createExpressionDefIfAttributeDefined(java.lang.String expressionElementName,
org.w3c.dom.Element element) |
static org.springframework.beans.factory.config.BeanDefinition |
createExpressionDefinitionFromValueOrExpression(java.lang.String valueElementName,
java.lang.String expressionElementName,
org.springframework.beans.factory.xml.ParserContext parserContext,
org.w3c.dom.Element element,
boolean oneRequired) |
static java.lang.String[] |
generateAlias(org.w3c.dom.Element element) |
static java.lang.String |
getTextFromAttributeOrNestedElement(org.w3c.dom.Element element,
java.lang.String name,
org.springframework.beans.factory.xml.ParserContext parserContext)
Get a text value from a named attribute if it exists, otherwise check for a nested element of the same name.
|
static org.springframework.beans.factory.parsing.BeanComponentDefinition |
parseInnerHandlerDefinition(org.w3c.dom.Element element,
org.springframework.beans.factory.xml.ParserContext parserContext) |
static void |
registerSpelFunctionBean(org.springframework.beans.factory.support.BeanDefinitionRegistry registry,
java.lang.String functionId,
java.lang.String className,
java.lang.String methodSignature) |
static void |
setReferenceIfAttributeDefined(org.springframework.beans.factory.support.BeanDefinitionBuilder builder,
org.w3c.dom.Element element,
java.lang.String attributeName)
Configures the provided bean definition builder with a property reference to a bean.
|
static void |
setReferenceIfAttributeDefined(org.springframework.beans.factory.support.BeanDefinitionBuilder builder,
org.w3c.dom.Element element,
java.lang.String attributeName,
boolean emptyStringAllowed) |
static void |
setReferenceIfAttributeDefined(org.springframework.beans.factory.support.BeanDefinitionBuilder builder,
org.w3c.dom.Element element,
java.lang.String attributeName,
java.lang.String propertyName)
Configures the provided bean definition builder with a property reference to a bean.
|
static void |
setReferenceIfAttributeDefined(org.springframework.beans.factory.support.BeanDefinitionBuilder builder,
org.w3c.dom.Element element,
java.lang.String attributeName,
java.lang.String propertyName,
boolean emptyStringAllowed) |
static void |
setValueIfAttributeDefined(org.springframework.beans.factory.support.BeanDefinitionBuilder builder,
org.w3c.dom.Element element,
java.lang.String attributeName)
Configures the provided bean definition builder with a property value corresponding to the attribute whose name
is provided if that attribute is defined in the given element.
|
static void |
setValueIfAttributeDefined(org.springframework.beans.factory.support.BeanDefinitionBuilder builder,
org.w3c.dom.Element element,
java.lang.String attributeName,
boolean emptyStringAllowed)
Configures the provided bean definition builder with a property value corresponding to the attribute whose name
is provided if that attribute is defined in the given element.
|
static void |
setValueIfAttributeDefined(org.springframework.beans.factory.support.BeanDefinitionBuilder builder,
org.w3c.dom.Element element,
java.lang.String attributeName,
java.lang.String propertyName)
Configures the provided bean definition builder with a property value corresponding to the attribute whose name
is provided if that attribute is defined in the given element.
|
static void |
setValueIfAttributeDefined(org.springframework.beans.factory.support.BeanDefinitionBuilder builder,
org.w3c.dom.Element element,
java.lang.String attributeName,
java.lang.String propertyName,
boolean emptyStringAllowed)
Configures the provided bean definition builder with a property value corresponding to the attribute whose name
is provided if that attribute is defined in the given element.
|
public static final java.lang.String BASE_PACKAGE
public static final java.lang.String REF_ATTRIBUTE
public static final java.lang.String METHOD_ATTRIBUTE
public static final java.lang.String ORDER
public static final java.lang.String EXPRESSION_ATTRIBUTE
public static final java.lang.String HANDLER_ALIAS_SUFFIX
public static final java.lang.String REQUEST_HANDLER_ADVICE_CHAIN
public static final java.lang.String AUTO_STARTUP
public static final java.lang.String PHASE
public static void setValueIfAttributeDefined(org.springframework.beans.factory.support.BeanDefinitionBuilder builder, org.w3c.dom.Element element, java.lang.String attributeName, java.lang.String propertyName)
builder
- the bean definition builder to be configuredelement
- the XML element where the attribute should be definedattributeName
- the name of the attribute whose value will be used to populate the propertypropertyName
- the name of the property to be populatedpublic static void setValueIfAttributeDefined(org.springframework.beans.factory.support.BeanDefinitionBuilder builder, org.w3c.dom.Element element, java.lang.String attributeName)
The property name will be the camel-case equivalent of the lower case hyphen separated attribute (e.g. the "foo-bar" attribute would match the "fooBar" property).
builder
- the bean definition builder to be configuredelement
- - the XML element where the attribute should be definedattributeName
- - the name of the attribute whose value will be set on the propertyConventions.attributeNameToPropertyName(String)
public static void setValueIfAttributeDefined(org.springframework.beans.factory.support.BeanDefinitionBuilder builder, org.w3c.dom.Element element, java.lang.String attributeName, java.lang.String propertyName, boolean emptyStringAllowed)
builder
- the bean definition builder to be configuredelement
- the XML element where the attribute should be definedattributeName
- the name of the attribute whose value will be used to populate the propertypropertyName
- the name of the property to be populatedemptyStringAllowed
- - if true, the value is set, even if an empty String (""); if false, an empty
String is treated as if the attribute wasn't provided.public static void setValueIfAttributeDefined(org.springframework.beans.factory.support.BeanDefinitionBuilder builder, org.w3c.dom.Element element, java.lang.String attributeName, boolean emptyStringAllowed)
The property name will be the camel-case equivalent of the lower case hyphen separated attribute (e.g. the "foo-bar" attribute would match the "fooBar" property).
builder
- the bean definition builder to be configuredelement
- - the XML element where the attribute should be definedattributeName
- - the name of the attribute whose value will be set on the propertyemptyStringAllowed
- - if true, the value is set, even if an empty String (""); if false, an empty
String is treated as if the attribute wasn't provided.Conventions.attributeNameToPropertyName(String)
public static void setReferenceIfAttributeDefined(org.springframework.beans.factory.support.BeanDefinitionBuilder builder, org.w3c.dom.Element element, java.lang.String attributeName, java.lang.String propertyName)
builder
- the bean definition builder to be configuredelement
- the XML element where the attribute should be definedattributeName
- the name of the attribute whose value will be used as a bean reference to populate the
propertypropertyName
- the name of the property to be populatedpublic static void setReferenceIfAttributeDefined(org.springframework.beans.factory.support.BeanDefinitionBuilder builder, org.w3c.dom.Element element, java.lang.String attributeName, java.lang.String propertyName, boolean emptyStringAllowed)
public static void setReferenceIfAttributeDefined(org.springframework.beans.factory.support.BeanDefinitionBuilder builder, org.w3c.dom.Element element, java.lang.String attributeName)
The property name will be the camel-case equivalent of the lower case hyphen separated attribute (e.g. the "foo-bar" attribute would match the "fooBar" property).
builder
- the bean definition builder to be configuredelement
- - the XML element where the attribute should be definedattributeName
- - the name of the attribute whose value will be used as a bean reference to populate the
propertyConventions.attributeNameToPropertyName(String)
,
Conventions.attributeNameToPropertyName(String)
public static void setReferenceIfAttributeDefined(org.springframework.beans.factory.support.BeanDefinitionBuilder builder, org.w3c.dom.Element element, java.lang.String attributeName, boolean emptyStringAllowed)
public static java.lang.String createElementDescription(org.w3c.dom.Element element)
public static void configurePollerMetadata(org.w3c.dom.Element pollerElement, org.springframework.beans.factory.support.BeanDefinitionBuilder targetBuilder, org.springframework.beans.factory.xml.ParserContext parserContext)
pollerElement
- the "poller" element to parsetargetBuilder
- the builder that expects the "trigger" propertyparserContext
- the parserContext for the target builderpublic static java.lang.String getTextFromAttributeOrNestedElement(org.w3c.dom.Element element, java.lang.String name, org.springframework.beans.factory.xml.ParserContext parserContext)
element
- a DOM nodename
- the name of the property (attribute or child element)parserContext
- the current contextpublic static org.springframework.beans.factory.parsing.BeanComponentDefinition parseInnerHandlerDefinition(org.w3c.dom.Element element, org.springframework.beans.factory.xml.ParserContext parserContext)
public static void configureHeaderMapper(org.w3c.dom.Element element, org.springframework.beans.factory.support.BeanDefinitionBuilder rootBuilder, org.springframework.beans.factory.xml.ParserContext parserContext, java.lang.Class<?> headerMapperClass, java.lang.String replyHeaderValue)
public static org.springframework.beans.factory.config.BeanDefinition configureTransactionAttributes(org.w3c.dom.Element txElement)
TransactionInterceptor
with "transactionManager" and other "transactionDefinition" properties.
For example, this advisor will be applied on the Polling Task proxyAbstractPollingEndpoint
public static org.springframework.beans.factory.config.BeanDefinition configureTransactionDefinition(org.w3c.dom.Element txElement)
DefaultTransactionAttribute
with provided "transactionDefinition" properties.public static java.lang.String[] generateAlias(org.w3c.dom.Element element)
public static void configureAndSetAdviceChainIfPresent(org.w3c.dom.Element adviceChainElement, org.w3c.dom.Element txElement, org.springframework.beans.factory.config.BeanDefinition parentBeanDefinition, org.springframework.beans.factory.xml.ParserContext parserContext)
public static void configureAndSetAdviceChainIfPresent(org.w3c.dom.Element adviceChainElement, org.w3c.dom.Element txElement, org.springframework.beans.factory.config.BeanDefinition parentBeanDefinition, org.springframework.beans.factory.xml.ParserContext parserContext, java.lang.String propertyName)
public static org.springframework.beans.factory.support.ManagedList configureAdviceChain(org.w3c.dom.Element adviceChainElement, org.w3c.dom.Element txElement, org.springframework.beans.factory.config.BeanDefinition parentBeanDefinition, org.springframework.beans.factory.xml.ParserContext parserContext)
public static org.springframework.beans.factory.config.BeanDefinition createExpressionDefinitionFromValueOrExpression(java.lang.String valueElementName, java.lang.String expressionElementName, org.springframework.beans.factory.xml.ParserContext parserContext, org.w3c.dom.Element element, boolean oneRequired)
public static void registerSpelFunctionBean(org.springframework.beans.factory.support.BeanDefinitionRegistry registry, java.lang.String functionId, java.lang.String className, java.lang.String methodSignature)
public static org.springframework.beans.factory.config.BeanDefinition createExpressionDefIfAttributeDefined(java.lang.String expressionElementName, org.w3c.dom.Element element)
public static java.lang.String createDirectChannel(org.w3c.dom.Element element, org.springframework.beans.factory.xml.ParserContext parserContext)
public static void autoCreateDirectChannel(java.lang.String channelName, org.springframework.beans.factory.support.BeanDefinitionRegistry registry)