|
Spring Integration | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.integration.config.xml.IntegrationNamespaceUtils
public abstract class IntegrationNamespaceUtils
Shared utility methods for integration namespace parsers.
Constructor Summary | |
---|---|
IntegrationNamespaceUtils()
|
Method Summary | |
---|---|
static void |
configurePollerMetadata(Element pollerElement,
BeanDefinitionBuilder targetBuilder,
ParserContext parserContext)
Parse a "poller" element to provide a reference for the target BeanDefinitionBuilder. |
static String |
createElementDescription(Element element)
Provides a user friendly description of an element based on its node name and, if available, its "id" attribute value. |
static String |
getTextFromAttributeOrNestedElement(Element element,
String name,
ParserContext parserContext)
Get a text value from a named attribute if it exists, otherwise check for a nested element of the same name. |
static BeanComponentDefinition |
parseInnerHandlerDefinition(Element element,
ParserContext parserContext)
|
static void |
setReferenceIfAttributeDefined(BeanDefinitionBuilder builder,
Element element,
String attributeName)
Configures the provided bean definition builder with a property reference to a bean. |
static void |
setReferenceIfAttributeDefined(BeanDefinitionBuilder builder,
Element element,
String attributeName,
String propertyName)
Configures the provided bean definition builder with a property reference to a bean. |
static void |
setValueIfAttributeDefined(BeanDefinitionBuilder builder,
Element element,
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(BeanDefinitionBuilder builder,
Element element,
String attributeName,
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IntegrationNamespaceUtils()
Method Detail |
---|
public static void setValueIfAttributeDefined(BeanDefinitionBuilder builder, Element element, String attributeName, 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(BeanDefinitionBuilder builder, Element element, 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 setReferenceIfAttributeDefined(BeanDefinitionBuilder builder, Element element, String attributeName, 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(BeanDefinitionBuilder builder, Element element, 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 String createElementDescription(Element element)
public static void configurePollerMetadata(Element pollerElement, BeanDefinitionBuilder targetBuilder, ParserContext parserContext)
pollerElement
- the "poller" element to parsetargetBuilder
- the builder that expects the "trigger" propertyparserContext
- the parserContext for the target builderpublic static String getTextFromAttributeOrNestedElement(Element element, String name, ParserContext parserContext)
element
- a DOM nodename
- the name of the property (attribute or child element)parserContext
- the current context
public static BeanComponentDefinition parseInnerHandlerDefinition(Element element, ParserContext parserContext)
|
Spring Integration | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |