@NoImplement public interface AttributeDefinitionVisitor
AttributeDefinition
configuration.
Depending on the AttributeDefinition
configuration a method and only one method
of this contract will be invoked.
Modifier and Type | Method and Description |
---|---|
void |
onComplexChild(Class<?> type,
Optional<String> wrapperIdentifier,
Optional<String> childIdentifier)
Called when the attribute is configured from an object with a certain type.
|
void |
onComplexChildCollection(Class<?> type,
Optional<String> wrapperIdentifierOptional)
Called when the attribute is configured from a list of object with a certain type.
|
void |
onComplexChildMap(Class<?> keyType,
Class<?> valueType,
String wrapperIdentifier)
Called when the attribute is configured from a map of objects with a certain type.
|
void |
onConfigurationParameter(String parameterName,
Object defaultValue,
Optional<TypeConverter> typeConverter)
Called when the attribute is configured from a simple configuration attribute.
|
void |
onFixedValue(Object value)
To be called when the value to be set when building the object is fixed and provided by the definition of the
ComponentBuildingDefinition . |
void |
onMultipleValues(KeyAttributeDefinitionPair[] definitions)
Called when a multiple configuration parameters or children components objects need to be set in single object attribute or
constructor parameter.
|
void |
onReferenceFixedParameter(String reference)
Called when the attribute must be configured from another fixed object, from which we have a reference
|
void |
onReferenceObject(Class<?> objectType)
Called when the attribute needs to be configured from an object provided by the Mule API.
|
void |
onReferenceSimpleParameter(String reference)
Called when the attribute must be configured from another object defined in the configuration.
|
void |
onUndefinedComplexParameters()
Called when the attribute holds all the complex configuration attributes not mapped to any other attribute.
|
void |
onUndefinedSimpleParameters()
Called when the attribute holds all the simple configuration attributes not mapped to any other attribute.
|
void |
onValueFromTextContent()
Called when the attribute is configured from the
ComponentModel inner configuration. |
void onReferenceObject(Class<?> objectType)
objectType
- the expected object type.void onReferenceSimpleParameter(String reference)
reference
- the identifier of an object declared in the configuration.void onReferenceFixedParameter(String reference)
reference
- the identifier of an object.void onFixedValue(Object value)
ComponentBuildingDefinition
.value
- the fixed valuevoid onConfigurationParameter(String parameterName, Object defaultValue, Optional<TypeConverter> typeConverter)
parameterName
- configuration parameter name.defaultValue
- default value for the configuration parameter if it has not value.typeConverter
- a value converter to convert from the value provided by the config to the value required of the
attribute.void onUndefinedSimpleParameters()
void onUndefinedComplexParameters()
void onComplexChildCollection(Class<?> type, Optional<String> wrapperIdentifierOptional)
type
- type of the list values to be set in the attribute.wrapperIdentifierOptional
- the identifier of the wrapper element that holds the list of componentsvoid onComplexChildMap(Class<?> keyType, Class<?> valueType, String wrapperIdentifier)
keyType
- type of the map key to be set in the attribute.valueType
- type of the map value to be set in the attribute.wrapperIdentifier
- the identifier of the wrapper element that holds the list of componentsvoid onComplexChild(Class<?> type, Optional<String> wrapperIdentifier, Optional<String> childIdentifier)
type
- type of the attribute value.wrapperIdentifier
- the identifier of the componentchildIdentifier
- void onValueFromTextContent()
ComponentModel
inner configuration.void onMultipleValues(KeyAttributeDefinitionPair[] definitions)
KeyAttributeDefinitionPair#getKey()
as key and
the value is the resolved parameter value or component object.definitions
- the set of AttributeDefinition
to be used to createCopyright © 2018. All rights reserved.