Search in sources :

Example 31 with ExtensionModel

use of org.mule.runtime.api.meta.model.ExtensionModel in project mule by mulesoft.

the class AbstractXmlExtensionMuleArtifactFunctionalTestCase method addBuilders.

@Override
protected void addBuilders(List<ConfigurationBuilder> builders) {
    super.addBuilders(builders);
    builders.add(new AbstractConfigurationBuilder() {

        @Override
        protected void doConfigure(MuleContext muleContext) throws Exception {
            ExtensionManager extensionManager;
            if (muleContext.getExtensionManager() == null) {
                extensionManager = createDefaultExtensionManager();
                muleContext.setExtensionManager(extensionManager);
                initialiseIfNeeded(extensionManager, muleContext);
            }
            extensionManager = muleContext.getExtensionManager();
            registerXmlExtensions(extensionManager);
        }

        private void registerXmlExtensions(ExtensionManager extensionManager) {
            // take all the plugins loaded by org.mule.test.runner.api.IsolatedClassLoaderExtensionsManagerConfigurationBuilder in the extension manager
            final Set<ExtensionModel> extensions = new HashSet<>(extensionManager.getExtensions());
            for (String modulePath : getModulePaths()) {
                Map<String, Object> params = new HashMap<>();
                params.put(XmlExtensionModelLoader.RESOURCE_XML, modulePath);
                params.put(XmlExtensionModelLoader.VALIDATE_XML, shouldValidateXml());
                operationsOutputPath().ifPresent(path -> params.put(XmlExtensionModelLoader.RESOURCE_DECLARATION, path));
                final DslResolvingContext dslResolvingContext = getDefault(extensions);
                final ExtensionModel extensionModel = new XmlExtensionModelLoader().loadExtensionModel(getClass().getClassLoader(), dslResolvingContext, params);
                extensions.add(extensionModel);
            }
            for (ExtensionModel extension : extensions) {
                extensionManager.registerExtension(extension);
            }
        }
    });
}
Also used : XmlExtensionModelLoader(org.mule.runtime.extension.api.loader.xml.XmlExtensionModelLoader) AbstractConfigurationBuilder(org.mule.runtime.core.api.config.builders.AbstractConfigurationBuilder) Set(java.util.Set) HashMap(java.util.HashMap) LifecycleUtils.initialiseIfNeeded(org.mule.runtime.core.api.lifecycle.LifecycleUtils.initialiseIfNeeded) MuleExtensionUtils.createDefaultExtensionManager(org.mule.runtime.module.extension.api.util.MuleExtensionUtils.createDefaultExtensionManager) ExtensionModel(org.mule.runtime.api.meta.model.ExtensionModel) XmlExtensionLoaderDelegate(org.mule.runtime.extension.internal.loader.XmlExtensionLoaderDelegate) HashSet(java.util.HashSet) List(java.util.List) MuleContext(org.mule.runtime.core.api.MuleContext) ExtensionManager(org.mule.runtime.core.api.extension.ExtensionManager) Map(java.util.Map) DslResolvingContext(org.mule.runtime.api.dsl.DslResolvingContext) ConfigurationBuilder(org.mule.runtime.core.api.config.ConfigurationBuilder) Optional(java.util.Optional) MuleArtifactFunctionalTestCase(org.mule.functional.junit4.MuleArtifactFunctionalTestCase) ArtifactClassLoaderRunnerConfig(org.mule.test.runner.ArtifactClassLoaderRunnerConfig) DslResolvingContext.getDefault(org.mule.runtime.api.dsl.DslResolvingContext.getDefault) AbstractConfigurationBuilder(org.mule.runtime.core.api.config.builders.AbstractConfigurationBuilder) Set(java.util.Set) HashSet(java.util.HashSet) ExtensionModel(org.mule.runtime.api.meta.model.ExtensionModel) MuleContext(org.mule.runtime.core.api.MuleContext) MuleExtensionUtils.createDefaultExtensionManager(org.mule.runtime.module.extension.api.util.MuleExtensionUtils.createDefaultExtensionManager) ExtensionManager(org.mule.runtime.core.api.extension.ExtensionManager) DslResolvingContext(org.mule.runtime.api.dsl.DslResolvingContext) HashMap(java.util.HashMap) Map(java.util.Map) XmlExtensionModelLoader(org.mule.runtime.extension.api.loader.xml.XmlExtensionModelLoader)

Example 32 with ExtensionModel

use of org.mule.runtime.api.meta.model.ExtensionModel in project mule by mulesoft.

the class ModuleDelegatingEntityResolver method generateFromExtensions.

private InputSource generateFromExtensions(String publicId, String systemId) {
    InputSource inputSource = null;
    // TODO(fernandezlautaro): MULE-11024 once implemented, remove the extensionSchemaFactory.isPresent() from the `if` statement
    if (extensionSchemaFactory.isPresent()) {
        Optional<ExtensionModel> extensionModel = extensions.stream().filter(em -> systemId.equals(em.getXmlDslModel().getSchemaLocation())).findAny();
        if (extensionModel.isPresent()) {
            InputStream schema = getSchemaFromExtension(extensionModel.get());
            inputSource = new InputSource(schema);
            inputSource.setPublicId(publicId);
            inputSource.setSystemId(systemId);
        }
    }
    return inputSource;
}
Also used : Optional.empty(java.util.Optional.empty) Optional.of(java.util.Optional.of) LoggerFactory(org.slf4j.LoggerFactory) HashMap(java.util.HashMap) Thread.currentThread(java.lang.Thread.currentThread) SpiServiceRegistry(org.mule.runtime.core.api.registry.SpiServiceRegistry) ByteArrayInputStream(java.io.ByteArrayInputStream) Map(java.util.Map) DslResolvingContext(org.mule.runtime.api.dsl.DslResolvingContext) ServiceRegistry(org.mule.runtime.core.api.registry.ServiceRegistry) EntityResolver(org.xml.sax.EntityResolver) InputSource(org.xml.sax.InputSource) Logger(org.slf4j.Logger) DelegatingEntityResolver(org.springframework.beans.factory.xml.DelegatingEntityResolver) I18nMessageFactory.createStaticMessage(org.mule.runtime.api.i18n.I18nMessageFactory.createStaticMessage) Collection(java.util.Collection) Set(java.util.Set) MuleRuntimeException(org.mule.runtime.api.exception.MuleRuntimeException) IOException(java.io.IOException) String.format(java.lang.String.format) ExtensionModel(org.mule.runtime.api.meta.model.ExtensionModel) ExtensionSchemaGenerator(org.mule.runtime.extension.api.dsl.syntax.resources.spi.ExtensionSchemaGenerator) SAXException(org.xml.sax.SAXException) Optional(java.util.Optional) InputStream(java.io.InputStream) InputSource(org.xml.sax.InputSource) ByteArrayInputStream(java.io.ByteArrayInputStream) InputStream(java.io.InputStream) ExtensionModel(org.mule.runtime.api.meta.model.ExtensionModel)

Example 33 with ExtensionModel

use of org.mule.runtime.api.meta.model.ExtensionModel in project mule by mulesoft.

the class ConfigurationBasedElementModelFactory method createIdentifiedElement.

private DslElementModel createIdentifiedElement(ComponentConfiguration configuration) {
    final ComponentIdentifier identifier = configuration.getIdentifier();
    Optional<Map.Entry<ExtensionModel, DslSyntaxResolver>> entry = resolvers.entrySet().stream().filter(e -> e.getKey().getXmlDslModel().getPrefix().equals(identifier.getNamespace())).findFirst();
    if (!entry.isPresent()) {
        return null;
    }
    currentExtension = entry.get().getKey();
    dsl = entry.get().getValue();
    Reference<DslElementModel> elementModel = new Reference<>();
    new ExtensionWalker() {

        @Override
        protected void onConfiguration(ConfigurationModel model) {
            final DslElementSyntax elementDsl = dsl.resolve(model);
            getIdentifier(elementDsl).ifPresent(elementId -> {
                if (elementId.equals(identifier)) {
                    DslElementModel.Builder<ConfigurationModel> element = createElementModel(model, elementDsl, configuration);
                    addConnectionProvider(model, dsl, element, configuration);
                    elementModel.set(element.build());
                    stop();
                }
            });
        }

        @Override
        protected void onConstruct(HasConstructModels owner, ConstructModel model) {
            final DslElementSyntax elementDsl = dsl.resolve(model);
            getIdentifier(elementDsl).ifPresent(elementId -> {
                if (elementId.equals(identifier)) {
                    elementModel.set(createElementModel(model, elementDsl, configuration).build());
                    stop();
                }
            });
        }

        @Override
        protected void onOperation(HasOperationModels owner, OperationModel model) {
            final DslElementSyntax elementDsl = dsl.resolve(model);
            getIdentifier(elementDsl).ifPresent(elementId -> {
                if (elementId.equals(identifier)) {
                    elementModel.set(createElementModel(model, elementDsl, configuration).build());
                    stop();
                }
            });
        }

        @Override
        protected void onSource(HasSourceModels owner, SourceModel model) {
            final DslElementSyntax elementDsl = dsl.resolve(model);
            getIdentifier(elementDsl).ifPresent(elementId -> {
                if (elementId.equals(identifier)) {
                    elementModel.set(createElementModel(model, elementDsl, configuration).build());
                    stop();
                }
            });
        }
    }.walk(currentExtension);
    if (elementModel.get() == null) {
        resolveBasedOnTypes(configuration).ifPresent(elementModel::set);
    }
    return elementModel.get();
}
Also used : ArrayListMultimap(com.google.common.collect.ArrayListMultimap) ExtensionMetadataTypeUtils.getId(org.mule.runtime.extension.api.util.ExtensionMetadataTypeUtils.getId) RECONNECT_FOREVER_ELEMENT_IDENTIFIER(org.mule.runtime.internal.dsl.DslConstants.RECONNECT_FOREVER_ELEMENT_IDENTIFIER) OperationModel(org.mule.runtime.api.meta.model.operation.OperationModel) CORE_PREFIX(org.mule.runtime.internal.dsl.DslConstants.CORE_PREFIX) Optional.of(java.util.Optional.of) TLS_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.TLS_PARAMETER_NAME) FlattenedTypeAnnotation(org.mule.runtime.extension.api.declaration.type.annotation.FlattenedTypeAnnotation) ComposableModel(org.mule.runtime.api.meta.model.ComposableModel) EXPIRATION_POLICY_ELEMENT_IDENTIFIER(org.mule.runtime.internal.dsl.DslConstants.EXPIRATION_POLICY_ELEMENT_IDENTIFIER) SourceModel(org.mule.runtime.api.meta.model.source.SourceModel) REDELIVERY_POLICY_ELEMENT_IDENTIFIER(org.mule.runtime.internal.dsl.DslConstants.REDELIVERY_POLICY_ELEMENT_IDENTIFIER) ArrayType(org.mule.metadata.api.model.ArrayType) KEY_ATTRIBUTE_NAME(org.mule.runtime.internal.dsl.DslConstants.KEY_ATTRIBUTE_NAME) Map(java.util.Map) Sets.newHashSet(com.google.common.collect.Sets.newHashSet) REPEATABLE_IN_MEMORY_BYTES_STREAM_ALIAS(org.mule.runtime.extension.api.declaration.type.StreamingStrategyTypeBuilder.REPEATABLE_IN_MEMORY_BYTES_STREAM_ALIAS) ParameterGroupModel(org.mule.runtime.api.meta.model.parameter.ParameterGroupModel) ClassTypeLoader(org.mule.metadata.api.ClassTypeLoader) REDELIVERY_POLICY_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.REDELIVERY_POLICY_PARAMETER_NAME) ConstructModel(org.mule.runtime.api.meta.model.construct.ConstructModel) DslElementModelFactory(org.mule.runtime.config.api.dsl.model.DslElementModelFactory) MetadataTypeUtils.getLocalPart(org.mule.metadata.api.utils.MetadataTypeUtils.getLocalPart) NestableElementModel(org.mule.runtime.api.meta.model.nested.NestableElementModel) ExtensionModelUtils.isContent(org.mule.runtime.extension.api.util.ExtensionModelUtils.isContent) RECONNECT_ELEMENT_IDENTIFIER(org.mule.runtime.internal.dsl.DslConstants.RECONNECT_ELEMENT_IDENTIFIER) ExtensionMetadataTypeUtils.isMap(org.mule.runtime.extension.api.util.ExtensionMetadataTypeUtils.isMap) SCHEDULING_STRATEGY_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.SCHEDULING_STRATEGY_PARAMETER_NAME) ObjectType(org.mule.metadata.api.model.ObjectType) RECONNECTION_STRATEGY_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.RECONNECTION_STRATEGY_PARAMETER_NAME) Set(java.util.Set) ExtensionModelUtils.isText(org.mule.runtime.extension.api.util.ExtensionModelUtils.isText) InternalComponentConfiguration(org.mule.runtime.dsl.internal.component.config.InternalComponentConfiguration) POOLING_PROFILE_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.POOLING_PROFILE_PARAMETER_NAME) MetadataTypeVisitor(org.mule.metadata.api.visitor.MetadataTypeVisitor) Objects(java.util.Objects) NestedRouteModel(org.mule.runtime.api.meta.model.nested.NestedRouteModel) List(java.util.List) StringUtils.isNotBlank(org.apache.commons.lang3.StringUtils.isNotBlank) NON_REPEATABLE_BYTE_STREAM_ALIAS(org.mule.runtime.extension.api.declaration.type.StreamingStrategyTypeBuilder.NON_REPEATABLE_BYTE_STREAM_ALIAS) HasOperationModels(org.mule.runtime.api.meta.model.operation.HasOperationModels) DslElementSyntax(org.mule.runtime.extension.api.dsl.syntax.DslElementSyntax) REPEATABLE_FILE_STORE_OBJECTS_STREAM_ALIAS(org.mule.runtime.extension.api.declaration.type.StreamingStrategyTypeBuilder.REPEATABLE_FILE_STORE_OBJECTS_STREAM_ALIAS) ExtensionModelUtils.isInfrastructure(org.mule.runtime.extension.api.util.ExtensionModelUtils.isInfrastructure) MetadataType(org.mule.metadata.api.model.MetadataType) DslSyntaxResolver(org.mule.runtime.extension.api.dsl.syntax.resolver.DslSyntaxResolver) Optional(java.util.Optional) EE_PREFIX(org.mule.runtime.internal.dsl.DslConstants.EE_PREFIX) ComponentIdentifier.builder(org.mule.runtime.api.component.ComponentIdentifier.builder) NON_REPEATABLE_OBJECTS_STREAM_ALIAS(org.mule.runtime.extension.api.declaration.type.StreamingStrategyTypeBuilder.NON_REPEATABLE_OBJECTS_STREAM_ALIAS) ExtensionModelUtils.isRequired(org.mule.runtime.extension.api.util.ExtensionModelUtils.isRequired) Optional.empty(java.util.Optional.empty) ParameterModel(org.mule.runtime.api.meta.model.parameter.ParameterModel) CronScheduler(org.mule.runtime.core.api.source.scheduler.CronScheduler) CRON_STRATEGY_ELEMENT_IDENTIFIER(org.mule.runtime.internal.dsl.DslConstants.CRON_STRATEGY_ELEMENT_IDENTIFIER) REPEATABLE_IN_MEMORY_OBJECTS_STREAM_ALIAS(org.mule.runtime.extension.api.declaration.type.StreamingStrategyTypeBuilder.REPEATABLE_IN_MEMORY_OBJECTS_STREAM_ALIAS) HasConstructModels(org.mule.runtime.api.meta.model.construct.HasConstructModels) ExtensionsTypeLoaderFactory(org.mule.runtime.extension.api.declaration.type.ExtensionsTypeLoaderFactory) REPEATABLE_FILE_STORE_BYTES_STREAM_ALIAS(org.mule.runtime.extension.api.declaration.type.StreamingStrategyTypeBuilder.REPEATABLE_FILE_STORE_BYTES_STREAM_ALIAS) VALUE_ATTRIBUTE_NAME(org.mule.runtime.internal.dsl.DslConstants.VALUE_ATTRIBUTE_NAME) ComponentConfiguration(org.mule.runtime.dsl.api.component.config.ComponentConfiguration) Multimap(com.google.common.collect.Multimap) Deque(java.util.Deque) EXPIRATION_POLICY_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.EXPIRATION_POLICY_PARAMETER_NAME) ExtensionModelUtils.getDefaultValue(org.mule.runtime.extension.api.util.ExtensionModelUtils.getDefaultValue) Stream.concat(java.util.stream.Stream.concat) ParameterizedModel(org.mule.runtime.api.meta.model.parameter.ParameterizedModel) Iterator(java.util.Iterator) ConfigurationModel(org.mule.runtime.api.meta.model.config.ConfigurationModel) RECONNECTION_CONFIG_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.RECONNECTION_CONFIG_PARAMETER_NAME) FixedFrequencyScheduler(org.mule.runtime.core.api.source.scheduler.FixedFrequencyScheduler) ExtensionModel(org.mule.runtime.api.meta.model.ExtensionModel) DslElementModel(org.mule.runtime.config.api.dsl.model.DslElementModel) Collectors.toList(java.util.stream.Collectors.toList) STREAMING_STRATEGY_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.STREAMING_STRATEGY_PARAMETER_NAME) StringUtils.isBlank(org.apache.commons.lang3.StringUtils.isBlank) ExtensionWalker(org.mule.runtime.api.meta.model.util.ExtensionWalker) Reference(org.mule.runtime.api.util.Reference) SCHEDULING_STRATEGY_ELEMENT_IDENTIFIER(org.mule.runtime.internal.dsl.DslConstants.SCHEDULING_STRATEGY_ELEMENT_IDENTIFIER) ComponentIdentifier(org.mule.runtime.api.component.ComponentIdentifier) ArrayDeque(java.util.ArrayDeque) HasSourceModels(org.mule.runtime.api.meta.model.source.HasSourceModels) HasOperationModels(org.mule.runtime.api.meta.model.operation.HasOperationModels) ConfigurationModel(org.mule.runtime.api.meta.model.config.ConfigurationModel) Reference(org.mule.runtime.api.util.Reference) ExtensionWalker(org.mule.runtime.api.meta.model.util.ExtensionWalker) ComponentIdentifier(org.mule.runtime.api.component.ComponentIdentifier) SourceModel(org.mule.runtime.api.meta.model.source.SourceModel) ConstructModel(org.mule.runtime.api.meta.model.construct.ConstructModel) DslElementSyntax(org.mule.runtime.extension.api.dsl.syntax.DslElementSyntax) HasConstructModels(org.mule.runtime.api.meta.model.construct.HasConstructModels) DslElementModel(org.mule.runtime.config.api.dsl.model.DslElementModel) HasSourceModels(org.mule.runtime.api.meta.model.source.HasSourceModels) OperationModel(org.mule.runtime.api.meta.model.operation.OperationModel)

Example 34 with ExtensionModel

use of org.mule.runtime.api.meta.model.ExtensionModel in project mule by mulesoft.

the class DeclarationBasedElementModelFactory method createComponentElement.

private DslElementModel<? extends ComponentModel> createComponentElement(ComponentModel model, ComponentElementDeclaration<?> componentDeclaration) {
    DslElementSyntax configDsl = dsl.resolve(model);
    InternalComponentConfiguration.Builder configuration = InternalComponentConfiguration.builder().withIdentifier(asIdentifier(configDsl));
    if (componentDeclaration instanceof ReferableElementDeclaration) {
        configuration.withParameter(NAME_ATTRIBUTE_NAME, ((ReferableElementDeclaration) componentDeclaration).getRefName());
    }
    if (componentDeclaration.getConfigRef() != null) {
        configuration.withParameter(CONFIG_ATTRIBUTE_NAME, componentDeclaration.getConfigRef());
    }
    DslElementModel.Builder<? extends ComponentModel> componentElement = createParameterizedElementModel(model, configDsl, componentDeclaration, configuration);
    ExtensionModel componentsOwner = currentExtension;
    DslSyntaxResolver componentsDslResolver = dsl;
    componentDeclaration.getComponents().forEach(nestedComponentDeclaration -> {
        if (nestedComponentDeclaration instanceof RouteElementDeclaration) {
            if (model instanceof ComposableModel) {
                ((ComposableModel) model).getNestedComponents().stream().filter(nestedModel -> nestedModel instanceof NestedRouteModel && nestedModel.getName().equals(nestedComponentDeclaration.getName())).findFirst().ifPresent(nestedRouteModel -> componentElement.containing(crateRouteElement((NestedRouteModel) nestedRouteModel, (RouteElementDeclaration) nestedComponentDeclaration)));
            }
        } else {
            create(nestedComponentDeclaration).ifPresent(nestedComponentElement -> {
                nestedComponentElement.getConfiguration().ifPresent(configuration::withNestedComponent);
                componentElement.containing(nestedComponentElement);
            });
        }
        currentExtension = componentsOwner;
        dsl = componentsDslResolver;
    });
    return componentElement.withConfig(configuration.build()).build();
}
Also used : RouteElementDeclaration(org.mule.runtime.app.declaration.api.RouteElementDeclaration) ComposableModel(org.mule.runtime.api.meta.model.ComposableModel) DslElementSyntax(org.mule.runtime.extension.api.dsl.syntax.DslElementSyntax) ExtensionModel(org.mule.runtime.api.meta.model.ExtensionModel) ReferableElementDeclaration(org.mule.runtime.app.declaration.api.ReferableElementDeclaration) DslSyntaxResolver(org.mule.runtime.extension.api.dsl.syntax.resolver.DslSyntaxResolver) DslElementModel(org.mule.runtime.config.api.dsl.model.DslElementModel) InternalComponentConfiguration(org.mule.runtime.dsl.internal.component.config.InternalComponentConfiguration) NestedRouteModel(org.mule.runtime.api.meta.model.nested.NestedRouteModel)

Example 35 with ExtensionModel

use of org.mule.runtime.api.meta.model.ExtensionModel in project mule by mulesoft.

the class DeclarationBasedElementModelFactory method crateRouteElement.

private DslElementModel<? extends NestedRouteModel> crateRouteElement(NestedRouteModel model, RouteElementDeclaration routeDeclaration) {
    DslElementSyntax routeDsl = dsl.resolve(model);
    InternalComponentConfiguration.Builder routeConfiguration = InternalComponentConfiguration.builder().withIdentifier(asIdentifier(routeDsl));
    DslElementModel.Builder<? extends NestedRouteModel> routeElement = createParameterizedElementModel(model, routeDsl, routeDeclaration, routeConfiguration);
    ExtensionModel routerOwner = currentExtension;
    DslSyntaxResolver routerDslResolver = dsl;
    routeDeclaration.getComponents().forEach(componentDeclaration -> {
        create(componentDeclaration).ifPresent(componentElement -> {
            componentElement.getConfiguration().ifPresent(routeConfiguration::withNestedComponent);
            routeElement.containing(componentElement);
        });
        currentExtension = routerOwner;
        dsl = routerDslResolver;
    });
    return routeElement.withConfig(routeConfiguration.build()).build();
}
Also used : DslElementSyntax(org.mule.runtime.extension.api.dsl.syntax.DslElementSyntax) ExtensionModel(org.mule.runtime.api.meta.model.ExtensionModel) DslSyntaxResolver(org.mule.runtime.extension.api.dsl.syntax.resolver.DslSyntaxResolver) DslElementModel(org.mule.runtime.config.api.dsl.model.DslElementModel) InternalComponentConfiguration(org.mule.runtime.dsl.internal.component.config.InternalComponentConfiguration)

Aggregations

ExtensionModel (org.mule.runtime.api.meta.model.ExtensionModel)94 Test (org.junit.Test)50 SmallTest (org.mule.tck.size.SmallTest)34 OperationModel (org.mule.runtime.api.meta.model.operation.OperationModel)31 Optional (java.util.Optional)26 ConfigurationModel (org.mule.runtime.api.meta.model.config.ConfigurationModel)24 List (java.util.List)22 Set (java.util.Set)19 MuleRuntimeException (org.mule.runtime.api.exception.MuleRuntimeException)19 ParameterModel (org.mule.runtime.api.meta.model.parameter.ParameterModel)19 ConnectionProviderModel (org.mule.runtime.api.meta.model.connection.ConnectionProviderModel)16 HashMap (java.util.HashMap)15 SourceModel (org.mule.runtime.api.meta.model.source.SourceModel)15 String.format (java.lang.String.format)13 Collectors.toList (java.util.stream.Collectors.toList)13 HashSet (java.util.HashSet)12 Map (java.util.Map)12 Reference (org.mule.runtime.api.util.Reference)12 Optional.empty (java.util.Optional.empty)11 ObjectType (org.mule.metadata.api.model.ObjectType)11