Search in sources :

Example 11 with ConfigurationException

use of org.mule.runtime.core.api.config.ConfigurationException in project mule by mulesoft.

the class MuleConfigurationConfigurator method doGetObject.

@Override
public Object doGetObject() throws Exception {
    MuleConfiguration configuration = muleContext.getConfiguration();
    if (configuration instanceof DefaultMuleConfiguration) {
        DefaultMuleConfiguration defaultConfig = (DefaultMuleConfiguration) configuration;
        defaultConfig.setDefaultResponseTimeout(config.getDefaultResponseTimeout());
        defaultConfig.setDefaultTransactionTimeout(config.getDefaultTransactionTimeout());
        defaultConfig.setShutdownTimeout(config.getShutdownTimeout());
        defaultConfig.setDefaultErrorHandlerName(config.getDefaultErrorHandlerName());
        defaultConfig.addExtensions(config.getExtensions());
        defaultConfig.setMaxQueueTransactionFilesSize(config.getMaxQueueTransactionFilesSizeInMegabytes());
        defaultConfig.setDynamicConfigExpiration(config.getDynamicConfigExpiration());
        validateDefaultErrorHandler();
        applyDefaultIfNoObjectSerializerSet(defaultConfig);
        return configuration;
    } else {
        throw new ConfigurationException(createStaticMessage("Unable to set properties on read-only MuleConfiguration: " + configuration.getClass()));
    }
}
Also used : DefaultMuleConfiguration(org.mule.runtime.core.api.config.DefaultMuleConfiguration) MuleConfiguration(org.mule.runtime.core.api.config.MuleConfiguration) DefaultMuleConfiguration(org.mule.runtime.core.api.config.DefaultMuleConfiguration) ConfigurationException(org.mule.runtime.core.api.config.ConfigurationException)

Example 12 with ConfigurationException

use of org.mule.runtime.core.api.config.ConfigurationException in project mule by mulesoft.

the class ApplicationModel method validateNamedTopLevelElementsHaveName.

private void validateNamedTopLevelElementsHaveName(ComponentBuildingDefinitionRegistry componentBuildingDefinitionRegistry) throws ConfigurationException {
    try {
        List<ComponentModel> topLevelComponents = muleComponentModels.get(0).getInnerComponents();
        topLevelComponents.stream().forEach(topLevelComponent -> {
            final ComponentIdentifier identifier = topLevelComponent.getIdentifier();
            componentBuildingDefinitionRegistry.getBuildingDefinition(identifier).filter(ComponentBuildingDefinition::isNamed).ifPresent(buildingDefinition -> {
                if (isBlank(topLevelComponent.getNameAttribute())) {
                    throw new MuleRuntimeException(createStaticMessage(format("Global element %s:%s does not provide a name attribute.", identifier.getNamespace(), identifier.getName())));
                }
            });
        });
    } catch (Exception e) {
        throw new ConfigurationException(e);
    }
}
Also used : RuntimeConfigurationException(org.mule.runtime.config.internal.dsl.model.config.RuntimeConfigurationException) ConfigurationException(org.mule.runtime.core.api.config.ConfigurationException) MuleRuntimeException(org.mule.runtime.api.exception.MuleRuntimeException) TypedComponentIdentifier(org.mule.runtime.api.component.TypedComponentIdentifier) ComponentIdentifier(org.mule.runtime.api.component.ComponentIdentifier) InitialisationException(org.mule.runtime.api.lifecycle.InitialisationException) MuleRuntimeException(org.mule.runtime.api.exception.MuleRuntimeException) RuntimeConfigurationException(org.mule.runtime.config.internal.dsl.model.config.RuntimeConfigurationException) ConfigurationException(org.mule.runtime.core.api.config.ConfigurationException)

Example 13 with ConfigurationException

use of org.mule.runtime.core.api.config.ConfigurationException in project mule by mulesoft.

the class ArtifactContextBuilder method build.

/**
 * @return the {@code MuleContext} created with the provided configuration
 * @throws ConfigurationException when there's a problem creating the {@code MuleContext}
 * @throws InitialisationException when a certain configuration component failed during initialisation phase
 */
public ArtifactContext build() throws InitialisationException, ConfigurationException {
    checkState(executionClassLoader != null, EXECUTION_CLASSLOADER_WAS_NOT_SET);
    checkState(classLoaderRepository != null, CLASS_LOADER_REPOSITORY_WAS_NOT_SET);
    checkState(POLICY.equals(artifactType) || APP.equals(artifactType) || parentArtifact == null, ONLY_APPLICATIONS_OR_POLICIES_ARE_ALLOWED_TO_HAVE_A_PARENT_ARTIFACT);
    try {
        return withContextClassLoader(executionClassLoader, () -> {
            List<ConfigurationBuilder> builders = new LinkedList<>();
            builders.addAll(additionalBuilders);
            builders.add(new ArtifactBootstrapServiceDiscovererConfigurationBuilder(artifactPlugins));
            if (extensionManagerFactory == null) {
                if (parentArtifact == null) {
                    extensionManagerFactory = new ArtifactExtensionManagerFactory(artifactPlugins, extensionModelLoaderRepository, new DefaultExtensionManagerFactory());
                } else {
                    extensionManagerFactory = new CompositeArtifactExtensionManagerFactory(parentArtifact, extensionModelLoaderRepository, artifactPlugins, new DefaultExtensionManagerFactory());
                }
            }
            builders.add(new ArtifactExtensionManagerConfigurationBuilder(artifactPlugins, extensionManagerFactory));
            builders.add(createConfigurationBuilderFromApplicationProperties());
            // TODO MULE-14289 (elrodro83) pass this object to the builder instead of looking it up here
            ArtifactConfigurationProcessor artifactConfigurationProcessor = ArtifactConfigurationProcessor.discover();
            AtomicReference<ArtifactContext> artifactContext = new AtomicReference<>();
            builders.add(new ConfigurationBuilder() {

                @Override
                public void configure(MuleContext muleContext) throws ConfigurationException {
                    if (serviceRepository != null) {
                        serviceConfigurators.add(new ContainerServicesMuleContextConfigurator(serviceRepository));
                    }
                    if (classLoaderRepository != null) {
                        serviceConfigurators.add(customizationService -> customizationService.registerCustomServiceImpl(OBJECT_CLASSLOADER_REPOSITORY, classLoaderRepository));
                    }
                    if (policyProvider != null) {
                        serviceConfigurators.add(customizationService -> customizationService.registerCustomServiceImpl(OBJECT_POLICY_PROVIDER, policyProvider));
                    }
                    ArtifactContextConfiguration.ArtifactContextConfigurationBuilder artifactContextConfigurationBuilder = ArtifactContextConfiguration.builder().setMuleContext(muleContext).setConfigResources(configurationFiles).setArtifactDeclaration(artifactDeclaration).setArtifactProperties(merge(artifactProperties, muleContext.getDeploymentProperties())).setArtifactType(artifactType).setEnableLazyInitialization(enableLazyInit).setDisableXmlValidations(disableXmlValidations).setServiceConfigurators(serviceConfigurators);
                    if (parentArtifact != null) {
                        artifactContextConfigurationBuilder.setParentContext(parentArtifact.getRegistry().lookupByType(MuleContext.class).get());
                    }
                    artifactContext.set(artifactConfigurationProcessor.createArtifactContext(artifactContextConfigurationBuilder.build()));
                    ((DefaultMuleConfiguration) muleContext.getConfiguration()).setDataFolderName(dataFolderName);
                }

                @Override
                public void addServiceConfigurator(ServiceConfigurator serviceConfigurator) {
                // Nothing to do
                }
            });
            DefaultMuleContextFactory muleContextFactory = new DefaultMuleContextFactory();
            if (muleContextListener != null) {
                muleContextFactory.addListener(muleContextListener);
            }
            if (APP.equals(artifactType)) {
                muleContextBuilder = new ApplicationMuleContextBuilder(artifactName, artifactProperties, defaultEncoding);
            } else if (POLICY.equals(artifactType)) {
                muleContextBuilder = new PolicyMuleContextBuilder(artifactName, artifactProperties, defaultEncoding);
            } else {
                muleContextBuilder = new DomainMuleContextBuilder(artifactName);
            }
            muleContextBuilder.setExecutionClassLoader(this.executionClassLoader);
            ArtifactObjectSerializer objectSerializer = new ArtifactObjectSerializer(classLoaderRepository);
            muleContextBuilder.setObjectSerializer(objectSerializer);
            muleContextBuilder.setDeploymentProperties(properties);
            if (parentArtifact != null) {
                builders.add(new ConnectionManagerConfigurationBuilder(parentArtifact));
                muleContextBuilder.setErrorTypeRepository(createCompositeErrorTypeRepository(parentArtifact.getRegistry().lookupByType(MuleContext.class).get().getErrorTypeRepository()));
            } else {
                builders.add(new ConnectionManagerConfigurationBuilder());
            }
            try {
                muleContextFactory.createMuleContext(builders, muleContextBuilder);
                return artifactContext.get();
            } catch (InitialisationException e) {
                throw new ConfigurationException(e);
            }
        });
    } catch (MuleRuntimeException e) {
        // We need this exception to be thrown as they are since the are possible causes of connectivity errors
        if (e.getCause() instanceof InitialisationException) {
            throw (InitialisationException) e.getCause();
        }
        if (e.getCause() instanceof ConfigurationException) {
            throw (ConfigurationException) e.getCause();
        }
        throw e;
    }
}
Also used : ServiceConfigurator(org.mule.runtime.api.config.custom.ServiceConfigurator) APP_HOME_DIRECTORY_PROPERTY(org.mule.runtime.core.api.config.MuleProperties.APP_HOME_DIRECTORY_PROPERTY) InitialisationException(org.mule.runtime.api.lifecycle.InitialisationException) DomainMuleContextBuilder(org.mule.runtime.module.deployment.impl.internal.domain.DomainMuleContextBuilder) ArtifactContextConfiguration(org.mule.runtime.deployment.model.api.artifact.ArtifactContextConfiguration) OBJECT_CLASSLOADER_REPOSITORY(org.mule.runtime.core.api.config.MuleProperties.OBJECT_CLASSLOADER_REPOSITORY) Arrays.asList(java.util.Arrays.asList) Map(java.util.Map) DefaultExtensionManagerFactory(org.mule.runtime.module.extension.api.manager.DefaultExtensionManagerFactory) Preconditions.checkState(org.mule.runtime.api.util.Preconditions.checkState) ErrorTypeRepositoryFactory.createCompositeErrorTypeRepository(org.mule.runtime.core.internal.exception.ErrorTypeRepositoryFactory.createCompositeErrorTypeRepository) ApplicationMuleContextBuilder(org.mule.runtime.module.deployment.impl.internal.application.ApplicationMuleContextBuilder) POLICY(org.mule.runtime.core.api.config.bootstrap.ArtifactType.POLICY) Collections.emptyList(java.util.Collections.emptyList) ArtifactPlugin(org.mule.runtime.deployment.model.api.plugin.ArtifactPlugin) PolicyMuleContextBuilder(org.mule.runtime.module.deployment.impl.internal.application.PolicyMuleContextBuilder) DefaultMuleConfiguration(org.mule.runtime.core.api.config.DefaultMuleConfiguration) DefaultMuleContextFactory(org.mule.runtime.core.api.context.DefaultMuleContextFactory) MuleRuntimeException(org.mule.runtime.api.exception.MuleRuntimeException) List(java.util.List) Domain(org.mule.runtime.deployment.model.api.domain.Domain) ArtifactConfigurationProcessor(org.mule.runtime.deployment.model.api.artifact.ArtifactConfigurationProcessor) APP(org.mule.runtime.core.api.config.bootstrap.ArtifactType.APP) Optional(java.util.Optional) OBJECT_POLICY_PROVIDER(org.mule.runtime.core.api.config.MuleProperties.OBJECT_POLICY_PROVIDER) ArtifactExtensionManagerFactory(org.mule.runtime.module.deployment.impl.internal.policy.ArtifactExtensionManagerFactory) ServiceRepository(org.mule.runtime.api.service.ServiceRepository) SimpleConfigurationBuilder(org.mule.runtime.core.api.config.builders.SimpleConfigurationBuilder) Optional.empty(java.util.Optional.empty) ClassLoaderRepository(org.mule.runtime.module.artifact.api.classloader.ClassLoaderRepository) ExtensionModelLoaderRepository(org.mule.runtime.module.extension.internal.loader.ExtensionModelLoaderRepository) ArtifactContext(org.mule.runtime.deployment.model.api.artifact.ArtifactContext) MuleContextListener(org.mule.runtime.core.api.context.notification.MuleContextListener) Preconditions.checkArgument(org.mule.runtime.api.util.Preconditions.checkArgument) HashMap(java.util.HashMap) APP_NAME_PROPERTY(org.mule.runtime.core.api.config.MuleProperties.APP_NAME_PROPERTY) Location(org.mule.runtime.api.component.location.Location) AtomicReference(java.util.concurrent.atomic.AtomicReference) ArrayList(java.util.ArrayList) UUID.getUUID(org.mule.runtime.core.api.util.UUID.getUUID) ArtifactObjectSerializer(org.mule.runtime.module.artifact.api.serializer.ArtifactObjectSerializer) MuleContext(org.mule.runtime.core.api.MuleContext) ArtifactDeclaration(org.mule.runtime.app.declaration.api.ArtifactDeclaration) ConfigurationBuilder(org.mule.runtime.core.api.config.ConfigurationBuilder) ClassUtils.withContextClassLoader(org.mule.runtime.core.api.util.ClassUtils.withContextClassLoader) LinkedList(java.util.LinkedList) Properties(java.util.Properties) ConfigurationException(org.mule.runtime.core.api.config.ConfigurationException) File(java.io.File) MuleContextBuilder(org.mule.runtime.core.api.context.MuleContextBuilder) ConnectivityTestingService(org.mule.runtime.api.connectivity.ConnectivityTestingService) PolicyProvider(org.mule.runtime.core.api.policy.PolicyProvider) DeployableArtifact(org.mule.runtime.deployment.model.api.DeployableArtifact) ArtifactType(org.mule.runtime.core.api.config.bootstrap.ArtifactType) ExtensionManagerFactory(org.mule.runtime.module.extension.api.manager.ExtensionManagerFactory) Collections(java.util.Collections) SimpleConfigurationBuilder(org.mule.runtime.core.api.config.builders.SimpleConfigurationBuilder) ConfigurationBuilder(org.mule.runtime.core.api.config.ConfigurationBuilder) ArtifactExtensionManagerFactory(org.mule.runtime.module.deployment.impl.internal.policy.ArtifactExtensionManagerFactory) ArtifactContext(org.mule.runtime.deployment.model.api.artifact.ArtifactContext) ArtifactObjectSerializer(org.mule.runtime.module.artifact.api.serializer.ArtifactObjectSerializer) InitialisationException(org.mule.runtime.api.lifecycle.InitialisationException) MuleContext(org.mule.runtime.core.api.MuleContext) ConfigurationException(org.mule.runtime.core.api.config.ConfigurationException) ArtifactConfigurationProcessor(org.mule.runtime.deployment.model.api.artifact.ArtifactConfigurationProcessor) DomainMuleContextBuilder(org.mule.runtime.module.deployment.impl.internal.domain.DomainMuleContextBuilder) DefaultExtensionManagerFactory(org.mule.runtime.module.extension.api.manager.DefaultExtensionManagerFactory) PolicyMuleContextBuilder(org.mule.runtime.module.deployment.impl.internal.application.PolicyMuleContextBuilder) ServiceConfigurator(org.mule.runtime.api.config.custom.ServiceConfigurator) AtomicReference(java.util.concurrent.atomic.AtomicReference) ApplicationMuleContextBuilder(org.mule.runtime.module.deployment.impl.internal.application.ApplicationMuleContextBuilder) LinkedList(java.util.LinkedList) DefaultMuleContextFactory(org.mule.runtime.core.api.context.DefaultMuleContextFactory) MuleRuntimeException(org.mule.runtime.api.exception.MuleRuntimeException)

Example 14 with ConfigurationException

use of org.mule.runtime.core.api.config.ConfigurationException in project mule by mulesoft.

the class AbstractComponentDefinitionParser method doParse.

@Override
protected Builder doParse(Builder definitionBuilder) throws ConfigurationException {
    Builder finalBuilder = definitionBuilder.withIdentifier(operationDsl.getElementName()).withTypeDefinition(fromType(getMessageProcessorType())).withObjectFactoryType(getMessageProcessorFactoryType()).withConstructorParameterDefinition(fromFixedValue(extensionModel).build()).withConstructorParameterDefinition(fromFixedValue(componentModel).build()).withConstructorParameterDefinition(fromReferenceObject(MuleContext.class).build()).withConstructorParameterDefinition(fromReferenceObject(Registry.class).build()).withConstructorParameterDefinition(fromReferenceObject(PolicyManager.class).build()).withSetterParameterDefinition(TARGET_PARAMETER_NAME, fromSimpleParameter(TARGET_PARAMETER_NAME).build()).withSetterParameterDefinition(TARGET_VALUE_PARAMETER_NAME, fromSimpleParameter(TARGET_VALUE_PARAMETER_NAME).build()).withSetterParameterDefinition(CONFIG_PROVIDER_ATTRIBUTE_NAME, fromSimpleReferenceParameter(CONFIG_ATTRIBUTE_NAME).build()).withSetterParameterDefinition(CURSOR_PROVIDER_FACTORY_FIELD_NAME, fromChildConfiguration(CursorProviderFactory.class).build()).withSetterParameterDefinition("retryPolicyTemplate", fromChildConfiguration(RetryPolicyTemplate.class).build());
    Optional<? extends NestableElementModel> nestedChain = componentModel.getNestedComponents().stream().filter(c -> c instanceof NestedChainModel).findFirst();
    if (nestedChain.isPresent()) {
        // TODO MULE-13483: improve parsers to support things like [source, chainOfProcessors, errorHandler]
        // or [chainOfProcessors, errorHandler]
        finalBuilder = finalBuilder.withSetterParameterDefinition("nestedProcessors", fromChildCollectionConfiguration(Processor.class).build());
        parseParameters(componentModel.getAllParameterModels());
    } else {
        List<ParameterGroupModel> inlineGroups = getInlineGroups(componentModel);
        parseParameters(getFlatParameters(inlineGroups, componentModel.getAllParameterModels()));
        for (ParameterGroupModel group : inlineGroups) {
            parseInlineParameterGroup(group);
        }
        // TODO MULE-13483
        parseNestedComponents(componentModel.getNestedComponents());
    }
    return finalBuilder;
}
Also used : ExtensionDefinitionParser(org.mule.runtime.module.extension.internal.config.dsl.ExtensionDefinitionParser) Builder.fromReferenceObject(org.mule.runtime.dsl.api.component.AttributeDefinition.Builder.fromReferenceObject) RetryPolicyTemplate(org.mule.runtime.core.api.retry.policy.RetryPolicyTemplate) CONFIG_ATTRIBUTE_NAME(org.mule.runtime.internal.dsl.DslConstants.CONFIG_ATTRIBUTE_NAME) ExtensionParsingContext(org.mule.runtime.module.extension.internal.config.dsl.ExtensionParsingContext) ComponentModel(org.mule.runtime.api.meta.model.ComponentModel) Builder.fromChildConfiguration(org.mule.runtime.dsl.api.component.AttributeDefinition.Builder.fromChildConfiguration) Builder.fromSimpleReferenceParameter(org.mule.runtime.dsl.api.component.AttributeDefinition.Builder.fromSimpleReferenceParameter) Processor(org.mule.runtime.core.api.processor.Processor) Builder.fromFixedValue(org.mule.runtime.dsl.api.component.AttributeDefinition.Builder.fromFixedValue) Builder.fromSimpleParameter(org.mule.runtime.dsl.api.component.AttributeDefinition.Builder.fromSimpleParameter) OperationMessageProcessorObjectFactory(org.mule.runtime.module.extension.internal.config.dsl.operation.OperationMessageProcessorObjectFactory) TARGET_VALUE_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.TARGET_VALUE_PARAMETER_NAME) MuleContext(org.mule.runtime.core.api.MuleContext) TARGET_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.TARGET_PARAMETER_NAME) Registry(org.mule.runtime.api.artifact.Registry) ParameterGroupModel(org.mule.runtime.api.meta.model.parameter.ParameterGroupModel) PolicyManager(org.mule.runtime.core.internal.policy.PolicyManager) Builder.fromChildCollectionConfiguration(org.mule.runtime.dsl.api.component.AttributeDefinition.Builder.fromChildCollectionConfiguration) TypeDefinition.fromType(org.mule.runtime.dsl.api.component.TypeDefinition.fromType) NestableElementModel(org.mule.runtime.api.meta.model.nested.NestableElementModel) ComponentMessageProcessorObjectFactory(org.mule.runtime.module.extension.internal.config.dsl.ComponentMessageProcessorObjectFactory) ConfigurationException(org.mule.runtime.core.api.config.ConfigurationException) NestedChainModel(org.mule.runtime.api.meta.model.nested.NestedChainModel) OperationMessageProcessor(org.mule.runtime.module.extension.internal.runtime.operation.OperationMessageProcessor) ExtensionModel(org.mule.runtime.api.meta.model.ExtensionModel) List(java.util.List) DslElementSyntax(org.mule.runtime.extension.api.dsl.syntax.DslElementSyntax) ComponentMessageProcessor(org.mule.runtime.module.extension.internal.runtime.operation.ComponentMessageProcessor) DslSyntaxResolver(org.mule.runtime.extension.api.dsl.syntax.resolver.DslSyntaxResolver) Optional(java.util.Optional) CursorProviderFactory(org.mule.runtime.core.api.streaming.CursorProviderFactory) Builder(org.mule.runtime.dsl.api.component.ComponentBuildingDefinition.Builder) MuleContext(org.mule.runtime.core.api.MuleContext) PolicyManager(org.mule.runtime.core.internal.policy.PolicyManager) CursorProviderFactory(org.mule.runtime.core.api.streaming.CursorProviderFactory) Processor(org.mule.runtime.core.api.processor.Processor) OperationMessageProcessor(org.mule.runtime.module.extension.internal.runtime.operation.OperationMessageProcessor) ComponentMessageProcessor(org.mule.runtime.module.extension.internal.runtime.operation.ComponentMessageProcessor) NestedChainModel(org.mule.runtime.api.meta.model.nested.NestedChainModel) Builder(org.mule.runtime.dsl.api.component.ComponentBuildingDefinition.Builder) ParameterGroupModel(org.mule.runtime.api.meta.model.parameter.ParameterGroupModel)

Example 15 with ConfigurationException

use of org.mule.runtime.core.api.config.ConfigurationException in project mule by mulesoft.

the class ExtensionDefinitionParser method parse.

/**
 * Creates a list of {@link ComponentBuildingDefinition} built on copies of {@link #baseDefinitionBuilder}. It also sets the
 * parsed parsed parameters on the backing {@link AbstractExtensionObjectFactory}
 *
 * @return a list with the generated {@link ComponentBuildingDefinition}
 * @throws ConfigurationException if a parsing error occurs
 */
public final List<ComponentBuildingDefinition> parse() throws ConfigurationException {
    Builder builder = baseDefinitionBuilder;
    builder = doParse(builder);
    AttributeDefinition parametersDefinition = fromFixedValue(new HashMap<>()).build();
    if (!parameters.isEmpty()) {
        KeyAttributeDefinitionPair[] attributeDefinitions = parameters.entrySet().stream().map(entry -> newBuilder().withAttributeDefinition(entry.getValue().build()).withKey(entry.getKey()).build()).toArray(KeyAttributeDefinitionPair[]::new);
        parametersDefinition = fromMultipleDefinitions(attributeDefinitions).build();
    }
    builder = builder.withSetterParameterDefinition("parameters", parametersDefinition);
    addDefinition(builder.build());
    return parsedDefinitions;
}
Also used : InfrastructureTypeMapping.getNameMap(org.mule.runtime.module.extension.internal.loader.java.type.InfrastructureTypeMapping.getNameMap) ExpressionBasedParameterResolverValueResolver(org.mule.runtime.module.extension.internal.runtime.resolver.ExpressionBasedParameterResolverValueResolver) StaticValueResolver(org.mule.runtime.module.extension.internal.runtime.resolver.StaticValueResolver) KeyAttributeDefinitionPair(org.mule.runtime.dsl.api.component.KeyAttributeDefinitionPair) InfrastructureParameterModelProperty(org.mule.runtime.extension.api.property.InfrastructureParameterModelProperty) BEHAVIOUR(org.mule.runtime.api.meta.model.parameter.ParameterRole.BEHAVIOUR) ParameterRole(org.mule.runtime.api.meta.model.parameter.ParameterRole) DateTimeType(org.mule.metadata.api.model.DateTimeType) RequiredParameterValueResolverWrapper(org.mule.runtime.module.extension.internal.runtime.resolver.RequiredParameterValueResolverWrapper) Builder.fromSimpleParameter(org.mule.runtime.dsl.api.component.AttributeDefinition.Builder.fromSimpleParameter) QueryParameterModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.QueryParameterModelProperty) Instant.ofEpochMilli(java.time.Instant.ofEpochMilli) ArrayType(org.mule.metadata.api.model.ArrayType) Map(java.util.Map) NestableElementModelVisitor(org.mule.runtime.api.meta.model.nested.NestableElementModelVisitor) ExpressionTypedValueValueResolver(org.mule.runtime.module.extension.internal.runtime.resolver.ExpressionTypedValueValueResolver) ClassTypeLoader(org.mule.metadata.api.ClassTypeLoader) ModelProperty(org.mule.runtime.api.meta.model.ModelProperty) NestableElementModel(org.mule.runtime.api.meta.model.nested.NestableElementModel) ExtensionModelUtils.isContent(org.mule.runtime.extension.api.util.ExtensionModelUtils.isContent) SchedulingStrategyParsingDelegate(org.mule.runtime.module.extension.internal.config.dsl.object.SchedulingStrategyParsingDelegate) ExtensionMetadataTypeUtils.isMap(org.mule.runtime.extension.api.util.ExtensionMetadataTypeUtils.isMap) IntrospectionUtils.isTargetParameter(org.mule.runtime.module.extension.internal.util.IntrospectionUtils.isTargetParameter) ObjectType(org.mule.metadata.api.model.ObjectType) ParameterGroupDescriptor(org.mule.runtime.module.extension.internal.loader.ParameterGroupDescriptor) Set(java.util.Set) MuleRuntimeException(org.mule.runtime.api.exception.MuleRuntimeException) DateType(org.mule.metadata.api.model.DateType) MetadataTypeVisitor(org.mule.metadata.api.visitor.MetadataTypeVisitor) ZoneId(java.time.ZoneId) ComponentBuildingDefinition(org.mule.runtime.dsl.api.component.ComponentBuildingDefinition) DefaultValueResolverParsingDelegate(org.mule.runtime.module.extension.internal.config.dsl.object.DefaultValueResolverParsingDelegate) DateTimeParseException(java.time.format.DateTimeParseException) ObjectFieldType(org.mule.metadata.api.model.ObjectFieldType) StringType(org.mule.metadata.api.model.StringType) MetadataType(org.mule.metadata.api.model.MetadataType) DslSyntaxResolver(org.mule.runtime.extension.api.dsl.syntax.resolver.DslSyntaxResolver) IntrospectionUtils.getContainerName(org.mule.runtime.module.extension.internal.util.IntrospectionUtils.getContainerName) ParameterResolverValueResolverWrapper(org.mule.runtime.module.extension.internal.runtime.resolver.ParameterResolverValueResolverWrapper) DefaultConversionService(org.springframework.core.convert.support.DefaultConversionService) StackedTypesModelProperty.getStackedTypesModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.stackabletypes.StackedTypesModelProperty.getStackedTypesModelProperty) NativeQueryParameterValueResolver(org.mule.runtime.module.extension.internal.runtime.resolver.NativeQueryParameterValueResolver) MetadataTypeUtils.getDefaultValue(org.mule.metadata.api.utils.MetadataTypeUtils.getDefaultValue) ExtensionsTypeLoaderFactory(org.mule.runtime.extension.api.declaration.type.ExtensionsTypeLoaderFactory) StackedTypesModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.stackabletypes.StackedTypesModelProperty) LocalDateTime(java.time.LocalDateTime) Builder.fromChildMapConfiguration(org.mule.runtime.dsl.api.component.AttributeDefinition.Builder.fromChildMapConfiguration) VALUE_ATTRIBUTE_NAME(org.mule.runtime.internal.dsl.DslConstants.VALUE_ATTRIBUTE_NAME) Supplier(java.util.function.Supplier) ObjectTypeParameterParser(org.mule.runtime.module.extension.internal.config.dsl.parameter.ObjectTypeParameterParser) ArrayList(java.util.ArrayList) TypeSafeValueResolverWrapper(org.mule.runtime.module.extension.internal.runtime.resolver.TypeSafeValueResolverWrapper) LinkedHashMap(java.util.LinkedHashMap) Calendar(java.util.Calendar) ExtensionMetadataTypeUtils.getExpressionSupport(org.mule.runtime.extension.api.util.ExtensionMetadataTypeUtils.getExpressionSupport) TypedInlineParameterGroupParser(org.mule.runtime.module.extension.internal.config.dsl.parameter.TypedInlineParameterGroupParser) MediaTypeValueResolverParsingDelegate(org.mule.runtime.module.extension.internal.config.dsl.object.MediaTypeValueResolverParsingDelegate) ConversionService(org.springframework.core.convert.ConversionService) TypeDefinition.fromType(org.mule.runtime.dsl.api.component.TypeDefinition.fromType) MuleExtensionUtils.isExpression(org.mule.runtime.module.extension.internal.util.MuleExtensionUtils.isExpression) ParameterizedModel(org.mule.runtime.api.meta.model.parameter.ParameterizedModel) ValueResolver(org.mule.runtime.module.extension.internal.runtime.resolver.ValueResolver) ConfigurationException(org.mule.runtime.core.api.config.ConfigurationException) I18nMessageFactory.createStaticMessage(org.mule.runtime.api.i18n.I18nMessageFactory.createStaticMessage) ParsingDelegate(org.mule.runtime.module.extension.internal.config.dsl.object.ParsingDelegate) Builder.fromMultipleDefinitions(org.mule.runtime.dsl.api.component.AttributeDefinition.Builder.fromMultipleDefinitions) ExtensionModel(org.mule.runtime.api.meta.model.ExtensionModel) Reference(org.mule.runtime.api.util.Reference) DefaultObjectParsingDelegate(org.mule.runtime.module.extension.internal.config.dsl.object.DefaultObjectParsingDelegate) NOT_SUPPORTED(org.mule.runtime.api.meta.ExpressionSupport.NOT_SUPPORTED) JavaTypeUtils.getType(org.mule.metadata.java.api.utils.JavaTypeUtils.getType) ExtensionMetadataTypeUtils.getId(org.mule.runtime.extension.api.util.ExtensionMetadataTypeUtils.getId) TemplateParser(org.mule.runtime.core.privileged.util.TemplateParser) IntrospectionUtils.getMemberName(org.mule.runtime.module.extension.internal.util.IntrospectionUtils.getMemberName) Date(java.util.Date) Builder.fromChildConfiguration(org.mule.runtime.dsl.api.component.AttributeDefinition.Builder.fromChildConfiguration) TypeConverter(org.mule.runtime.dsl.api.component.TypeConverter) IntrospectionUtils.isLiteral(org.mule.runtime.module.extension.internal.util.IntrospectionUtils.isLiteral) TypeDefinition.fromMapEntryType(org.mule.runtime.dsl.api.component.TypeDefinition.fromMapEntryType) ProcessorChainValueResolver(org.mule.runtime.module.extension.internal.runtime.resolver.ProcessorChainValueResolver) IntrospectionUtils.isTypedValue(org.mule.runtime.module.extension.internal.util.IntrospectionUtils.isTypedValue) TypedValueValueResolverWrapper(org.mule.runtime.module.extension.internal.runtime.resolver.TypedValueValueResolverWrapper) PoolingProfile(org.mule.runtime.api.config.PoolingProfile) ParameterGroupModel(org.mule.runtime.api.meta.model.parameter.ParameterGroupModel) Builder.fromChildCollectionConfiguration(org.mule.runtime.dsl.api.component.AttributeDefinition.Builder.fromChildCollectionConfiguration) ISODateTimeFormat(org.joda.time.format.ISODateTimeFormat) ObjectParsingDelegate(org.mule.runtime.module.extension.internal.config.dsl.object.ObjectParsingDelegate) Collection(java.util.Collection) REQUIRED(org.mule.runtime.api.meta.ExpressionSupport.REQUIRED) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Instant(java.time.Instant) String.format(java.lang.String.format) NestedRouteModel(org.mule.runtime.api.meta.model.nested.NestedRouteModel) List(java.util.List) DslElementSyntax(org.mule.runtime.extension.api.dsl.syntax.DslElementSyntax) LocalDate(java.time.LocalDate) Optional(java.util.Optional) Builder(org.mule.runtime.dsl.api.component.ComponentBuildingDefinition.Builder) CharsetValueResolverParsingDelegate(org.mule.runtime.module.extension.internal.config.dsl.object.CharsetValueResolverParsingDelegate) TlsContextFactory(org.mule.runtime.api.tls.TlsContextFactory) ParameterModel(org.mule.runtime.api.meta.model.parameter.ParameterModel) RetryPolicyTemplate(org.mule.runtime.core.api.retry.policy.RetryPolicyTemplate) TypeSafeExpressionValueResolver(org.mule.runtime.module.extension.internal.runtime.resolver.TypeSafeExpressionValueResolver) KeyAttributeDefinitionPair.newBuilder(org.mule.runtime.dsl.api.component.KeyAttributeDefinitionPair.newBuilder) Builder.fromSimpleReferenceParameter(org.mule.runtime.dsl.api.component.AttributeDefinition.Builder.fromSimpleReferenceParameter) HashMap(java.util.HashMap) Processor(org.mule.runtime.core.api.processor.Processor) Builder.fromFixedValue(org.mule.runtime.dsl.api.component.AttributeDefinition.Builder.fromFixedValue) ConcurrentMap(java.util.concurrent.ConcurrentMap) ValueResolverParsingDelegate(org.mule.runtime.module.extension.internal.config.dsl.object.ValueResolverParsingDelegate) HashSet(java.util.HashSet) ExtensionMetadataTypeUtils.isFlattenedParameterGroup(org.mule.runtime.extension.api.util.ExtensionMetadataTypeUtils.isFlattenedParameterGroup) ImmutableList(com.google.common.collect.ImmutableList) Literal(org.mule.runtime.extension.api.runtime.parameter.Literal) BasicTypeMetadataVisitor(org.mule.metadata.api.visitor.BasicTypeMetadataVisitor) ParameterGroupModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.ParameterGroupModelProperty) ExclusiveOptionalModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.ExclusiveOptionalModelProperty) Collections.emptyMap(java.util.Collections.emptyMap) Collections.emptySet(java.util.Collections.emptySet) NameUtils.hyphenize(org.mule.runtime.extension.api.util.NameUtils.hyphenize) IntrospectionUtils.isParameterResolver(org.mule.runtime.module.extension.internal.util.IntrospectionUtils.isParameterResolver) ExpressionSupport(org.mule.runtime.api.meta.ExpressionSupport) NestedChainModel(org.mule.runtime.api.meta.model.nested.NestedChainModel) DateTime(org.joda.time.DateTime) AttributeDefinition(org.mule.runtime.dsl.api.component.AttributeDefinition) AnonymousInlineParameterGroupParser(org.mule.runtime.module.extension.internal.config.dsl.parameter.AnonymousInlineParameterGroupParser) Collectors.toList(java.util.stream.Collectors.toList) ExtensionMetadataTypeUtils(org.mule.runtime.extension.api.util.ExtensionMetadataTypeUtils) RouteComponentParser(org.mule.runtime.module.extension.internal.config.dsl.construct.RouteComponentParser) FixedTypeParsingDelegate(org.mule.runtime.module.extension.internal.config.dsl.object.FixedTypeParsingDelegate) NestedComponentModel(org.mule.runtime.api.meta.model.nested.NestedComponentModel) TopLevelParameterObjectFactory(org.mule.runtime.module.extension.internal.config.dsl.parameter.TopLevelParameterObjectFactory) ImplementingTypeModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.ImplementingTypeModelProperty) StaticLiteralValueResolver(org.mule.runtime.module.extension.internal.runtime.resolver.StaticLiteralValueResolver) LinkedHashMap(java.util.LinkedHashMap) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) HashMap(java.util.HashMap) Builder(org.mule.runtime.dsl.api.component.ComponentBuildingDefinition.Builder) KeyAttributeDefinitionPair.newBuilder(org.mule.runtime.dsl.api.component.KeyAttributeDefinitionPair.newBuilder) KeyAttributeDefinitionPair(org.mule.runtime.dsl.api.component.KeyAttributeDefinitionPair) AttributeDefinition(org.mule.runtime.dsl.api.component.AttributeDefinition)

Aggregations

ConfigurationException (org.mule.runtime.core.api.config.ConfigurationException)18 MuleRuntimeException (org.mule.runtime.api.exception.MuleRuntimeException)10 List (java.util.List)8 Map (java.util.Map)8 Optional (java.util.Optional)8 HashMap (java.util.HashMap)7 String.format (java.lang.String.format)6 ArrayList (java.util.ArrayList)6 LinkedHashMap (java.util.LinkedHashMap)6 MetadataType (org.mule.metadata.api.model.MetadataType)6 ObjectType (org.mule.metadata.api.model.ObjectType)6 DslElementSyntax (org.mule.runtime.extension.api.dsl.syntax.DslElementSyntax)6 Collection (java.util.Collection)5 Collections.emptySet (java.util.Collections.emptySet)5 Set (java.util.Set)5 Collectors.toList (java.util.stream.Collectors.toList)5 I18nMessageFactory.createStaticMessage (org.mule.runtime.api.i18n.I18nMessageFactory.createStaticMessage)4 ExtensionModel (org.mule.runtime.api.meta.model.ExtensionModel)4 NestableElementModel (org.mule.runtime.api.meta.model.nested.NestableElementModel)4 ParameterGroupModel (org.mule.runtime.api.meta.model.parameter.ParameterGroupModel)4