Search in sources :

Example 1 with ComponentBuildingDefinition

use of org.mule.runtime.dsl.api.component.ComponentBuildingDefinition in project mule by mulesoft.

the class BeanDefinitionFactory method getWrapperIdentifierAndTypeMap.

private <T> Map<String, WrapperElementType> getWrapperIdentifierAndTypeMap(ComponentBuildingDefinition<T> buildingDefinition) {
    final Map<String, WrapperElementType> wrapperIdentifierAndTypeMap = new HashMap<>();
    AbstractAttributeDefinitionVisitor wrapperIdentifiersCollector = new AbstractAttributeDefinitionVisitor() {

        @Override
        public void onComplexChildCollection(Class<?> type, Optional<String> wrapperIdentifierOptional) {
            wrapperIdentifierOptional.ifPresent(wrapperIdentifier -> wrapperIdentifierAndTypeMap.put(wrapperIdentifier, COLLECTION));
        }

        @Override
        public void onComplexChild(Class<?> type, Optional<String> wrapperIdentifierOptional, Optional<String> childIdentifier) {
            wrapperIdentifierOptional.ifPresent(wrapperIdentifier -> wrapperIdentifierAndTypeMap.put(wrapperIdentifier, SINGLE));
        }

        @Override
        public void onComplexChildMap(Class<?> keyType, Class<?> valueType, String wrapperIdentifier) {
            wrapperIdentifierAndTypeMap.put(wrapperIdentifier, MAP);
        }

        @Override
        public void onMultipleValues(KeyAttributeDefinitionPair[] definitions) {
            for (KeyAttributeDefinitionPair attributeDefinition : definitions) {
                attributeDefinition.getAttributeDefinition().accept(this);
            }
        }
    };
    Consumer<AttributeDefinition> collectWrappersConsumer = attributeDefinition -> attributeDefinition.accept(wrapperIdentifiersCollector);
    buildingDefinition.getSetterParameterDefinitions().stream().map(setterAttributeDefinition -> setterAttributeDefinition.getAttributeDefinition()).forEach(collectWrappersConsumer);
    buildingDefinition.getConstructorAttributeDefinition().stream().forEach(collectWrappersConsumer);
    return wrapperIdentifierAndTypeMap;
}
Also used : KeyAttributeDefinitionPair(org.mule.runtime.dsl.api.component.KeyAttributeDefinitionPair) CORE_PREFIX(org.mule.runtime.internal.dsl.DslConstants.CORE_PREFIX) BeanReference(org.springframework.beans.factory.config.BeanReference) Optional.of(java.util.Optional.of) BiFunction(java.util.function.BiFunction) ErrorTypeRepository(org.mule.runtime.api.exception.ErrorTypeRepository) DESCRIPTION_IDENTIFIER(org.mule.runtime.config.internal.model.ApplicationModel.DESCRIPTION_IDENTIFIER) BeanDefinitionRegistry(org.springframework.beans.factory.support.BeanDefinitionRegistry) SECURITY_MANAGER_IDENTIFIER(org.mule.runtime.config.internal.model.ApplicationModel.SECURITY_MANAGER_IDENTIFIER) MULE_PROPERTY_IDENTIFIER(org.mule.runtime.config.internal.model.ApplicationModel.MULE_PROPERTY_IDENTIFIER) SingleErrorTypeMatcher(org.mule.runtime.core.api.exception.SingleErrorTypeMatcher) MVELExpressionLanguage(org.mule.runtime.core.internal.el.mvel.MVELExpressionLanguage) Map(java.util.Map) MULE_EE_DOMAIN_IDENTIFIER(org.mule.runtime.config.api.dsl.CoreDslConstants.MULE_EE_DOMAIN_IDENTIFIER) DEFAULT_OBJECT_SERIALIZER_NAME(org.mule.runtime.api.serialization.ObjectSerializer.DEFAULT_OBJECT_SERIALIZER_NAME) RAISE_ERROR_IDENTIFIER(org.mule.runtime.config.api.dsl.CoreDslConstants.RAISE_ERROR_IDENTIFIER) MULE_DOMAIN_IDENTIFIER(org.mule.runtime.config.api.dsl.CoreDslConstants.MULE_DOMAIN_IDENTIFIER) ANNOTATIONS_ELEMENT_IDENTIFIER(org.mule.runtime.config.internal.model.ApplicationModel.ANNOTATIONS_ELEMENT_IDENTIFIER) ERROR_MAPPING_IDENTIFIER(org.mule.runtime.config.internal.model.ApplicationModel.ERROR_MAPPING_IDENTIFIER) ImmutableSet(com.google.common.collect.ImmutableSet) SpringConfigurationComponentLocator(org.mule.runtime.config.internal.SpringConfigurationComponentLocator) Set(java.util.Set) MuleRuntimeException(org.mule.runtime.api.exception.MuleRuntimeException) ServiceLoader(java.util.ServiceLoader) CommonBeanDefinitionCreator.areMatchingTypes(org.mule.runtime.config.internal.dsl.spring.CommonBeanDefinitionCreator.areMatchingTypes) String.format(java.lang.String.format) ComponentBuildingDefinition(org.mule.runtime.dsl.api.component.ComponentBuildingDefinition) List(java.util.List) ErrorType(org.mule.runtime.api.message.ErrorType) Optional(java.util.Optional) ANNOTATION_NAME(org.mule.runtime.core.internal.component.ComponentAnnotations.ANNOTATION_NAME) SpringComponentModel(org.mule.runtime.config.internal.dsl.model.SpringComponentModel) ANNOTATION_PARAMETERS(org.mule.runtime.core.internal.component.ComponentAnnotations.ANNOTATION_PARAMETERS) DOC_DESCRIPTION_IDENTIFIER(org.mule.runtime.config.internal.model.ApplicationModel.DOC_DESCRIPTION_IDENTIFIER) RetryPolicyTemplate(org.mule.runtime.core.api.retry.policy.RetryPolicyTemplate) ComponentBuildingDefinitionRegistry(org.mule.runtime.config.api.dsl.model.ComponentBuildingDefinitionRegistry) OBJECT_IDENTIFIER(org.mule.runtime.config.internal.model.ApplicationModel.OBJECT_IDENTIFIER) ErrorMapping(org.mule.runtime.core.internal.exception.ErrorMapping) ComponentIdentifier.buildFromStringRepresentation(org.mule.runtime.api.component.ComponentIdentifier.buildFromStringRepresentation) OBJECT_EXPRESSION_LANGUAGE(org.mule.runtime.core.api.config.MuleProperties.OBJECT_EXPRESSION_LANGUAGE) HashMap(java.util.HashMap) AtomicReference(java.util.concurrent.atomic.AtomicReference) HashSet(java.util.HashSet) MAP(org.mule.runtime.config.internal.dsl.spring.WrapperElementType.MAP) MULE_IDENTIFIER(org.mule.runtime.config.api.dsl.CoreDslConstants.MULE_IDENTIFIER) SINGLE(org.mule.runtime.config.internal.dsl.spring.WrapperElementType.SINGLE) COLLECTION(org.mule.runtime.config.internal.dsl.spring.WrapperElementType.COLLECTION) Component(org.mule.runtime.api.component.Component) BiConsumer(java.util.function.BiConsumer) ComponentModelHelper.addAnnotation(org.mule.runtime.config.internal.dsl.spring.ComponentModelHelper.addAnnotation) BeanDefinition(org.springframework.beans.factory.config.BeanDefinition) OBJECT_DEFAULT_RETRY_POLICY_TEMPLATE(org.mule.runtime.core.api.config.MuleProperties.OBJECT_DEFAULT_RETRY_POLICY_TEMPLATE) LOCATION_KEY(org.mule.runtime.api.component.AbstractComponent.LOCATION_KEY) MULE_PROPERTIES_IDENTIFIER(org.mule.runtime.config.internal.model.ApplicationModel.MULE_PROPERTIES_IDENTIFIER) GLOBAL_PROPERTY_IDENTIFIER(org.mule.runtime.config.internal.model.ApplicationModel.GLOBAL_PROPERTY_IDENTIFIER) I18nMessageFactory.createStaticMessage(org.mule.runtime.api.i18n.I18nMessageFactory.createStaticMessage) AttributeDefinition(org.mule.runtime.dsl.api.component.AttributeDefinition) AbstractAttributeDefinitionVisitor(org.mule.runtime.config.api.dsl.processor.AbstractAttributeDefinitionVisitor) ErrorTypeMatcher(org.mule.runtime.core.api.exception.ErrorTypeMatcher) Consumer(java.util.function.Consumer) Either(org.mule.runtime.core.api.functional.Either) Collectors.toList(java.util.stream.Collectors.toList) ConfigurationPropertiesProviderFactory(org.mule.runtime.config.api.dsl.model.properties.ConfigurationPropertiesProviderFactory) Element(org.w3c.dom.Element) ComponentModel(org.mule.runtime.config.internal.model.ComponentModel) CONFIGURATION_IDENTIFIER(org.mule.runtime.config.api.dsl.CoreDslConstants.CONFIGURATION_IDENTIFIER) ANNOTATION_ERROR_MAPPINGS(org.mule.runtime.core.internal.exception.ErrorMapping.ANNOTATION_ERROR_MAPPINGS) ComponentIdentifier(org.mule.runtime.api.component.ComponentIdentifier) Optional(java.util.Optional) HashMap(java.util.HashMap) KeyAttributeDefinitionPair(org.mule.runtime.dsl.api.component.KeyAttributeDefinitionPair) AbstractAttributeDefinitionVisitor(org.mule.runtime.config.api.dsl.processor.AbstractAttributeDefinitionVisitor) AttributeDefinition(org.mule.runtime.dsl.api.component.AttributeDefinition)

Example 2 with ComponentBuildingDefinition

use of org.mule.runtime.dsl.api.component.ComponentBuildingDefinition in project mule by mulesoft.

the class CollectionBeanDefinitionCreator method handleRequest.

@Override
boolean handleRequest(CreateBeanDefinitionRequest createBeanDefinitionRequest) {
    SpringComponentModel componentModel = (SpringComponentModel) createBeanDefinitionRequest.getComponentModel();
    ComponentBuildingDefinition componentBuildingDefinition = createBeanDefinitionRequest.getComponentBuildingDefinition();
    ObjectTypeVisitor objectTypeVisitor = new ObjectTypeVisitor(componentModel);
    componentBuildingDefinition.getTypeDefinition().visit(objectTypeVisitor);
    if (Collection.class.isAssignableFrom(objectTypeVisitor.getType())) {
        componentModel.setType(objectTypeVisitor.getType());
        ManagedList<Object> managedList = new ManagedList<>();
        for (ComponentModel innerComponent : componentModel.getInnerComponents()) {
            SpringComponentModel innerSpringComp = (SpringComponentModel) innerComponent;
            Object bean = innerSpringComp.getBeanDefinition() == null ? innerSpringComp.getBeanReference() : innerSpringComp.getBeanDefinition();
            managedList.add(bean);
        }
        componentModel.setBeanDefinition(BeanDefinitionBuilder.genericBeanDefinition(objectTypeVisitor.getType()).addConstructorArgValue(managedList).getBeanDefinition());
        return true;
    }
    return false;
}
Also used : SpringComponentModel(org.mule.runtime.config.internal.dsl.model.SpringComponentModel) ComponentModel(org.mule.runtime.config.internal.model.ComponentModel) SpringComponentModel(org.mule.runtime.config.internal.dsl.model.SpringComponentModel) ManagedList(org.springframework.beans.factory.support.ManagedList) ComponentBuildingDefinition(org.mule.runtime.dsl.api.component.ComponentBuildingDefinition) ObjectTypeVisitor(org.mule.runtime.config.internal.dsl.processor.ObjectTypeVisitor)

Example 3 with ComponentBuildingDefinition

use of org.mule.runtime.dsl.api.component.ComponentBuildingDefinition in project mule by mulesoft.

the class CommonBeanDefinitionCreator method createBeanDefinitionBuilderFromObjectFactory.

private BeanDefinitionBuilder createBeanDefinitionBuilderFromObjectFactory(final SpringComponentModel componentModel, final ComponentBuildingDefinition componentBuildingDefinition) {
    ObjectTypeVisitor objectTypeVisitor = new ObjectTypeVisitor(componentModel);
    componentBuildingDefinition.getTypeDefinition().visit(objectTypeVisitor);
    Class<?> objectFactoryType = componentBuildingDefinition.getObjectFactoryType();
    Optional<Consumer<Object>> instanceCustomizationFunctionOptional;
    Map<String, Object> customProperties = getTransformerCustomProperties(componentModel);
    if (customProperties.isEmpty()) {
        instanceCustomizationFunctionOptional = empty();
    } else {
        instanceCustomizationFunctionOptional = of(object -> injectSpringProperties(customProperties, object));
    }
    return rootBeanDefinition(objectFactoryClassRepository.getObjectFactoryClass(componentBuildingDefinition, objectFactoryType, objectTypeVisitor.getType(), new LazyValue<>(() -> componentModel.getBeanDefinition().isLazyInit()), instanceCustomizationFunctionOptional));
}
Also used : BeanDefinitionPostProcessor(org.mule.runtime.config.privileged.dsl.BeanDefinitionPostProcessor) Optional.of(java.util.Optional.of) CursorStreamProvider(org.mule.runtime.api.streaming.bytes.CursorStreamProvider) SecurityFilter(org.mule.runtime.core.api.security.SecurityFilter) MuleApplicationClassLoader.resolveContextArtifactPluginClassLoaders(org.mule.runtime.deployment.model.internal.application.MuleApplicationClassLoader.resolveContextArtifactPluginClassLoaders) AbstractBeanDefinition(org.springframework.beans.factory.support.AbstractBeanDefinition) ROOT_MACRO_EXPANDED_FLOW_CONTAINER_NAME(org.mule.runtime.config.internal.dsl.model.extension.xml.MacroExpansionModuleModel.ROOT_MACRO_EXPANDED_FLOW_CONTAINER_NAME) SpiServiceRegistry(org.mule.runtime.core.api.registry.SpiServiceRegistry) MULE_PROPERTY_IDENTIFIER(org.mule.runtime.config.internal.model.ApplicationModel.MULE_PROPERTY_IDENTIFIER) Collectors.toMap(java.util.stream.Collectors.toMap) SecurityFilterMessageProcessor(org.mule.runtime.core.privileged.processor.SecurityFilterMessageProcessor) Map(java.util.Map) CUSTOM_TRANSFORMER_IDENTIFIER(org.mule.runtime.config.internal.model.ApplicationModel.CUSTOM_TRANSFORMER_IDENTIFIER) Pair(org.mule.runtime.api.util.Pair) ANNOTATIONS_ELEMENT_IDENTIFIER(org.mule.runtime.config.internal.model.ApplicationModel.ANNOTATIONS_ELEMENT_IDENTIFIER) ImmutableSet(com.google.common.collect.ImmutableSet) Set(java.util.Set) SPRING_PROTOTYPE_OBJECT(org.mule.runtime.config.internal.dsl.spring.BeanDefinitionFactory.SPRING_PROTOTYPE_OBJECT) MuleRuntimeException(org.mule.runtime.api.exception.MuleRuntimeException) ProcessingStrategy(org.mule.runtime.core.api.processor.strategy.ProcessingStrategy) XmlCustomAttributeHandler(org.mule.runtime.config.internal.dsl.processor.xml.XmlCustomAttributeHandler) ComponentBuildingDefinition(org.mule.runtime.dsl.api.component.ComponentBuildingDefinition) List(java.util.List) Optional(java.util.Optional) BeanUtils.copyProperty(org.apache.commons.beanutils.BeanUtils.copyProperty) QName(javax.xml.namespace.QName) SpringComponentModel(org.mule.runtime.config.internal.dsl.model.SpringComponentModel) RootBeanDefinition(org.springframework.beans.factory.support.RootBeanDefinition) Optional.empty(java.util.Optional.empty) XmlCustomAttributeHandler.from(org.mule.runtime.config.internal.dsl.processor.xml.XmlCustomAttributeHandler.from) DefaultMessageProcessorChainBuilder(org.mule.runtime.core.privileged.processor.chain.DefaultMessageProcessorChainBuilder) BeanDefinitionBuilder(org.springframework.beans.factory.support.BeanDefinitionBuilder) BeanDefinitionBuilder.genericBeanDefinition(org.springframework.beans.factory.support.BeanDefinitionBuilder.genericBeanDefinition) HashMap(java.util.HashMap) ANNOTATIONS_PROPERTY_NAME(org.mule.runtime.api.component.Component.ANNOTATIONS_PROPERTY_NAME) XmlMetadataAnnotations(org.mule.runtime.config.internal.parsers.XmlMetadataAnnotations) ArrayList(java.util.ArrayList) Component(org.mule.runtime.api.component.Component) Node(org.w3c.dom.Node) ServiceConfigurationError(java.util.ServiceConfigurationError) BeanDefinition(org.springframework.beans.factory.config.BeanDefinition) ModuleOperationMessageProcessorChainFactoryBean(org.mule.runtime.config.internal.factories.ModuleOperationMessageProcessorChainFactoryBean) Collections.emptyMap(java.util.Collections.emptyMap) MULE_PROPERTIES_IDENTIFIER(org.mule.runtime.config.internal.model.ApplicationModel.MULE_PROPERTIES_IDENTIFIER) PropertyComponentUtils.getPropertyValueFromPropertyComponent(org.mule.runtime.config.internal.dsl.spring.PropertyComponentUtils.getPropertyValueFromPropertyComponent) LocationExecutionContextProvider.addMetadataAnnotationsFromXml(org.mule.runtime.core.privileged.execution.LocationExecutionContextProvider.addMetadataAnnotationsFromXml) ObjectTypeVisitor(org.mule.runtime.config.internal.dsl.processor.ObjectTypeVisitor) AbstractComponent(org.mule.runtime.api.component.AbstractComponent) Consumer(java.util.function.Consumer) LazyValue(org.mule.runtime.api.util.LazyValue) Element(org.w3c.dom.Element) ComponentModel(org.mule.runtime.config.internal.model.ComponentModel) BeanDefinitionBuilder.rootBeanDefinition(org.springframework.beans.factory.support.BeanDefinitionBuilder.rootBeanDefinition) ComponentIdentifier(org.mule.runtime.api.component.ComponentIdentifier) LazyValue(org.mule.runtime.api.util.LazyValue) Consumer(java.util.function.Consumer) ObjectTypeVisitor(org.mule.runtime.config.internal.dsl.processor.ObjectTypeVisitor)

Example 4 with ComponentBuildingDefinition

use of org.mule.runtime.dsl.api.component.ComponentBuildingDefinition in project mule by mulesoft.

the class EagerObjectCreator method handleRequest.

@Override
boolean handleRequest(CreateBeanDefinitionRequest createBeanDefinitionRequest) {
    SpringComponentModel componentModel = createBeanDefinitionRequest.getComponentModel();
    Class<?> type = componentModel.getType();
    if (type == null) {
        return false;
    }
    Optional<Class<?>> foundClass = earlyCreationObjectTypes.stream().filter(clazz -> clazz.isAssignableFrom(type)).findAny();
    return foundClass.map(clazz -> {
        ComponentBuildingDefinition componentBuildingDefinition = createBeanDefinitionRequest.getComponentBuildingDefinition();
        Object instance;
        try {
            instance = type.newInstance();
        } catch (Exception e) {
            throw new MuleRuntimeException(createStaticMessage("Could not create an instance of '%s' using default constructor. Early created object must have a default constructor", type.getName()));
        }
        componentBuildingDefinition.getSetterParameterDefinitions().forEach(attributeDefinition -> {
            SetterAttributeDefinition setterAttributeDefinition = (SetterAttributeDefinition) attributeDefinition;
            setterAttributeDefinition.getAttributeDefinition().accept(new AbstractAttributeDefinitionVisitor() {

                @Override
                public void onUndefinedSimpleParameters() {
                    Map<String, String> parameters = componentModel.getParameters();
                    String attributeName = setterAttributeDefinition.getAttributeName();
                    try {
                        setProperty(instance, attributeName, parameters);
                    } catch (Exception e) {
                        throw new MuleRuntimeException(e);
                    }
                }

                @Override
                protected void doOnOperation(String operation) {
                    throw new MuleRuntimeException(createStaticMessage(format("Attribute definition with operation '%s' is not supported for earlyCreationObjects", operation)));
                }
            });
        });
        componentModel.setObjectInstance(instance);
        componentModel.setBeanDefinition(rootBeanDefinition(ConstantFactoryBean.class).addConstructorArgValue(instance).getBeanDefinition());
        return true;
    }).orElse(false);
}
Also used : ImmutableSet(com.google.common.collect.ImmutableSet) I18nMessageFactory.createStaticMessage(org.mule.runtime.api.i18n.I18nMessageFactory.createStaticMessage) ObjectProvider(org.mule.runtime.api.ioc.ObjectProvider) BeanUtils.setProperty(org.apache.commons.beanutils.BeanUtils.setProperty) ConstantFactoryBean(org.mule.runtime.config.internal.factories.ConstantFactoryBean) MuleRuntimeException(org.mule.runtime.api.exception.MuleRuntimeException) SetterAttributeDefinition(org.mule.runtime.dsl.api.component.SetterAttributeDefinition) AbstractAttributeDefinitionVisitor(org.mule.runtime.config.api.dsl.processor.AbstractAttributeDefinitionVisitor) String.format(java.lang.String.format) ComponentBuildingDefinition(org.mule.runtime.dsl.api.component.ComponentBuildingDefinition) Map(java.util.Map) Optional(java.util.Optional) BeanDefinitionBuilder.rootBeanDefinition(org.springframework.beans.factory.support.BeanDefinitionBuilder.rootBeanDefinition) SpringComponentModel(org.mule.runtime.config.internal.dsl.model.SpringComponentModel) MuleRuntimeException(org.mule.runtime.api.exception.MuleRuntimeException) SpringComponentModel(org.mule.runtime.config.internal.dsl.model.SpringComponentModel) MuleRuntimeException(org.mule.runtime.api.exception.MuleRuntimeException) SetterAttributeDefinition(org.mule.runtime.dsl.api.component.SetterAttributeDefinition) AbstractAttributeDefinitionVisitor(org.mule.runtime.config.api.dsl.processor.AbstractAttributeDefinitionVisitor) ComponentBuildingDefinition(org.mule.runtime.dsl.api.component.ComponentBuildingDefinition)

Example 5 with ComponentBuildingDefinition

use of org.mule.runtime.dsl.api.component.ComponentBuildingDefinition in project mule by mulesoft.

the class MapBeanDefinitionCreator method handleRequest.

@Override
boolean handleRequest(CreateBeanDefinitionRequest createBeanDefinitionRequest) {
    SpringComponentModel componentModel = createBeanDefinitionRequest.getComponentModel();
    ObjectTypeVisitor objectTypeVisitor = new ObjectTypeVisitor(componentModel);
    ComponentBuildingDefinition componentBuildingDefinition = createBeanDefinitionRequest.getComponentBuildingDefinition();
    componentBuildingDefinition.getTypeDefinition().visit(objectTypeVisitor);
    Class<?> type = objectTypeVisitor.getType();
    if (Map.class.isAssignableFrom(type) && componentBuildingDefinition.getObjectFactoryType() == null) {
        ManagedList managedList = componentModel.getInnerComponents().stream().map(c -> ((SpringComponentModel) c).getBeanDefinition()).collect(toCollection(ManagedList::new));
        componentModel.setBeanDefinition(BeanDefinitionBuilder.genericBeanDefinition(MapFactoryBean.class).addConstructorArgValue(managedList).addConstructorArgValue(type).getBeanDefinition());
        return true;
    }
    return false;
}
Also used : Collectors.toCollection(java.util.stream.Collectors.toCollection) ManagedList(org.springframework.beans.factory.support.ManagedList) ComponentBuildingDefinition(org.mule.runtime.dsl.api.component.ComponentBuildingDefinition) BeanDefinitionBuilder(org.springframework.beans.factory.support.BeanDefinitionBuilder) Map(java.util.Map) SpringComponentModel(org.mule.runtime.config.internal.dsl.model.SpringComponentModel) ObjectTypeVisitor(org.mule.runtime.config.internal.dsl.processor.ObjectTypeVisitor) SpringComponentModel(org.mule.runtime.config.internal.dsl.model.SpringComponentModel) ManagedList(org.springframework.beans.factory.support.ManagedList) ComponentBuildingDefinition(org.mule.runtime.dsl.api.component.ComponentBuildingDefinition) Map(java.util.Map) ObjectTypeVisitor(org.mule.runtime.config.internal.dsl.processor.ObjectTypeVisitor)

Aggregations

ComponentBuildingDefinition (org.mule.runtime.dsl.api.component.ComponentBuildingDefinition)19 Map (java.util.Map)10 ArrayList (java.util.ArrayList)8 List (java.util.List)8 Optional (java.util.Optional)8 MuleRuntimeException (org.mule.runtime.api.exception.MuleRuntimeException)8 SpringComponentModel (org.mule.runtime.config.internal.dsl.model.SpringComponentModel)8 Set (java.util.Set)7 I18nMessageFactory.createStaticMessage (org.mule.runtime.api.i18n.I18nMessageFactory.createStaticMessage)7 String.format (java.lang.String.format)6 HashMap (java.util.HashMap)6 Consumer (java.util.function.Consumer)6 Component (org.mule.runtime.api.component.Component)6 ObjectTypeVisitor (org.mule.runtime.config.internal.dsl.processor.ObjectTypeVisitor)6 ImmutableSet (com.google.common.collect.ImmutableSet)5 HashSet (java.util.HashSet)5 Collectors.toList (java.util.stream.Collectors.toList)5 Optional.of (java.util.Optional.of)4 ComponentIdentifier (org.mule.runtime.api.component.ComponentIdentifier)4 ComponentBuildingDefinitionRegistry (org.mule.runtime.config.api.dsl.model.ComponentBuildingDefinitionRegistry)4