Search in sources :

Example 31 with Pair

use of org.mule.runtime.api.util.Pair in project mule by mulesoft.

the class MuleArtifactContext method createApplicationComponents.

/**
 * Creates te definition for all the objects to be created form the enabled components in the {@code applicationModel}.
 *
 * @param beanFactory the bean factory in which definition must be created.
 * @param applicationModel the artifact application model.
 * @param mustBeRoot if the component must be root to be created.
 * @return an order list of the created bean names. The order must be respected for the creation of the objects.
 */
protected List<String> createApplicationComponents(DefaultListableBeanFactory beanFactory, ApplicationModel applicationModel, boolean mustBeRoot) {
    // This should only be done once at the initial application model creation, called from Spring
    List<Pair<ComponentModel, Optional<String>>> objectProvidersByName = lookObjectProvidersComponentModels(applicationModel);
    List<String> createdComponentModels = new ArrayList<>();
    applicationModel.executeOnEveryMuleComponentTree(cm -> {
        SpringComponentModel componentModel = (SpringComponentModel) cm;
        if (!mustBeRoot || componentModel.isRoot()) {
            if (componentModel.getIdentifier().equals(MULE_IDENTIFIER) || componentModel.getIdentifier().equals(MULE_DOMAIN_IDENTIFIER) || componentModel.getIdentifier().equals(MULE_EE_DOMAIN_IDENTIFIER)) {
                return;
            }
            SpringComponentModel parentComponentModel = componentModel.getParent() != null ? (SpringComponentModel) componentModel.getParent() : (SpringComponentModel) applicationModel.getRootComponentModel();
            if (componentModel.isEnabled()) {
                if (componentModel.getNameAttribute() != null && componentModel.isRoot()) {
                    createdComponentModels.add(componentModel.getNameAttribute());
                }
                beanDefinitionFactory.resolveComponentRecursively(parentComponentModel, componentModel, beanFactory, (resolvedComponentModel, registry) -> {
                    SpringComponentModel resolvedSpringComponentModel = (SpringComponentModel) resolvedComponentModel;
                    if (resolvedComponentModel.isRoot()) {
                        String nameAttribute = resolvedComponentModel.getNameAttribute();
                        if (resolvedComponentModel.getIdentifier().equals(CONFIGURATION_IDENTIFIER)) {
                            nameAttribute = OBJECT_MULE_CONFIGURATION;
                        } else if (nameAttribute == null) {
                            // This may be a configuration that does not requires a name.
                            nameAttribute = uniqueValue(resolvedSpringComponentModel.getBeanDefinition().getBeanClassName());
                        }
                        registry.registerBeanDefinition(nameAttribute, resolvedSpringComponentModel.getBeanDefinition());
                        postProcessBeanDefinition(componentModel, registry, nameAttribute);
                    }
                }, null, componentLocator);
            } else {
                beanDefinitionFactory.resolveComponentRecursively(parentComponentModel, componentModel, beanFactory, null, null, componentLocator);
            }
            componentLocator.addComponentLocation(cm.getComponentLocation());
        }
    });
    this.objectProviders.addAll(objectProvidersByName.stream().map(pair -> (ConfigurableObjectProvider) pair.getFirst().getObjectInstance()).collect(toList()));
    registerObjectFromObjectProviders(beanFactory);
    Set<String> alwaysEnabledComponents = dependencyResolver.resolveAlwaysEnabledComponents().stream().map(dependencyNode -> dependencyNode.getComponentName()).collect(toSet());
    Set<String> objectProviderNames = objectProvidersByName.stream().map(Pair::getSecond).filter(Optional::isPresent).map(Optional::get).collect(toSet());
    // Put object providers first, then always enabled components, then the rest
    createdComponentModels.sort(Comparator.comparing(beanName -> {
        if (objectProviderNames.contains(beanName)) {
            return 1;
        } else if (alwaysEnabledComponents.contains(beanName)) {
            return 2;
        } else {
            return 3;
        }
    }));
    return createdComponentModels;
}
Also used : ClassLoaderResourceProvider(org.mule.runtime.config.internal.dsl.model.ClassLoaderResourceProvider) CORE_PREFIX(org.mule.runtime.internal.dsl.DslConstants.CORE_PREFIX) SimpleConfigAttribute(org.mule.runtime.config.api.dsl.processor.SimpleConfigAttribute) Optional.of(java.util.Optional.of) Thread.currentThread(java.lang.Thread.currentThread) ContextAnnotationAutowireCandidateResolver(org.springframework.context.annotation.ContextAnnotationAutowireCandidateResolver) ByteArrayResource(org.springframework.core.io.ByteArrayResource) MuleInjectorProcessor(org.mule.runtime.config.internal.processor.MuleInjectorProcessor) SpiServiceRegistry(org.mule.runtime.core.api.registry.SpiServiceRegistry) BeanDefinitionFactory(org.mule.runtime.config.internal.dsl.spring.BeanDefinitionFactory) Arrays.asList(java.util.Arrays.asList) Document(org.w3c.dom.Document) Map(java.util.Map) MULE_EE_DOMAIN_IDENTIFIER(org.mule.runtime.config.api.dsl.CoreDslConstants.MULE_EE_DOMAIN_IDENTIFIER) PostRegistrationActionsPostProcessor(org.mule.runtime.config.internal.processor.PostRegistrationActionsPostProcessor) ComponentBuildingDefinitionUtils.registerComponentBuildingDefinitions(org.mule.runtime.config.internal.util.ComponentBuildingDefinitionUtils.registerComponentBuildingDefinitions) Resource(org.springframework.core.io.Resource) ConfigurableObjectProvider(org.mule.runtime.api.ioc.ConfigurableObjectProvider) Set(java.util.Set) MuleRuntimeException(org.mule.runtime.api.exception.MuleRuntimeException) CONFIGURATION_ANNOTATION_PROCESSOR_BEAN_NAME(org.springframework.context.annotation.AnnotationConfigUtils.CONFIGURATION_ANNOTATION_PROCESSOR_BEAN_NAME) ComponentLocatorCreatePostProcessor(org.mule.runtime.config.internal.processor.ComponentLocatorCreatePostProcessor) SpringComponentModel(org.mule.runtime.config.internal.dsl.model.SpringComponentModel) RootBeanDefinition(org.springframework.beans.factory.support.RootBeanDefinition) Optional.empty(java.util.Optional.empty) MulePropertyEditorRegistrar(org.mule.runtime.config.internal.editors.MulePropertyEditorRegistrar) BeanDefinitionBuilder.genericBeanDefinition(org.springframework.beans.factory.support.BeanDefinitionBuilder.genericBeanDefinition) Preconditions.checkArgument(org.mule.runtime.api.util.Preconditions.checkArgument) TransformerResolver(org.mule.runtime.core.internal.registry.TransformerResolver) DefaultRegistry(org.mule.runtime.core.internal.registry.DefaultRegistry) ArrayList(java.util.ArrayList) MuleContextWithRegistries(org.mule.runtime.core.internal.context.MuleContextWithRegistries) MULE_IDENTIFIER(org.mule.runtime.config.api.dsl.CoreDslConstants.MULE_IDENTIFIER) ConstructorArgumentValues(org.springframework.beans.factory.config.ConstructorArgumentValues) Component(org.mule.runtime.api.component.Component) BeanDefinition(org.springframework.beans.factory.config.BeanDefinition) XmlConfigurationDocumentLoader.noValidationDocumentLoader(org.mule.runtime.config.api.XmlConfigurationDocumentLoader.noValidationDocumentLoader) Registry(org.mule.runtime.api.artifact.Registry) ConfigurationDependencyResolver(org.mule.runtime.config.internal.dsl.model.ConfigurationDependencyResolver) ConfigFile(org.mule.runtime.config.api.dsl.processor.ConfigFile) REQUIRED_ANNOTATION_PROCESSOR_BEAN_NAME(org.springframework.context.annotation.AnnotationConfigUtils.REQUIRED_ANNOTATION_PROCESSOR_BEAN_NAME) LaxInstantiationStrategyWrapper(org.mule.runtime.config.internal.util.LaxInstantiationStrategyWrapper) ManagedMap(org.springframework.beans.factory.support.ManagedMap) I18nMessageFactory.createStaticMessage(org.mule.runtime.api.i18n.I18nMessageFactory.createStaticMessage) ComponentModelHelper.updateAnnotationValue(org.mule.runtime.config.internal.dsl.spring.ComponentModelHelper.updateAnnotationValue) ApplicationModel(org.mule.runtime.config.internal.model.ApplicationModel) IOException(java.io.IOException) BeansException(org.springframework.beans.BeansException) ArtifactConfig(org.mule.runtime.config.api.dsl.processor.ArtifactConfig) GenericBeanDefinition(org.springframework.beans.factory.support.GenericBeanDefinition) ExtensionModel(org.mule.runtime.api.meta.model.ExtensionModel) LifecycleUtils.disposeIfNeeded(org.mule.runtime.core.api.lifecycle.LifecycleUtils.disposeIfNeeded) SPRING_SINGLETON_OBJECT(org.mule.runtime.config.internal.dsl.spring.BeanDefinitionFactory.SPRING_SINGLETON_OBJECT) ComponentIdentifier(org.mule.runtime.api.component.ComponentIdentifier) ResourceProvider(org.mule.runtime.config.api.dsl.model.ResourceProvider) CglibSubclassingInstantiationStrategy(org.springframework.beans.factory.support.CglibSubclassingInstantiationStrategy) LoggerFactory(org.slf4j.LoggerFactory) BeanDefinitionRegistry(org.springframework.beans.factory.support.BeanDefinitionRegistry) ConfigurableListableBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory) ManagedList(org.springframework.beans.factory.support.ManagedList) XmlApplicationParser(org.mule.runtime.config.api.dsl.processor.xml.XmlApplicationParser) OBJECT_REGISTRY(org.mule.runtime.core.api.config.MuleProperties.OBJECT_REGISTRY) DslResolvingContext(org.mule.runtime.api.dsl.DslResolvingContext) Preconditions.checkState(org.mule.runtime.api.util.Preconditions.checkState) ServiceRegistry(org.mule.runtime.core.api.registry.ServiceRegistry) Pair(org.mule.runtime.api.util.Pair) DOMAIN(org.mule.runtime.core.api.config.bootstrap.ArtifactType.DOMAIN) Collectors.toSet(java.util.stream.Collectors.toSet) XmlConfigurationDocumentLoader(org.mule.runtime.config.api.XmlConfigurationDocumentLoader) EnvironmentPropertiesConfigurationProvider(org.mule.runtime.config.internal.dsl.model.config.EnvironmentPropertiesConfigurationProvider) MULE_DOMAIN_IDENTIFIER(org.mule.runtime.config.api.dsl.CoreDslConstants.MULE_DOMAIN_IDENTIFIER) POLICY(org.mule.runtime.core.api.config.bootstrap.ArtifactType.POLICY) ImmutableSet(com.google.common.collect.ImmutableSet) IMPORT_ELEMENT(org.mule.runtime.config.api.dsl.CoreDslConstants.IMPORT_ELEMENT) ObjectProvider(org.mule.runtime.api.ioc.ObjectProvider) OBJECT_MULE_CONTEXT(org.mule.runtime.core.api.config.MuleProperties.OBJECT_MULE_CONTEXT) String.format(java.lang.String.format) AbstractRefreshableConfigApplicationContext(org.springframework.context.support.AbstractRefreshableConfigApplicationContext) BeanPostProcessor(org.springframework.beans.factory.config.BeanPostProcessor) List(java.util.List) APP(org.mule.runtime.core.api.config.bootstrap.ArtifactType.APP) AutoIdUtils.uniqueValue(org.mule.runtime.config.internal.parsers.generic.AutoIdUtils.uniqueValue) Optional(java.util.Optional) OBJECT_MULE_CONFIGURATION(org.mule.runtime.core.api.config.MuleProperties.OBJECT_MULE_CONFIGURATION) MuleRegistryHelper(org.mule.runtime.core.internal.registry.MuleRegistryHelper) Converter(org.mule.runtime.core.api.transformer.Converter) ComponentBuildingDefinitionRegistry(org.mule.runtime.config.api.dsl.model.ComponentBuildingDefinitionRegistry) UrlResource(org.springframework.core.io.UrlResource) ConfigurationProperties(org.mule.runtime.api.component.ConfigurationProperties) MuleContext(org.mule.runtime.core.api.MuleContext) ImmutableList(com.google.common.collect.ImmutableList) ArtifactDeclaration(org.mule.runtime.app.declaration.api.ArtifactDeclaration) XmlApplicationServiceRegistry(org.mule.runtime.config.api.dsl.processor.xml.XmlApplicationServiceRegistry) DiscardedOptionalBeanPostProcessor(org.mule.runtime.config.internal.processor.DiscardedOptionalBeanPostProcessor) RuntimeConfigurationException(org.mule.runtime.config.internal.dsl.model.config.RuntimeConfigurationException) ConfigLine(org.mule.runtime.config.api.dsl.processor.ConfigLine) IOUtils(org.mule.runtime.core.api.util.IOUtils) ROOT_CONTAINER_NAME_KEY(org.mule.runtime.api.component.AbstractComponent.ROOT_CONTAINER_NAME_KEY) Logger(org.slf4j.Logger) Collections.emptySet(java.util.Collections.emptySet) Optional.ofNullable(java.util.Optional.ofNullable) PropertyValue(org.springframework.beans.PropertyValue) ConfigResource(org.mule.runtime.core.api.config.ConfigResource) DefaultConfigurationPropertiesResolver(org.mule.runtime.config.internal.dsl.model.config.DefaultConfigurationPropertiesResolver) XmlConfigurationDocumentLoader.schemaValidatingDocumentLoader(org.mule.runtime.config.api.XmlConfigurationDocumentLoader.schemaValidatingDocumentLoader) LifecycleStatePostProcessor(org.mule.runtime.config.internal.processor.LifecycleStatePostProcessor) Collectors.toList(java.util.stream.Collectors.toList) ArtifactType(org.mule.runtime.core.api.config.bootstrap.ArtifactType) ConfigurationClassPostProcessor(org.springframework.context.annotation.ConfigurationClassPostProcessor) ExtensionManager(org.mule.runtime.core.api.extension.ExtensionManager) ComponentModel(org.mule.runtime.config.internal.model.ComponentModel) RequiredAnnotationBeanPostProcessor(org.springframework.beans.factory.annotation.RequiredAnnotationBeanPostProcessor) NoSuchBeanDefinitionException(org.springframework.beans.factory.NoSuchBeanDefinitionException) DefaultListableBeanFactory(org.springframework.beans.factory.support.DefaultListableBeanFactory) CONFIGURATION_IDENTIFIER(org.mule.runtime.config.api.dsl.CoreDslConstants.CONFIGURATION_IDENTIFIER) Comparator(java.util.Comparator) InputStream(java.io.InputStream) Optional(java.util.Optional) SpringComponentModel(org.mule.runtime.config.internal.dsl.model.SpringComponentModel) ArrayList(java.util.ArrayList) Pair(org.mule.runtime.api.util.Pair)

Example 32 with Pair

use of org.mule.runtime.api.util.Pair in project mule by mulesoft.

the class ServerNotificationManagerConfigurator method populateNotificationTypeMappings.

public ServerNotificationManager populateNotificationTypeMappings(Map<String, Class<? extends Notification>> eventMap, Map<String, Class<? extends NotificationListener>> interfaceMap) throws InitialisationException {
    Map<String, NotificationsProvider> providersMap = new HashMap<>();
    for (NotificationsProvider provider : registry.lookupAllByType(NotificationsProvider.class)) {
        for (Entry<String, Pair<Class<? extends Notification>, Class<? extends NotificationListener>>> entry : provider.getEventListenerMapping().entrySet()) {
            final String notificationType = entry.getKey();
            if (!notificationType.matches("[a-zA-Z]+:[A-Z\\-]+")) {
                throw new InitialisationException(createStaticMessage("Notification '%s' declared in '%s' doesn't comply with the '[artifactID]:[NOTIFICATION-ID]' format", notificationType, provider.toString()), this);
            }
            if (eventMap.containsKey(notificationType)) {
                throw new InitialisationException(createStaticMessage("Notification '%s' declared in '%s' is already declared for another artifact in provider '%s'.", notificationType, provider.toString(), eventMap.get(notificationType)), this);
            }
            eventMap.put(notificationType, entry.getValue().getFirst());
            interfaceMap.put(notificationType, entry.getValue().getSecond());
            providersMap.put(notificationType, provider);
        }
    }
    ServerNotificationManager notificationManager = muleContext.getNotificationManager();
    if (dynamic != null) {
        notificationManager.setNotificationDynamic(dynamic.booleanValue());
    }
    return notificationManager;
}
Also used : HashMap(java.util.HashMap) InitialisationException(org.mule.runtime.api.lifecycle.InitialisationException) ServerNotificationManager(org.mule.runtime.core.api.context.notification.ServerNotificationManager) NotificationsProvider(org.mule.runtime.core.api.context.notification.NotificationsProvider) ListenerSubscriptionPair(org.mule.runtime.core.api.context.notification.ListenerSubscriptionPair) Pair(org.mule.runtime.api.util.Pair)

Example 33 with Pair

use of org.mule.runtime.api.util.Pair in project mule by mulesoft.

the class IntrospectionUtils method getPagingProviderTypes.

/**
 * Introspects a {@link PagingProvider} type and returns their generics.
 *
 * @param pagingProvider {@link PagingProvider} to introspect
 * @return The {@link PagingProvider} generics.
 */
public static Pair<ResolvableType, ResolvableType> getPagingProviderTypes(ResolvableType pagingProvider) {
    if (!PagingProvider.class.isAssignableFrom(pagingProvider.getRawClass())) {
        throw new IllegalArgumentException("The given OutputType is not a PagingProvider");
    }
    ResolvableType[] generics = pagingProvider.getGenerics();
    ResolvableType connectionType = null;
    ResolvableType returnType = null;
    if (generics.length == 0) {
        for (ResolvableType resolvableType : pagingProvider.getInterfaces()) {
            if (resolvableType.getRawClass().equals(PagingProvider.class)) {
                connectionType = resolvableType.getGeneric(0);
                returnType = resolvableType.getGeneric(1);
            }
        }
    } else {
        connectionType = generics[0];
        returnType = generics[1];
    }
    return new Pair<>(connectionType, returnType);
}
Also used : PagingProvider(org.mule.runtime.extension.api.runtime.streaming.PagingProvider) ResolvableType(org.springframework.core.ResolvableType) Pair(org.mule.runtime.api.util.Pair)

Example 34 with Pair

use of org.mule.runtime.api.util.Pair in project mule by mulesoft.

the class ErrorsDeclarationEnricher method collectErrorOperations.

private List<Pair<ComponentDeclaration, MethodElement>> collectErrorOperations(ExtensionDeclaration declaration) {
    List<Pair<ComponentDeclaration, MethodElement>> operations = new LinkedList<>();
    new IdempotentDeclarationWalker() {

        @Override
        public void onOperation(WithOperationsDeclaration owner, OperationDeclaration declaration) {
            addComponent(declaration);
        }

        @Override
        protected void onConstruct(ConstructDeclaration declaration) {
            addComponent(declaration);
        }

        private void addComponent(ComponentDeclaration<?> declaration) {
            declaration.getModelProperty(ExtensionOperationDescriptorModelProperty.class).ifPresent(implementingMethodModelProperty -> operations.add(new Pair<>(declaration, implementingMethodModelProperty.getOperationMethod())));
        }
    }.walk(declaration);
    return operations;
}
Also used : MuleExtensionUtils.getExtensionsNamespace(org.mule.runtime.module.extension.internal.util.MuleExtensionUtils.getExtensionsNamespace) OperationModel(org.mule.runtime.api.meta.model.operation.OperationModel) ExtensionTypeDescriptorModelProperty(org.mule.runtime.module.extension.internal.loader.java.type.property.ExtensionTypeDescriptorModelProperty) OperationDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.OperationDeclaration) MuleErrors(org.mule.runtime.extension.api.error.MuleErrors) ConstructDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.ConstructDeclaration) Type(org.mule.runtime.module.extension.api.loader.java.type.Type) WithOperationsDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.WithOperationsDeclaration) MethodElement(org.mule.runtime.module.extension.api.loader.java.type.MethodElement) Pair(org.mule.runtime.api.util.Pair) DeclarationEnricher(org.mule.runtime.extension.api.loader.DeclarationEnricher) LinkedList(java.util.LinkedList) ErrorTypes(org.mule.runtime.extension.api.annotation.error.ErrorTypes) ComponentDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.ComponentDeclaration) Optional.ofNullable(java.util.Optional.ofNullable) I18nMessageFactory.createStaticMessage(org.mule.runtime.api.i18n.I18nMessageFactory.createStaticMessage) DeclarationEnricherPhase(org.mule.runtime.extension.api.loader.DeclarationEnricherPhase) ExtensionDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclaration) ExtensionLoadingContext(org.mule.runtime.extension.api.loader.ExtensionLoadingContext) MuleRuntimeException(org.mule.runtime.api.exception.MuleRuntimeException) Throws(org.mule.runtime.extension.api.annotation.error.Throws) String.format(java.lang.String.format) ExtensionModel(org.mule.runtime.api.meta.model.ExtensionModel) ErrorTypeDefinition(org.mule.runtime.extension.api.error.ErrorTypeDefinition) List(java.util.List) Stream(java.util.stream.Stream) ErrorTypeProvider(org.mule.runtime.extension.api.annotation.error.ErrorTypeProvider) Optional(java.util.Optional) IdempotentDeclarationWalker(org.mule.runtime.extension.api.declaration.fluent.util.IdempotentDeclarationWalker) ExtensionOperationDescriptorModelProperty(org.mule.runtime.module.extension.internal.loader.java.type.property.ExtensionOperationDescriptorModelProperty) INITIALIZE(org.mule.runtime.extension.api.loader.DeclarationEnricherPhase.INITIALIZE) IllegalModelDefinitionException(org.mule.runtime.extension.api.exception.IllegalModelDefinitionException) ConstructDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.ConstructDeclaration) IdempotentDeclarationWalker(org.mule.runtime.extension.api.declaration.fluent.util.IdempotentDeclarationWalker) WithOperationsDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.WithOperationsDeclaration) LinkedList(java.util.LinkedList) OperationDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.OperationDeclaration) Pair(org.mule.runtime.api.util.Pair)

Example 35 with Pair

use of org.mule.runtime.api.util.Pair in project mule by mulesoft.

the class ErrorsDeclarationEnricher method enrich.

@Override
public void enrich(ExtensionLoadingContext extensionLoadingContext) {
    ExtensionDeclaration declaration = extensionLoadingContext.getExtensionDeclarer().getDeclaration();
    String extensionNamespace = getExtensionsNamespace(declaration);
    Optional<ExtensionTypeDescriptorModelProperty> implementingType = declaration.getModelProperty(ExtensionTypeDescriptorModelProperty.class);
    ErrorsModelFactory errorModelDescriber = new ErrorsModelFactory(extensionNamespace);
    errorModelDescriber.getErrorModels().forEach(declaration::addErrorModel);
    if (implementingType.isPresent() && implementingType.get().getType().getDeclaringClass().isPresent()) {
        Type extensionElement = implementingType.get().getType();
        Optional<ErrorTypes> errorAnnotation = extensionElement.getAnnotation(ErrorTypes.class);
        List<Pair<ComponentDeclaration, MethodElement>> errorOperations = collectErrorOperations(declaration);
        if (errorAnnotation.isPresent()) {
            ErrorTypeDefinition<?>[] errorTypes = (ErrorTypeDefinition<?>[]) errorAnnotation.get().value().getEnumConstants();
            if (errorTypes.length > 0) {
                ErrorsModelFactory operationErrorModelDescriber = new ErrorsModelFactory(errorTypes, extensionNamespace);
                operationErrorModelDescriber.getErrorModels().forEach(declaration::addErrorModel);
                errorOperations.stream().forEach(pair -> registerOperationErrorTypes(pair.getSecond(), pair.getFirst(), operationErrorModelDescriber, errorTypes, extensionElement));
            } else {
                handleNoErrorTypes(extensionElement, errorOperations);
            }
        } else {
            handleNoErrorTypes(extensionElement, errorOperations);
        }
    }
}
Also used : ExtensionTypeDescriptorModelProperty(org.mule.runtime.module.extension.internal.loader.java.type.property.ExtensionTypeDescriptorModelProperty) ErrorTypeDefinition(org.mule.runtime.extension.api.error.ErrorTypeDefinition) ExtensionDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclaration) ErrorTypes(org.mule.runtime.extension.api.annotation.error.ErrorTypes) Type(org.mule.runtime.module.extension.api.loader.java.type.Type) Pair(org.mule.runtime.api.util.Pair)

Aggregations

Pair (org.mule.runtime.api.util.Pair)35 ArrayList (java.util.ArrayList)14 Test (org.junit.Test)12 ArtifactClassLoader (org.mule.runtime.module.artifact.api.classloader.ArtifactClassLoader)10 LinkedList (java.util.LinkedList)7 ServiceDiscoverer (org.mule.runtime.module.service.api.discoverer.ServiceDiscoverer)7 List (java.util.List)6 Service (org.mule.runtime.api.service.Service)6 Optional (java.util.Optional)5 MuleRuntimeException (org.mule.runtime.api.exception.MuleRuntimeException)5 ExtensionModel (org.mule.runtime.api.meta.model.ExtensionModel)5 String.format (java.lang.String.format)4 Set (java.util.Set)4 InOrder (org.mockito.InOrder)4 ComponentIdentifier (org.mule.runtime.api.component.ComponentIdentifier)4 I18nMessageFactory.createStaticMessage (org.mule.runtime.api.i18n.I18nMessageFactory.createStaticMessage)4 ServiceProvider (org.mule.runtime.api.service.ServiceProvider)4 InputStream (java.io.InputStream)3 HashSet (java.util.HashSet)3 Map (java.util.Map)3