public class YarnNamespaceUtils
extends java.lang.Object
| Constructor and Description |
|---|
YarnNamespaceUtils() |
| Modifier and Type | Method and Description |
|---|---|
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 BeanComponentDefinition |
parseInnerHandlerDefinition(org.w3c.dom.Element element,
ParserContext parserContext)
Parses inner bean definition from an dom element.
|
static boolean |
setCSVReferenceProperty(org.w3c.dom.Element element,
BeanDefinitionBuilder builder,
java.lang.String attrName,
java.lang.String propertyName)
Sets the reference property as list from a comma delimited string.
|
static void |
setReferenceIfAttributeDefined(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(BeanDefinitionBuilder builder,
org.w3c.dom.Element element,
java.lang.String attributeName,
java.lang.String defaultName)
Configures the provided bean definition builder with a property reference
to a bean.
|
static void |
setReferenceIfAttributeDefined(BeanDefinitionBuilder builder,
org.w3c.dom.Element element,
java.lang.String attributeName,
java.lang.String propertyName,
java.lang.String defaultName)
Configures the provided bean definition builder with a property reference
to a bean.
|
static void |
setValueIfAttributeDefined(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(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(BeanDefinitionBuilder builder,
org.w3c.dom.Element element,
java.lang.String attributeName,
boolean emptyStringAllowed,
java.lang.String defaultPropertyValue)
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,
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(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.
|
static void |
setValueIfAttributeDefined(BeanDefinitionBuilder builder,
org.w3c.dom.Element element,
java.lang.String attributeName,
java.lang.String propertyName,
boolean emptyStringAllowed,
java.lang.String defaultPropertyValue)
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,
org.w3c.dom.Element element,
java.lang.String attributeName,
java.lang.String propertyName,
java.lang.String defaultPropertyValue)
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 void setValueIfAttributeDefined(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(BeanDefinitionBuilder builder, org.w3c.dom.Element element, java.lang.String attributeName, java.lang.String propertyName, java.lang.String defaultPropertyValue)
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 populateddefaultPropertyValue - Property value to use as defaultpublic static void setValueIfAttributeDefined(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(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(BeanDefinitionBuilder builder, org.w3c.dom.Element element, java.lang.String attributeName, java.lang.String propertyName, boolean emptyStringAllowed, java.lang.String defaultPropertyValue)
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.defaultPropertyValue - Property value to use as defaultpublic static void setValueIfAttributeDefined(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 setValueIfAttributeDefined(BeanDefinitionBuilder builder, org.w3c.dom.Element element, java.lang.String attributeName, boolean emptyStringAllowed, java.lang.String defaultPropertyValue)
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.defaultPropertyValue - Property value to use as defaultConventions.attributeNameToPropertyName(String)public static void setReferenceIfAttributeDefined(BeanDefinitionBuilder builder, org.w3c.dom.Element element, java.lang.String attributeName, java.lang.String propertyName, java.lang.String defaultName)
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 propertydefaultName - the default bean reference name to usepropertyName - the name of the property to be populatedpublic static void setReferenceIfAttributeDefined(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(BeanDefinitionBuilder builder, org.w3c.dom.Element element, java.lang.String attributeName, java.lang.String defaultName)
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 propertydefaultName - the default bean reference name to useConventions.attributeNameToPropertyName(String),
Conventions.attributeNameToPropertyName(String)public static BeanComponentDefinition parseInnerHandlerDefinition(org.w3c.dom.Element element, ParserContext parserContext)
element - the dom elementparserContext - the parser contextpublic static java.lang.String createElementDescription(org.w3c.dom.Element element)
element - the dom elementpublic static boolean setCSVReferenceProperty(org.w3c.dom.Element element,
BeanDefinitionBuilder builder,
java.lang.String attrName,
java.lang.String propertyName)
element - the elementbuilder - the builderattrName - the attr namepropertyName - the property name