public class BeanDefinitionFactory extends Object
BeanDefinitionFactory is the one that knows how to convert a ComponentModel to an actual
BeanDefinition that can later be converted to a runtime object that will be
part of the artifact.
It will recursively process a ComponentModel to create a BeanDefinition. For the time being it will collaborate
with the old bean definitions parsers for configurations that are partially defined in the new parsing method.
| Modifier and Type | Field and Description |
|---|---|
static String |
CORE_ERROR_NS |
static String |
SOURCE_TYPE |
static String |
SPRING_PROTOTYPE_OBJECT |
static String |
SPRING_SINGLETON_OBJECT |
static String |
TARGET_TYPE |
| Constructor and Description |
|---|
BeanDefinitionFactory(String artifactId,
ComponentBuildingDefinitionRegistry componentBuildingDefinitionRegistry,
org.mule.runtime.api.exception.ErrorTypeRepository errorTypeRepository) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasDefinition(org.mule.runtime.api.component.ComponentIdentifier componentIdentifier)
Used to collaborate with the bean definition parsers mechanism.
|
boolean |
isComponentIgnored(org.mule.runtime.api.component.ComponentIdentifier identifier) |
boolean |
isLanguageConstructComponent(org.mule.runtime.api.component.ComponentIdentifier componentIdentifier) |
static org.mule.runtime.api.component.ComponentIdentifier |
parserErrorType(String representation) |
org.springframework.beans.factory.config.BeanDefinition |
resolveComponentRecursively(SpringComponentModel componentModel,
org.springframework.beans.factory.support.BeanDefinitionRegistry registry,
BiConsumer<ComponentModel,org.springframework.beans.factory.support.BeanDefinitionRegistry> componentModelPostProcessor,
BiFunction<Element,org.springframework.beans.factory.config.BeanDefinition,org.mule.runtime.api.functional.Either<org.springframework.beans.factory.config.BeanDefinition,org.springframework.beans.factory.config.BeanReference>> oldParsingMechanism,
SpringConfigurationComponentLocator componentLocator)
Creates a
BeanDefinition by traversing the ComponentModel and its children. |
static String |
resolveProcessorRepresentation(String appId,
org.mule.runtime.dsl.api.component.config.DefaultComponentLocation processorPath,
org.mule.runtime.ast.api.ComponentMetadataAst metadata)
Generates a representation of a flow element to be logged in a standard way.
|
public static final String SPRING_PROTOTYPE_OBJECT
public static final String SPRING_SINGLETON_OBJECT
public static final String SOURCE_TYPE
public static final String TARGET_TYPE
public static final String CORE_ERROR_NS
public BeanDefinitionFactory(String artifactId, ComponentBuildingDefinitionRegistry componentBuildingDefinitionRegistry, org.mule.runtime.api.exception.ErrorTypeRepository errorTypeRepository)
componentBuildingDefinitionRegistry - a registry with all the known ComponentBuildingDefinitions by the
artifact.errorTypeRepository - public boolean isComponentIgnored(org.mule.runtime.api.component.ComponentIdentifier identifier)
public org.springframework.beans.factory.config.BeanDefinition resolveComponentRecursively(SpringComponentModel componentModel, org.springframework.beans.factory.support.BeanDefinitionRegistry registry, BiConsumer<ComponentModel,org.springframework.beans.factory.support.BeanDefinitionRegistry> componentModelPostProcessor, BiFunction<Element,org.springframework.beans.factory.config.BeanDefinition,org.mule.runtime.api.functional.Either<org.springframework.beans.factory.config.BeanDefinition,org.springframework.beans.factory.config.BeanReference>> oldParsingMechanism, SpringConfigurationComponentLocator componentLocator)
BeanDefinition by traversing the ComponentModel and its children.componentModel - the component model from which we want to create the bean definition.registry - the bean registry since it may be required to get other bean definitions to create this one or to register
the bean definition.componentModelPostProcessor - a function to post process the bean definition.oldParsingMechanism - a function to execute the old parsing mechanism if required by children ComponentModelscomponentLocator - where the locations of any Component's locations must be registeredBeanDefinition of the component model.public static org.mule.runtime.api.component.ComponentIdentifier parserErrorType(String representation)
public static String resolveProcessorRepresentation(String appId, org.mule.runtime.dsl.api.component.config.DefaultComponentLocation processorPath, org.mule.runtime.ast.api.ComponentMetadataAst metadata)
appId - processorPath - element - public boolean hasDefinition(org.mule.runtime.api.component.ComponentIdentifier componentIdentifier)
componentIdentifier - a ComponentModel identifier.ComponentBuildingDefinition for the specified configuration identifier, false if there's
not.public boolean isLanguageConstructComponent(org.mule.runtime.api.component.ComponentIdentifier componentIdentifier)
componentIdentifier - the component identifier to checktrue if the component identifier is one of the current language construct that have specific bean definitions parsers since we don't want to include
them in the parsing API.Copyright © 2003–2020 MuleSoft, Inc.. All rights reserved.