Interface AttributeDefinitionVisitor


@NoImplement public interface AttributeDefinitionVisitor
An {code AttributeDefinitionVisitor} allows to access an AttributeDefinition configuration.

Depending on the AttributeDefinition configuration a method and only one method of this contract will be invoked.

Since:
4.0
  • Method Details

    • onReferenceObject

      void onReferenceObject(Class<?> objectType)
      Called when the attribute needs to be configured from an object provided by the Mule API.
      Parameters:
      objectType - the expected object type.
    • onReferenceSimpleParameter

      void onReferenceSimpleParameter(String reference)
      Called when the attribute must be configured from another object defined in the configuration.
      Parameters:
      reference - the identifier of an object declared in the configuration.
    • onSoftReferenceSimpleParameter

      void onSoftReferenceSimpleParameter(String softReference)
      Called when the attribute must reference another object defined in the configuration, but the value injected in the attribute holder is the reference as String.
      Parameters:
      softReference - the identifier of an object declared in the configuration.
    • onReferenceFixedParameter

      void onReferenceFixedParameter(String reference)
      Called when the attribute must be configured from another fixed object, from which we have a reference
      Parameters:
      reference - the identifier of an object.
    • onFixedValue

      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.
      Parameters:
      value - the fixed value
    • onConfigurationParameter

      void onConfigurationParameter(String parameterName, Object defaultValue, Optional<TypeConverter> typeConverter)
      Called when the attribute is configured from a simple configuration attribute.
      Parameters:
      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.
    • onReferenceConfigurationParameter

      void onReferenceConfigurationParameter(String parameterName, Object defaultValue, Optional<TypeConverter> typeConverter)
      Called when the attribute is configured from a simple configuration attribute and could reference to a another object defined in the configuration.
      Parameters:
      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.
    • onUndefinedSimpleParameters

      void onUndefinedSimpleParameters()
      Called when the attribute holds all the simple configuration attributes not mapped to any other attribute.
    • onUndefinedComplexParameters

      void onUndefinedComplexParameters()
      Called when the attribute holds all the complex configuration attributes not mapped to any other attribute.
    • onComplexChildCollection

      void onComplexChildCollection(Class<?> type, Optional<String> wrapperIdentifierOptional)
      Called when the attribute is configured from a list of object with a certain type.
      Parameters:
      type - type of the list values to be set in the attribute.
      wrapperIdentifierOptional - the identifier of the wrapper element that holds the list of components
    • onComplexChildMap

      void onComplexChildMap(Class<?> keyType, Class<?> valueType, String wrapperIdentifier)
      Called when the attribute is configured from a map of objects with a certain type.
      Parameters:
      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 components
    • onComplexChild

      void onComplexChild(Class<?> type, Optional<String> wrapperIdentifier, Optional<String> childIdentifier)
      Called when the attribute is configured from an object with a certain type.
      Parameters:
      type - type of the attribute value.
      wrapperIdentifier - the identifier of the component
      childIdentifier -
    • onValueFromTextContent

      void onValueFromTextContent()
      Called when the attribute is configured from the ComponentModel inner configuration.
    • onMultipleValues

      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. The value to be set is a @{code Map} with the KeyAttributeDefinitionPair#getKey() as key and the value is the resolved parameter value or component object.
      Parameters:
      definitions - the set of AttributeDefinition to be used to create