Search in sources :

Example 1 with ConfigLine

use of org.mule.runtime.config.api.dsl.processor.ConfigLine in project mule by mulesoft.

the class XmlApplicationParser method configLineFromElement.

private Optional<ConfigLine> configLineFromElement(Node node, ConfigLineProvider parentProvider) {
    if (!isValidType(node)) {
        return Optional.empty();
    }
    String identifier = parseIdentifier(node);
    String namespace = parseNamespace(node);
    ConfigLine.Builder builder = new ConfigLine.Builder().setIdentifier(identifier).setNamespace(namespace).setNode(node).setParent(parentProvider);
    XmlMetadataAnnotations userData = (XmlMetadataAnnotations) node.getUserData(XmlMetadataAnnotations.METADATA_ANNOTATIONS_KEY);
    int lineNumber = userData.getLineNumber();
    builder.setLineNumber(lineNumber);
    to(builder).addNode(node);
    Element element = (Element) node;
    NamedNodeMap attributes = element.getAttributes();
    if (element.hasAttributes()) {
        for (int i = 0; i < attributes.getLength(); i++) {
            Node attribute = attributes.item(i);
            Attr attributeNode = element.getAttributeNode(attribute.getNodeName());
            boolean isFromXsd = !attributeNode.getSpecified();
            builder.addConfigAttribute(attribute.getNodeName(), attribute.getNodeValue(), isFromXsd);
        }
    }
    if (node.hasChildNodes()) {
        NodeList children = node.getChildNodes();
        for (int i = 0; i < children.getLength(); i++) {
            Node child = children.item(i);
            if (isTextContent(child)) {
                builder.setTextContent(child.getNodeValue());
                if (child.getNodeType() == Node.CDATA_SECTION_NODE) {
                    builder.addCustomAttribute(IS_CDATA, Boolean.TRUE);
                    break;
                }
            } else {
                configLineFromElement(child, builder::build).ifPresent(builder::addChild);
            }
        }
    }
    return Optional.of(builder.build());
}
Also used : NamedNodeMap(org.w3c.dom.NamedNodeMap) CacheBuilder(com.google.common.cache.CacheBuilder) Builder(com.google.common.collect.ImmutableList.Builder) Element(org.w3c.dom.Element) Node(org.w3c.dom.Node) NodeList(org.w3c.dom.NodeList) ConfigLine(org.mule.runtime.config.api.dsl.processor.ConfigLine) Attr(org.w3c.dom.Attr) XmlMetadataAnnotations(org.mule.runtime.config.internal.parsers.XmlMetadataAnnotations)

Example 2 with ConfigLine

use of org.mule.runtime.config.api.dsl.processor.ConfigLine in project mule by mulesoft.

the class DefaultXmlArtifactDeclarationLoader method createWrappedObject.

private void createWrappedObject(ObjectType objectType, ParameterObjectValue.Builder objectValue, ConfigLine config) {
    ConfigLine wrappedConfig = config.getChildren().get(0);
    DslSyntaxResolver wrappedElementResolver = resolvers.get(getNamespace(wrappedConfig));
    Set<ObjectType> subTypes = context.getTypeCatalog().getSubTypes(objectType);
    if (!subTypes.isEmpty()) {
        subTypes.stream().filter(subType -> wrappedElementResolver.resolve(subType).map(dsl -> dsl.getElementName().equals(wrappedConfig.getIdentifier())).orElse(false)).findFirst().ifPresent(subType -> createObjectValueFromType(subType, objectValue, wrappedConfig, wrappedElementResolver.resolve(subType).get()));
    } else if (objectType.getAnnotation(ExtensibleTypeAnnotation.class).isPresent()) {
        createObjectValueFromType(objectType, objectValue, wrappedConfig, wrappedElementResolver.resolve(objectType).get());
    }
}
Also used : ObjectType(org.mule.metadata.api.model.ObjectType) ConfigLine(org.mule.runtime.config.api.dsl.processor.ConfigLine) DslSyntaxResolver(org.mule.runtime.extension.api.dsl.syntax.resolver.DslSyntaxResolver)

Example 3 with ConfigLine

use of org.mule.runtime.config.api.dsl.processor.ConfigLine in project mule by mulesoft.

the class DefaultXmlArtifactDeclarationLoader method declareChildParameters.

private void declareChildParameters(ParameterizedModel model, DslElementSyntax modelDsl, List<ConfigLine> children, ParameterizedElementDeclarer declarer) {
    model.getParameterGroupModels().forEach(group -> {
        if (group.isShowInDsl()) {
            modelDsl.getChild(group.getName()).ifPresent(groupDsl -> children.stream().filter(c -> c.getIdentifier().equals(groupDsl.getElementName())).findFirst().ifPresent(groupConfig -> declareInlineGroup(group, groupDsl, groupConfig, declarer)));
        } else {
            ParameterGroupElementDeclarer groupDeclarer = newParameterGroup(group.getName());
            group.getParameterModels().forEach(param -> modelDsl.getChild(param.getName()).ifPresent(paramDsl -> {
                if (isInfrastructure(param)) {
                    handleInfrastructure(param, children, declarer);
                } else {
                    children.stream().filter(c -> c.getIdentifier().equals(paramDsl.getElementName())).findFirst().ifPresent(paramConfig -> param.getType().accept(getParameterDeclarerVisitor(paramConfig, paramDsl, value -> groupDeclarer.withParameter(param.getName(), value))));
                }
            }));
            if (!groupDeclarer.getDeclaration().getParameters().isEmpty()) {
                declarer.withParameterGroup(groupDeclarer.getDeclaration());
            }
        }
    });
}
Also used : Arrays(java.util.Arrays) CORE_PREFIX(org.mule.runtime.internal.dsl.DslConstants.CORE_PREFIX) SimpleConfigAttribute(org.mule.runtime.config.api.dsl.processor.SimpleConfigAttribute) TLS_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.TLS_PARAMETER_NAME) MuleApplicationClassLoader.resolveContextArtifactPluginClassLoaders(org.mule.runtime.deployment.model.internal.application.MuleApplicationClassLoader.resolveContextArtifactPluginClassLoaders) SpiServiceRegistry(org.mule.runtime.core.api.registry.SpiServiceRegistry) EXPIRATION_POLICY_ELEMENT_IDENTIFIER(org.mule.runtime.internal.dsl.DslConstants.EXPIRATION_POLICY_ELEMENT_IDENTIFIER) REDELIVERY_POLICY_ELEMENT_IDENTIFIER(org.mule.runtime.internal.dsl.DslConstants.REDELIVERY_POLICY_ELEMENT_IDENTIFIER) ArrayType(org.mule.metadata.api.model.ArrayType) Document(org.w3c.dom.Document) Map(java.util.Map) ParameterSimpleValue(org.mule.runtime.app.declaration.api.fluent.ParameterSimpleValue) ParameterGroupElementDeclarer(org.mule.runtime.app.declaration.api.fluent.ParameterGroupElementDeclarer) MetadataTypeUtils.getLocalPart(org.mule.metadata.api.utils.MetadataTypeUtils.getLocalPart) ElementDeclarer(org.mule.runtime.app.declaration.api.fluent.ElementDeclarer) RECONNECT_ELEMENT_IDENTIFIER(org.mule.runtime.internal.dsl.DslConstants.RECONNECT_ELEMENT_IDENTIFIER) ExtensionMetadataTypeUtils.isMap(org.mule.runtime.extension.api.util.ExtensionMetadataTypeUtils.isMap) ObjectType(org.mule.metadata.api.model.ObjectType) ElementDeclarer.newObjectValue(org.mule.runtime.app.declaration.api.fluent.ElementDeclarer.newObjectValue) Set(java.util.Set) MuleRuntimeException(org.mule.runtime.api.exception.MuleRuntimeException) POOLING_PROFILE_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.POOLING_PROFILE_PARAMETER_NAME) MetadataTypeVisitor(org.mule.metadata.api.visitor.MetadataTypeVisitor) NON_REPEATABLE_BYTE_STREAM_ALIAS(org.mule.runtime.extension.api.declaration.type.StreamingStrategyTypeBuilder.NON_REPEATABLE_BYTE_STREAM_ALIAS) XmlArtifactDeclarationLoader(org.mule.runtime.config.internal.dsl.model.XmlArtifactDeclarationLoader) 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) CONFIG_ATTRIBUTE_NAME(org.mule.runtime.internal.dsl.DslConstants.CONFIG_ATTRIBUTE_NAME) ConnectionProviderModel(org.mule.runtime.api.meta.model.connection.ConnectionProviderModel) REPEATABLE_FILE_STORE_BYTES_STREAM_ALIAS(org.mule.runtime.extension.api.declaration.type.StreamingStrategyTypeBuilder.REPEATABLE_FILE_STORE_BYTES_STREAM_ALIAS) RouteElementDeclaration(org.mule.runtime.app.declaration.api.RouteElementDeclaration) VALUE_ATTRIBUTE_NAME(org.mule.runtime.internal.dsl.DslConstants.VALUE_ATTRIBUTE_NAME) ParameterSimpleValue.cdata(org.mule.runtime.app.declaration.api.fluent.ParameterSimpleValue.cdata) ConfigurationElementDeclarer(org.mule.runtime.app.declaration.api.fluent.ConfigurationElementDeclarer) ParameterListValue(org.mule.runtime.app.declaration.api.fluent.ParameterListValue) ParameterSimpleValue.plain(org.mule.runtime.app.declaration.api.fluent.ParameterSimpleValue.plain) EXPIRATION_POLICY_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.EXPIRATION_POLICY_PARAMETER_NAME) ConnectionElementDeclarer(org.mule.runtime.app.declaration.api.fluent.ConnectionElementDeclarer) ElementDeclarer.newListValue(org.mule.runtime.app.declaration.api.fluent.ElementDeclarer.newListValue) XmlConfigurationDocumentLoader.noValidationDocumentLoader(org.mule.runtime.config.api.XmlConfigurationDocumentLoader.noValidationDocumentLoader) ConstructElementDeclarer(org.mule.runtime.app.declaration.api.fluent.ConstructElementDeclarer) GlobalElementDeclaration(org.mule.runtime.app.declaration.api.GlobalElementDeclaration) ParameterizedModel(org.mule.runtime.api.meta.model.parameter.ParameterizedModel) ParameterValue(org.mule.runtime.app.declaration.api.ParameterValue) I18nMessageFactory.createStaticMessage(org.mule.runtime.api.i18n.I18nMessageFactory.createStaticMessage) ConfigurationModel(org.mule.runtime.api.meta.model.config.ConfigurationModel) RECONNECTION_CONFIG_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.RECONNECTION_CONFIG_PARAMETER_NAME) ExtensionModel(org.mule.runtime.api.meta.model.ExtensionModel) STREAMING_STRATEGY_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.STREAMING_STRATEGY_PARAMETER_NAME) ExtensionWalker(org.mule.runtime.api.meta.model.util.ExtensionWalker) Reference(org.mule.runtime.api.util.Reference) ParameterizedBuilder(org.mule.runtime.app.declaration.api.fluent.ParameterizedBuilder) ComponentElementDeclarer(org.mule.runtime.app.declaration.api.fluent.ComponentElementDeclarer) ElementDeclarer.forExtension(org.mule.runtime.app.declaration.api.fluent.ElementDeclarer.forExtension) ExtensionMetadataTypeUtils.getId(org.mule.runtime.extension.api.util.ExtensionMetadataTypeUtils.getId) TLS_REVOCATION_CHECK_ELEMENT_IDENTIFIER(org.mule.runtime.internal.dsl.DslConstants.TLS_REVOCATION_CHECK_ELEMENT_IDENTIFIER) RECONNECT_FOREVER_ELEMENT_IDENTIFIER(org.mule.runtime.internal.dsl.DslConstants.RECONNECT_FOREVER_ELEMENT_IDENTIFIER) OperationModel(org.mule.runtime.api.meta.model.operation.OperationModel) HasNestedComponentDeclarer(org.mule.runtime.app.declaration.api.fluent.HasNestedComponentDeclarer) Preconditions.checkArgument(com.google.common.base.Preconditions.checkArgument) ComposableModel(org.mule.runtime.api.meta.model.ComposableModel) SourceModel(org.mule.runtime.api.meta.model.source.SourceModel) Collectors.toMap(java.util.stream.Collectors.toMap) XmlApplicationParser(org.mule.runtime.config.api.dsl.processor.xml.XmlApplicationParser) ArtifactDeclarer(org.mule.runtime.app.declaration.api.fluent.ArtifactDeclarer) KEY_ATTRIBUTE_NAME(org.mule.runtime.internal.dsl.DslConstants.KEY_ATTRIBUTE_NAME) DslResolvingContext(org.mule.runtime.api.dsl.DslResolvingContext) 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) TLS_CONTEXT_ELEMENT_IDENTIFIER(org.mule.runtime.internal.dsl.DslConstants.TLS_CONTEXT_ELEMENT_IDENTIFIER) REDELIVERY_POLICY_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.REDELIVERY_POLICY_PARAMETER_NAME) ConstructModel(org.mule.runtime.api.meta.model.construct.ConstructModel) CONNECTION(org.mule.runtime.api.meta.model.parameter.ParameterGroupModel.CONNECTION) RECONNECTION_STRATEGY_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.RECONNECTION_STRATEGY_PARAMETER_NAME) NAME_ATTRIBUTE_NAME(org.mule.runtime.internal.dsl.DslConstants.NAME_ATTRIBUTE_NAME) NestedRouteModel(org.mule.runtime.api.meta.model.nested.NestedRouteModel) List(java.util.List) HasOperationModels(org.mule.runtime.api.meta.model.operation.HasOperationModels) DslElementSyntax(org.mule.runtime.extension.api.dsl.syntax.DslElementSyntax) Optional(java.util.Optional) ParameterModel(org.mule.runtime.api.meta.model.parameter.ParameterModel) HasConstructModels(org.mule.runtime.api.meta.model.construct.HasConstructModels) POOLING_PROFILE_ELEMENT_IDENTIFIER(org.mule.runtime.internal.dsl.DslConstants.POOLING_PROFILE_ELEMENT_IDENTIFIER) ComponentModel(org.mule.runtime.api.meta.model.ComponentModel) RouteElementDeclarer(org.mule.runtime.app.declaration.api.fluent.RouteElementDeclarer) HashMap(java.util.HashMap) Function(java.util.function.Function) ArtifactDeclaration(org.mule.runtime.app.declaration.api.ArtifactDeclaration) XmlApplicationServiceRegistry(org.mule.runtime.config.api.dsl.processor.xml.XmlApplicationServiceRegistry) ParameterObjectValue(org.mule.runtime.app.declaration.api.fluent.ParameterObjectValue) ConfigLine(org.mule.runtime.config.api.dsl.processor.ConfigLine) ElementDeclarer.newParameterGroup(org.mule.runtime.app.declaration.api.fluent.ElementDeclarer.newParameterGroup) ParameterizedElementDeclarer(org.mule.runtime.app.declaration.api.fluent.ParameterizedElementDeclarer) Consumer(java.util.function.Consumer) Collectors.toList(java.util.stream.Collectors.toList) TopLevelParameterDeclarer(org.mule.runtime.app.declaration.api.fluent.TopLevelParameterDeclarer) StringUtils.isBlank(org.apache.commons.lang3.StringUtils.isBlank) IS_CDATA(org.mule.runtime.config.internal.dsl.processor.xml.XmlCustomAttributeHandler.IS_CDATA) ComponentElementDeclaration(org.mule.runtime.app.declaration.api.ComponentElementDeclaration) ExtensibleTypeAnnotation(org.mule.runtime.extension.api.declaration.type.annotation.ExtensibleTypeAnnotation) HasSourceModels(org.mule.runtime.api.meta.model.source.HasSourceModels) InputStream(java.io.InputStream) ParameterGroupElementDeclarer(org.mule.runtime.app.declaration.api.fluent.ParameterGroupElementDeclarer)

Example 4 with ConfigLine

use of org.mule.runtime.config.api.dsl.processor.ConfigLine in project mule by mulesoft.

the class ApplicationModel method resolveConfigurationParameters.

private ConfigurationParameters resolveConfigurationParameters(DefaultConfigurationParameters.Builder configurationParametersBuilder, ConfigLine componentConfigLine, ConfigurationPropertiesResolver localResolver) {
    componentConfigLine.getConfigAttributes().forEach((key, value) -> configurationParametersBuilder.withSimpleParameter(key, localResolver.resolveValue(value.getValue())));
    for (ConfigLine childConfigLine : componentConfigLine.getChildren()) {
        DefaultConfigurationParameters.Builder childParametersBuilder = DefaultConfigurationParameters.builder();
        configurationParametersBuilder.withComplexParameter(ComponentIdentifier.builder().name(childConfigLine.getIdentifier()).namespace(childConfigLine.getNamespace()).build(), resolveConfigurationParameters(childParametersBuilder, childConfigLine, localResolver));
    }
    return configurationParametersBuilder.build();
}
Also used : ConfigLine(org.mule.runtime.config.api.dsl.processor.ConfigLine) DefaultConfigurationParameters(org.mule.runtime.config.internal.dsl.model.DefaultConfigurationParameters)

Example 5 with ConfigLine

use of org.mule.runtime.config.api.dsl.processor.ConfigLine in project mule by mulesoft.

the class ApplicationModel method getConfigurationPropertiesProvidersFromComponents.

private List<ConfigurationPropertiesProvider> getConfigurationPropertiesProvidersFromComponents(ArtifactConfig artifactConfig, ConfigurationPropertiesResolver localResolver) {
    Map<ComponentIdentifier, ConfigurationPropertiesProviderFactory> providerFactoriesMap = new HashMap<>();
    ServiceLoader<ConfigurationPropertiesProviderFactory> providerFactories = java.util.ServiceLoader.load(ConfigurationPropertiesProviderFactory.class);
    providerFactories.forEach(service -> {
        ComponentIdentifier componentIdentifier = service.getSupportedComponentIdentifier();
        if (providerFactoriesMap.containsKey(componentIdentifier)) {
            throw new MuleRuntimeException(createStaticMessage("Multiple configuration providers for component: " + componentIdentifier));
        }
        providerFactoriesMap.put(componentIdentifier, service);
    });
    List<ConfigurationPropertiesProvider> configConfigurationPropertiesProviders = new ArrayList<>();
    artifactConfig.getConfigFiles().stream().forEach(configFile -> configFile.getConfigLines().stream().forEach(configLine -> {
        for (ConfigLine componentConfigLine : configLine.getChildren()) {
            if (componentConfigLine.getNamespace() == null) {
                continue;
            }
            ComponentIdentifier componentIdentifier = ComponentIdentifier.builder().namespace(componentConfigLine.getNamespace()).name(componentConfigLine.getIdentifier()).build();
            if (!providerFactoriesMap.containsKey(componentIdentifier)) {
                continue;
            }
            DefaultConfigurationParameters.Builder configurationParametersBuilder = DefaultConfigurationParameters.builder();
            ConfigurationParameters configurationParameters = resolveConfigurationParameters(configurationParametersBuilder, componentConfigLine, localResolver);
            ConfigurationPropertiesProvider provider = providerFactoriesMap.get(componentIdentifier).createProvider(configurationParameters, externalResourceProvider);
            if (provider instanceof Component) {
                Component providerComponent = (Component) provider;
                TypedComponentIdentifier typedComponentIdentifier = TypedComponentIdentifier.builder().type(UNKNOWN).identifier(componentIdentifier).build();
                DefaultComponentLocation.DefaultLocationPart locationPart = new DefaultComponentLocation.DefaultLocationPart(componentIdentifier.getName(), of(typedComponentIdentifier), of(configFile.getFilename()), of(configLine.getLineNumber()));
                providerComponent.setAnnotations(ImmutableMap.<QName, Object>builder().put(AbstractComponent.LOCATION_KEY, new DefaultComponentLocation(of(componentIdentifier.getName()), singletonList(locationPart))).build());
            }
            configConfigurationPropertiesProviders.add(provider);
            try {
                initialiseIfNeeded(provider);
            } catch (InitialisationException e) {
                throw new MuleRuntimeException(e);
            }
        }
    }));
    return configConfigurationPropertiesProviders;
}
Also used : ResourceProvider(org.mule.runtime.config.api.dsl.model.ResourceProvider) MacroExpansionModulesModel(org.mule.runtime.config.internal.dsl.model.extension.xml.MacroExpansionModulesModel) CORE_PREFIX(org.mule.runtime.internal.dsl.DslConstants.CORE_PREFIX) MULE_ROOT_ELEMENT(org.mule.runtime.config.api.dsl.CoreDslConstants.MULE_ROOT_ELEMENT) Optional.of(java.util.Optional.of) InitialisationException(org.mule.runtime.api.lifecycle.InitialisationException) ConfigurationProperty(org.mule.runtime.config.api.dsl.model.properties.ConfigurationProperty) Collections.singletonList(java.util.Collections.singletonList) ClassUtils(org.apache.commons.lang3.ClassUtils) DefaultConfigurationParameters(org.mule.runtime.config.internal.dsl.model.DefaultConfigurationParameters) Arrays.asList(java.util.Arrays.asList) Map(java.util.Map) MULE_EE_DOMAIN_IDENTIFIER(org.mule.runtime.config.api.dsl.CoreDslConstants.MULE_EE_DOMAIN_IDENTIFIER) DslResolvingContext(org.mule.runtime.api.dsl.DslResolvingContext) DslElementModelFactory(org.mule.runtime.config.api.dsl.model.DslElementModelFactory) ERROR_HANDLER_IDENTIFIER(org.mule.runtime.config.api.dsl.CoreDslConstants.ERROR_HANDLER_IDENTIFIER) ComponentModelReader(org.mule.runtime.config.internal.dsl.model.ComponentModelReader) CompositeConfigurationPropertiesProvider(org.mule.runtime.config.internal.dsl.model.config.CompositeConfigurationPropertiesProvider) PropertiesResolverConfigurationProperties(org.mule.runtime.config.internal.dsl.model.config.PropertiesResolverConfigurationProperties) EnvironmentPropertiesConfigurationProvider(org.mule.runtime.config.internal.dsl.model.config.EnvironmentPropertiesConfigurationProvider) MULE_DOMAIN_IDENTIFIER(org.mule.runtime.config.api.dsl.CoreDslConstants.MULE_DOMAIN_IDENTIFIER) DEFAULT_EXPRESSION_PREFIX(org.mule.runtime.core.api.el.ExpressionManager.DEFAULT_EXPRESSION_PREFIX) ImmutableSet(com.google.common.collect.ImmutableSet) ComponentModelHelper.resolveComponentType(org.mule.runtime.config.internal.dsl.spring.ComponentModelHelper.resolveComponentType) MapConfigurationPropertiesProvider(org.mule.runtime.config.internal.dsl.model.config.MapConfigurationPropertiesProvider) TypedComponentIdentifier(org.mule.runtime.api.component.TypedComponentIdentifier) ImmutableMap(com.google.common.collect.ImmutableMap) Set(java.util.Set) UNKNOWN(org.mule.runtime.api.component.TypedComponentIdentifier.ComponentType.UNKNOWN) MuleRuntimeException(org.mule.runtime.api.exception.MuleRuntimeException) ServiceLoader(java.util.ServiceLoader) SOURCE_TYPE(org.mule.runtime.config.internal.dsl.spring.BeanDefinitionFactory.SOURCE_TYPE) NameValidationUtil.verifyStringDoesNotContainsReservedCharacters(org.mule.runtime.internal.util.NameValidationUtil.verifyStringDoesNotContainsReservedCharacters) String.format(java.lang.String.format) FileConfigurationPropertiesProvider(org.mule.runtime.config.internal.dsl.model.config.FileConfigurationPropertiesProvider) ERROR_HANDLER(org.mule.runtime.config.api.dsl.CoreDslConstants.ERROR_HANDLER) I18nMessageFactory(org.mule.runtime.api.i18n.I18nMessageFactory) XmlCustomAttributeHandler(org.mule.runtime.config.internal.dsl.processor.xml.XmlCustomAttributeHandler) ComponentBuildingDefinition(org.mule.runtime.dsl.api.component.ComponentBuildingDefinition) List(java.util.List) ElementDeclaration(org.mule.runtime.app.declaration.api.ElementDeclaration) GlobalPropertyConfigurationPropertiesProvider(org.mule.runtime.config.internal.dsl.model.config.GlobalPropertyConfigurationPropertiesProvider) Optional(java.util.Optional) QName(javax.xml.namespace.QName) MuleExtensionModelProvider(org.mule.runtime.core.api.extension.MuleExtensionModelProvider) ComponentIdentifier.builder(org.mule.runtime.api.component.ComponentIdentifier.builder) Optional.empty(java.util.Optional.empty) ComponentBuildingDefinitionRegistry(org.mule.runtime.config.api.dsl.model.ComponentBuildingDefinitionRegistry) DefaultComponentLocation(org.mule.runtime.dsl.api.component.config.DefaultComponentLocation) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) HashMap(java.util.HashMap) LifecycleUtils.initialiseIfNeeded(org.mule.runtime.core.api.lifecycle.LifecycleUtils.initialiseIfNeeded) ConfigurationProperties(org.mule.runtime.api.component.ConfigurationProperties) ComponentConfiguration(org.mule.runtime.dsl.api.component.config.ComponentConfiguration) ComponentLocationVisitor(org.mule.runtime.config.internal.dsl.model.ComponentLocationVisitor) NameUtils.pluralize(org.mule.runtime.extension.api.util.NameUtils.pluralize) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) MULE_IDENTIFIER(org.mule.runtime.config.api.dsl.CoreDslConstants.MULE_IDENTIFIER) ConfigurationPropertiesProvider(org.mule.runtime.config.api.dsl.model.properties.ConfigurationPropertiesProvider) ArtifactDeclaration(org.mule.runtime.app.declaration.api.ArtifactDeclaration) Component(org.mule.runtime.api.component.Component) Node(org.w3c.dom.Node) BiConsumer(java.util.function.BiConsumer) FLOW_IDENTIFIER(org.mule.runtime.config.api.dsl.CoreDslConstants.FLOW_IDENTIFIER) RuntimeConfigurationException(org.mule.runtime.config.internal.dsl.model.config.RuntimeConfigurationException) ConfigLine(org.mule.runtime.config.api.dsl.processor.ConfigLine) ConfigFile(org.mule.runtime.config.api.dsl.processor.ConfigFile) DefaultConfigurationProperty(org.mule.runtime.config.internal.dsl.model.config.DefaultConfigurationProperty) LinkedList(java.util.LinkedList) Collections.emptyMap(java.util.Collections.emptyMap) Collections.emptySet(java.util.Collections.emptySet) ConfigurationException(org.mule.runtime.core.api.config.ConfigurationException) Optional.ofNullable(java.util.Optional.ofNullable) I18nMessageFactory.createStaticMessage(org.mule.runtime.api.i18n.I18nMessageFactory.createStaticMessage) NameUtils.hyphenize(org.mule.runtime.extension.api.util.NameUtils.hyphenize) ConfigurationParameters(org.mule.runtime.config.api.dsl.model.ConfigurationParameters) ExtensionModelHelper(org.mule.runtime.config.internal.dsl.model.ExtensionModelHelper) ArtifactConfig(org.mule.runtime.config.api.dsl.processor.ArtifactConfig) DefaultConfigurationPropertiesResolver(org.mule.runtime.config.internal.dsl.model.config.DefaultConfigurationPropertiesResolver) Joiner.on(com.google.common.base.Joiner.on) ObjectTypeVisitor(org.mule.runtime.config.internal.dsl.processor.ObjectTypeVisitor) AbstractComponent(org.mule.runtime.api.component.AbstractComponent) ExtensionModel(org.mule.runtime.api.meta.model.ExtensionModel) ConfigurationPropertiesResolver(org.mule.runtime.config.internal.dsl.model.config.ConfigurationPropertiesResolver) FLOW_REF_IDENTIFIER(org.mule.runtime.config.api.dsl.CoreDslConstants.FLOW_REF_IDENTIFIER) Consumer(java.util.function.Consumer) Collectors.toList(java.util.stream.Collectors.toList) ConfigurationPropertiesProviderFactory(org.mule.runtime.config.api.dsl.model.properties.ConfigurationPropertiesProviderFactory) StringUtils.isBlank(org.apache.commons.lang3.StringUtils.isBlank) CollectionUtils.disjunction(org.apache.commons.collections.CollectionUtils.disjunction) ComponentIdentifier(org.mule.runtime.api.component.ComponentIdentifier) ANY_IDENTIFIER(org.mule.runtime.core.api.exception.Errors.Identifiers.ANY_IDENTIFIER) ConfigurationPropertiesProviderFactory(org.mule.runtime.config.api.dsl.model.properties.ConfigurationPropertiesProviderFactory) HashMap(java.util.HashMap) QName(javax.xml.namespace.QName) ArrayList(java.util.ArrayList) ConfigLine(org.mule.runtime.config.api.dsl.processor.ConfigLine) TypedComponentIdentifier(org.mule.runtime.api.component.TypedComponentIdentifier) ComponentIdentifier(org.mule.runtime.api.component.ComponentIdentifier) TypedComponentIdentifier(org.mule.runtime.api.component.TypedComponentIdentifier) InitialisationException(org.mule.runtime.api.lifecycle.InitialisationException) DefaultConfigurationParameters(org.mule.runtime.config.internal.dsl.model.DefaultConfigurationParameters) ConfigurationParameters(org.mule.runtime.config.api.dsl.model.ConfigurationParameters) CompositeConfigurationPropertiesProvider(org.mule.runtime.config.internal.dsl.model.config.CompositeConfigurationPropertiesProvider) MapConfigurationPropertiesProvider(org.mule.runtime.config.internal.dsl.model.config.MapConfigurationPropertiesProvider) FileConfigurationPropertiesProvider(org.mule.runtime.config.internal.dsl.model.config.FileConfigurationPropertiesProvider) GlobalPropertyConfigurationPropertiesProvider(org.mule.runtime.config.internal.dsl.model.config.GlobalPropertyConfigurationPropertiesProvider) ConfigurationPropertiesProvider(org.mule.runtime.config.api.dsl.model.properties.ConfigurationPropertiesProvider) MuleRuntimeException(org.mule.runtime.api.exception.MuleRuntimeException) Component(org.mule.runtime.api.component.Component) AbstractComponent(org.mule.runtime.api.component.AbstractComponent) DefaultComponentLocation(org.mule.runtime.dsl.api.component.config.DefaultComponentLocation)

Aggregations

ConfigLine (org.mule.runtime.config.api.dsl.processor.ConfigLine)12 List (java.util.List)8 Map (java.util.Map)7 Optional (java.util.Optional)7 Set (java.util.Set)7 Collectors.toList (java.util.stream.Collectors.toList)7 DslResolvingContext (org.mule.runtime.api.dsl.DslResolvingContext)7 MuleRuntimeException (org.mule.runtime.api.exception.MuleRuntimeException)7 I18nMessageFactory.createStaticMessage (org.mule.runtime.api.i18n.I18nMessageFactory.createStaticMessage)7 ExtensionModel (org.mule.runtime.api.meta.model.ExtensionModel)7 CORE_PREFIX (org.mule.runtime.internal.dsl.DslConstants.CORE_PREFIX)7 InputStream (java.io.InputStream)6 HashMap (java.util.HashMap)6 Consumer (java.util.function.Consumer)6 StringUtils.isBlank (org.apache.commons.lang3.StringUtils.isBlank)6 ObjectType (org.mule.metadata.api.model.ObjectType)6 ArtifactDeclaration (org.mule.runtime.app.declaration.api.ArtifactDeclaration)6 SimpleConfigAttribute (org.mule.runtime.config.api.dsl.processor.SimpleConfigAttribute)6 XmlApplicationParser (org.mule.runtime.config.api.dsl.processor.xml.XmlApplicationParser)6 SpiServiceRegistry (org.mule.runtime.core.api.registry.SpiServiceRegistry)6