Search in sources :

Example 81 with ParameterModel

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

the class ComponentMessageProcessor method createComponentExecutor.

private ComponentExecutor<T> createComponentExecutor() {
    Map<String, Object> params = new HashMap<>();
    LazyValue<Optional<ConfigurationInstance>> staticConfiguration = new LazyValue<>(this::getStaticConfiguration);
    LazyValue<ValueResolvingContext> resolvingContext = new LazyValue<>(() -> {
        CoreEvent initialiserEvent = null;
        try {
            initialiserEvent = getInitialiserEvent();
            return from(initialiserEvent, staticConfiguration.get());
        } finally {
            if (initialiserEvent != null) {
                ((BaseEventContext) initialiserEvent.getContext()).success();
            }
        }
    });
    componentModel.getParameterGroupModels().stream().forEach(group -> {
        if (group.getName().equals(DEFAULT_GROUP_NAME)) {
            group.getParameterModels().stream().filter(p -> p.getModelProperty(FieldOperationParameterModelProperty.class).isPresent()).forEach(p -> {
                ValueResolver<?> resolver = resolverSet.getResolvers().get(p.getName());
                if (resolver != null) {
                    try {
                        params.put(getMemberName(p), resolveValue(resolver, resolvingContext.get()));
                    } catch (MuleException e) {
                        throw new MuleRuntimeException(e);
                    }
                }
            });
        } else {
            ParameterGroupDescriptor groupDescriptor = group.getModelProperty(ParameterGroupModelProperty.class).map(g -> g.getDescriptor()).orElse(null);
            if (groupDescriptor == null) {
                return;
            }
            List<ParameterModel> fieldParameters = getGroupsOfFieldParameters(group);
            if (fieldParameters.isEmpty()) {
                return;
            }
            ObjectBuilder groupBuilder = createFieldParameterGroupBuilder(groupDescriptor, fieldParameters);
            try {
                params.put(((Field) groupDescriptor.getContainer()).getName(), groupBuilder.build(resolvingContext.get()));
            } catch (MuleException e) {
                throw new MuleRuntimeException(e);
            }
        }
    });
    return getOperationExecutorFactory(componentModel).createExecutor(componentModel, params);
}
Also used : IntrospectionUtils.getMemberName(org.mule.runtime.module.extension.internal.util.IntrospectionUtils.getMemberName) FieldOperationParameterModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.FieldOperationParameterModelProperty) Optional.of(java.util.Optional.of) Mono.subscriberContext(reactor.core.publisher.Mono.subscriberContext) InitialisationException(org.mule.runtime.api.lifecycle.InitialisationException) ResolverUtils.resolveValue(org.mule.runtime.module.extension.internal.runtime.resolver.ResolverUtils.resolveValue) ParameterValueResolver(org.mule.runtime.module.extension.internal.runtime.resolver.ParameterValueResolver) PROCESSOR_SCHEDULER_CONTEXT_KEY(org.mule.runtime.core.internal.processor.strategy.AbstractProcessingStrategy.PROCESSOR_SCHEDULER_CONTEXT_KEY) Scheduler(org.mule.runtime.api.scheduler.Scheduler) IMMEDIATE_SCHEDULER(org.mule.runtime.core.internal.util.rx.ImmediateScheduler.IMMEDIATE_SCHEDULER) MuleExtensionUtils.getOperationExecutorFactory(org.mule.runtime.module.extension.internal.util.MuleExtensionUtils.getOperationExecutorFactory) Map(java.util.Map) TARGET_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.TARGET_PARAMETER_NAME) OperationArgumentResolverFactory(org.mule.runtime.module.extension.internal.runtime.execution.OperationArgumentResolverFactory) MessagingException(org.mule.runtime.core.internal.exception.MessagingException) LifecycleUtils.stopIfNeeded(org.mule.runtime.core.api.lifecycle.LifecycleUtils.stopIfNeeded) ParameterGroupModel(org.mule.runtime.api.meta.model.parameter.ParameterGroupModel) Exceptions(org.mule.runtime.core.api.rx.Exceptions) PolicyManager(org.mule.runtime.core.internal.policy.PolicyManager) ParametersResolverProcessor(org.mule.runtime.core.internal.processor.ParametersResolverProcessor) ParameterGroupDescriptor(org.mule.runtime.module.extension.internal.loader.ParameterGroupDescriptor) ConfigurationProvider(org.mule.runtime.extension.api.runtime.config.ConfigurationProvider) MuleRuntimeException(org.mule.runtime.api.exception.MuleRuntimeException) ReflectionCache(org.mule.runtime.module.extension.internal.util.ReflectionCache) ConfigurationInstance(org.mule.runtime.extension.api.runtime.config.ConfigurationInstance) String.format(java.lang.String.format) OperationPolicy(org.mule.runtime.core.internal.policy.OperationPolicy) MuleExtensionUtils.getInitialiserEvent(org.mule.runtime.module.extension.api.util.MuleExtensionUtils.getInitialiserEvent) ObjectBuilder(org.mule.runtime.module.extension.internal.runtime.objectbuilder.ObjectBuilder) Lifecycle(org.mule.runtime.api.lifecycle.Lifecycle) List(java.util.List) ComponentExecutorModelProperty(org.mule.runtime.module.extension.api.loader.java.property.ComponentExecutorModelProperty) Optional(java.util.Optional) CursorProviderFactory(org.mule.runtime.core.api.streaming.CursorProviderFactory) ValueResolvingContext.from(org.mule.runtime.module.extension.internal.runtime.resolver.ValueResolvingContext.from) ComponentExecutorFactory(org.mule.runtime.extension.api.runtime.operation.ComponentExecutorFactory) Optional.empty(java.util.Optional.empty) ParameterModel(org.mule.runtime.api.meta.model.parameter.ParameterModel) RetryPolicyTemplate(org.mule.runtime.core.api.retry.policy.RetryPolicyTemplate) Flux.from(reactor.core.publisher.Flux.from) ComponentModel(org.mule.runtime.api.meta.model.ComponentModel) ComponentExecutor(org.mule.runtime.extension.api.runtime.operation.ComponentExecutor) HashMap(java.util.HashMap) LifecycleUtils.initialiseIfNeeded(org.mule.runtime.core.api.lifecycle.LifecycleUtils.initialiseIfNeeded) ResolverSet(org.mule.runtime.module.extension.internal.runtime.resolver.ResolverSet) Processor(org.mule.runtime.core.api.processor.Processor) TARGET_VALUE_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.TARGET_VALUE_PARAMETER_NAME) DefaultObjectBuilder(org.mule.runtime.module.extension.internal.runtime.objectbuilder.DefaultObjectBuilder) MuleException(org.mule.runtime.api.exception.MuleException) Flux.error(reactor.core.publisher.Flux.error) BiConsumer(java.util.function.BiConsumer) DEFAULT_GROUP_NAME(org.mule.runtime.api.meta.model.parameter.ParameterGroupModel.DEFAULT_GROUP_NAME) ParameterGroupModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.ParameterGroupModelProperty) Mono.fromCallable(reactor.core.publisher.Mono.fromCallable) ExecutionContext(org.mule.runtime.extension.api.runtime.operation.ExecutionContext) ExecutionContextAdapter(org.mule.runtime.module.extension.api.runtime.privileged.ExecutionContextAdapter) DefaultExecutionContext(org.mule.runtime.module.extension.internal.runtime.DefaultExecutionContext) Logger(org.slf4j.Logger) ValueResolver(org.mule.runtime.module.extension.internal.runtime.resolver.ValueResolver) MessageProcessors.processToApply(org.mule.runtime.core.privileged.processor.MessageProcessors.processToApply) CoreEvent(org.mule.runtime.core.api.event.CoreEvent) Publisher(org.reactivestreams.Publisher) Exceptions.checkedFunction(org.mule.runtime.core.api.rx.Exceptions.checkedFunction) BaseEventContext(org.mule.runtime.core.privileged.event.BaseEventContext) ComponentLocationProvider.resolveProcessorRepresentation(org.mule.runtime.api.util.ComponentLocationProvider.resolveProcessorRepresentation) LifecycleUtils.startIfNeeded(org.mule.runtime.core.api.lifecycle.LifecycleUtils.startIfNeeded) Mono(reactor.core.publisher.Mono) Field(java.lang.reflect.Field) ExtensionComponent(org.mule.runtime.module.extension.internal.runtime.ExtensionComponent) LazyExecutionContext(org.mule.runtime.module.extension.internal.runtime.LazyExecutionContext) Interceptor(org.mule.runtime.extension.api.runtime.operation.Interceptor) ExtensionModel(org.mule.runtime.api.meta.model.ExtensionModel) LifecycleUtils.disposeIfNeeded(org.mule.runtime.core.api.lifecycle.LifecycleUtils.disposeIfNeeded) INTERCEPTION_RESOLVED_CONTEXT(org.mule.runtime.core.internal.interception.DefaultInterceptionEvent.INTERCEPTION_RESOLVED_CONTEXT) Collectors.toList(java.util.stream.Collectors.toList) DefaultMuleException(org.mule.runtime.api.exception.DefaultMuleException) LazyValue(org.mule.runtime.api.util.LazyValue) StringUtils.isBlank(org.apache.commons.lang3.StringUtils.isBlank) ExtensionManager(org.mule.runtime.core.api.extension.ExtensionManager) IntrospectionUtils.isVoid(org.mule.runtime.module.extension.internal.util.IntrospectionUtils.isVoid) LoggerFactory.getLogger(org.slf4j.LoggerFactory.getLogger) DefaultFlowCallStack(org.mule.runtime.core.internal.context.notification.DefaultFlowCallStack) ValueResolvingContext(org.mule.runtime.module.extension.internal.runtime.resolver.ValueResolvingContext) OperationExecutionFunction(org.mule.runtime.core.internal.policy.OperationExecutionFunction) InternalEvent(org.mule.runtime.core.internal.message.InternalEvent) FieldOperationParameterModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.FieldOperationParameterModelProperty) LazyValue(org.mule.runtime.api.util.LazyValue) Optional(java.util.Optional) HashMap(java.util.HashMap) ParameterGroupDescriptor(org.mule.runtime.module.extension.internal.loader.ParameterGroupDescriptor) ObjectBuilder(org.mule.runtime.module.extension.internal.runtime.objectbuilder.ObjectBuilder) DefaultObjectBuilder(org.mule.runtime.module.extension.internal.runtime.objectbuilder.DefaultObjectBuilder) BaseEventContext(org.mule.runtime.core.privileged.event.BaseEventContext) ParameterModel(org.mule.runtime.api.meta.model.parameter.ParameterModel) CoreEvent(org.mule.runtime.core.api.event.CoreEvent) MuleRuntimeException(org.mule.runtime.api.exception.MuleRuntimeException) ValueResolvingContext(org.mule.runtime.module.extension.internal.runtime.resolver.ValueResolvingContext) MuleException(org.mule.runtime.api.exception.MuleException) DefaultMuleException(org.mule.runtime.api.exception.DefaultMuleException)

Example 82 with ParameterModel

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

the class ValueProviderMediator method getValues.

/**
 * Given the name of a parameter or parameter group, and if the parameter supports it, this will try to resolve
 * the {@link Value values} for the parameter.
 *
 * @param parameterName          the name of the parameter to resolve their possible {@link Value values}
 * @param parameterValueResolver parameter resolver required if the associated {@link ValueProvider} requires
 *                               the value of parameters from the same parameter container.
 * @param connectionSupplier     supplier of connection instances related to the container and used, if necessary, by the
 *                               {@link ValueProvider}
 * @param configurationSupplier  supplier of connection instances related to the container and used, if necessary, by the
 *                               {@link ValueProvider}
 * @return a {@link Set} of {@link Value} correspondent to the given parameter
 * @throws ValueResolvingException if an error occurs resolving {@link Value values}
 */
public Set<Value> getValues(String parameterName, ParameterValueResolver parameterValueResolver, Supplier<Object> connectionSupplier, Supplier<Object> configurationSupplier) throws ValueResolvingException {
    List<ParameterModel> parameters = getParameters(parameterName);
    if (parameters.isEmpty()) {
        throw new ValueResolvingException(format("Unable to find model for parameter or parameter group with name '%s'.", parameterName), INVALID_VALUE_RESOLVER_NAME);
    }
    ParameterModel parameterModel = parameters.get(0);
    ValueProviderFactoryModelProperty factoryModelProperty = parameterModel.getModelProperty(ValueProviderFactoryModelProperty.class).orElseThrow(() -> new ValueResolvingException(format("The parameter with name '%s' is not an Values Provider", parameterName), INVALID_VALUE_RESOLVER_NAME));
    try {
        return resolveValues(parameters, factoryModelProperty, parameterValueResolver, connectionSupplier, configurationSupplier);
    } catch (Exception e) {
        throw new ValueResolvingException(format("An error occurred trying to resolve the Values for parameter '%s' of component '%s'", parameterName, containerModel.getName()), UNKNOWN, e);
    }
}
Also used : ValueProviderFactoryModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.ValueProviderFactoryModelProperty) ParameterModel(org.mule.runtime.api.meta.model.parameter.ParameterModel) ValueResolvingException(org.mule.runtime.extension.api.values.ValueResolvingException) InitialisationException(org.mule.runtime.api.lifecycle.InitialisationException) ValueResolvingException(org.mule.runtime.extension.api.values.ValueResolvingException)

Example 83 with ParameterModel

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

the class DefaultExtensionModelFactoryTestCase method sourceWithReducedBackPressureStrategies.

@Test
public void sourceWithReducedBackPressureStrategies() {
    ExtensionModel extensionModel = createExtension(HeisenbergExtension.class);
    SourceModel source = extensionModel.getConfigurationModels().get(0).getSourceModel("ListenPayments").get();
    ParameterModel parameter = source.getAllParameterModels().stream().filter(p -> BACK_PRESSURE_STRATEGY_PARAMETER_NAME.equals(p.getName())).findAny().orElseThrow(() -> new IllegalStateException("No backPressureStrategy parameter"));
    assertThat(parameter.getType(), is(instanceOf(StringType.class)));
    assertThat(parameter.getDefaultValue(), is(FAIL));
    EnumAnnotation enumAnnotation = parameter.getType().getAnnotation(EnumAnnotation.class).orElseThrow(() -> new IllegalStateException("No enum annotation"));
    assertThat(asList(enumAnnotation.getValues()), containsInAnyOrder(FAIL.name(), DROP.name()));
}
Also used : SourceModel(org.mule.runtime.api.meta.model.source.SourceModel) ParameterModel(org.mule.runtime.api.meta.model.parameter.ParameterModel) EnumAnnotation(org.mule.metadata.api.annotation.EnumAnnotation) ExtensionModel(org.mule.runtime.api.meta.model.ExtensionModel) Test(org.junit.Test) SmallTest(org.mule.tck.size.SmallTest)

Example 84 with ParameterModel

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

the class DefaultExtensionModelFactoryTestCase method assertSinglePrimaryContentParameter.

private void assertSinglePrimaryContentParameter(ExtensionModel extensionModel, String operationName, String defaultValue) {
    OperationModel appleOperation = aggressiveGet(extensionModel.getOperationModel(operationName));
    List<ParameterModel> contentParameters = appleOperation.getAllParameterModels().stream().filter(ExtensionModelUtils::isContent).collect(toList());
    assertThat(contentParameters, hasSize(1));
    ParameterModel contentParameter = contentParameters.get(0);
    assertThat(contentParameter.isRequired(), is(false));
    assertThat(contentParameter.getDefaultValue(), is(defaultValue));
    assertThat(contentParameter.getRole(), is(PRIMARY_CONTENT));
}
Also used : ParameterModel(org.mule.runtime.api.meta.model.parameter.ParameterModel) OperationModel(org.mule.runtime.api.meta.model.operation.OperationModel)

Example 85 with ParameterModel

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

the class DefaultExtensionModelFactoryTestCase method objectStoreParameters.

@Test
public void objectStoreParameters() {
    ExtensionModel extensionModel = createExtension(HeisenbergExtension.class);
    OperationModel operationModel = extensionModel.getOperationModel("storeMoney").get();
    ParameterModel parameter = operationModel.getAllParameterModels().stream().filter(p -> "objectStore".equals(p.getName())).findFirst().get();
    StereotypeModel stereotype = parameter.getAllowedStereotypes().stream().filter(s -> s.getType().equals(OBJECT_STORE.getType())).findFirst().get();
    assertThat(stereotype.getNamespace(), equalTo(OBJECT_STORE.getNamespace()));
    Optional<ImportedTypeModel> typeImport = extensionModel.getImportedTypes().stream().filter(i -> getTypeId(i.getImportedType()).map(id -> ObjectStore.class.getName().equals(id)).orElse(false)).findFirst();
    assertThat(typeImport.isPresent(), is(true));
}
Also used : StereotypeModel(org.mule.runtime.api.meta.model.stereotype.StereotypeModel) Arrays(java.util.Arrays) ImportedTypeModel(org.mule.runtime.api.meta.model.ImportedTypeModel) HeisenbergOperations(org.mule.test.heisenberg.extension.HeisenbergOperations) VALIDATOR(org.mule.runtime.extension.api.stereotype.MuleStereotypes.VALIDATOR) HeisenbergScopes(org.mule.test.heisenberg.extension.HeisenbergScopes) DROP(org.mule.runtime.extension.api.runtime.source.BackPressureMode.DROP) VALIDATOR_DEFINITION(org.mule.runtime.extension.api.stereotype.MuleStereotypes.VALIDATOR_DEFINITION) Export(org.mule.runtime.extension.api.annotation.Export) KillingOperations(org.mule.test.heisenberg.extension.KillingOperations) CoreMatchers.instanceOf(org.hamcrest.CoreMatchers.instanceOf) CPU_LITE(org.mule.runtime.api.meta.model.operation.ExecutionType.CPU_LITE) Arrays.asList(java.util.Arrays.asList) OnException(org.mule.runtime.extension.api.annotation.OnException) ClassTypeLoader(org.mule.metadata.api.ClassTypeLoader) ObjectStore(org.mule.runtime.api.store.ObjectStore) MuleExtensionUtils.loadExtension(org.mule.runtime.module.extension.api.util.MuleExtensionUtils.loadExtension) SELECT(org.mule.runtime.api.meta.Category.SELECT) EmpireStereotype(org.mule.test.heisenberg.extension.stereotypes.EmpireStereotype) HeisenbergConnectionExceptionEnricher(org.mule.test.heisenberg.extension.exception.HeisenbergConnectionExceptionEnricher) CarDealer(org.mule.test.heisenberg.extension.model.CarDealer) EnumAnnotation(org.mule.metadata.api.annotation.EnumAnnotation) StringType(org.mule.metadata.api.model.StringType) Sources(org.mule.runtime.extension.api.annotation.Sources) MarvelExtension(org.mule.test.marvel.MarvelExtension) Operations(org.mule.runtime.extension.api.annotation.Operations) StereotypeModel(org.mule.runtime.api.meta.model.stereotype.StereotypeModel) Extension(org.mule.runtime.extension.api.annotation.Extension) CoreMatchers.equalTo(org.hamcrest.CoreMatchers.equalTo) ConnectionProviderModel(org.mule.runtime.api.meta.model.connection.ConnectionProviderModel) Ricin(org.mule.test.heisenberg.extension.model.Ricin) ExtensionsTypeLoaderFactory(org.mule.runtime.extension.api.declaration.type.ExtensionsTypeLoaderFactory) ExternalLibraryModel(org.mule.runtime.api.meta.model.ExternalLibraryModel) PaulMcCartneySource(org.mule.test.vegan.extension.PaulMcCartneySource) EmitsResponse(org.mule.runtime.extension.api.annotation.source.EmitsResponse) BackPressure(org.mule.runtime.extension.api.annotation.source.BackPressure) SecureHeisenbergConnectionProvider(org.mule.test.heisenberg.extension.SecureHeisenbergConnectionProvider) AbstractMuleTestCase(org.mule.tck.junit4.AbstractMuleTestCase) PAYLOAD(org.mule.runtime.extension.api.annotation.param.Optional.PAYLOAD) Matchers.hasSize(org.hamcrest.Matchers.hasSize) CoreMatchers.nullValue(org.hamcrest.CoreMatchers.nullValue) CONFIG_NAME(org.mule.test.marvel.ironman.IronMan.CONFIG_NAME) HasExternalLibraries(org.mule.runtime.api.meta.model.HasExternalLibraries) Investment(org.mule.test.heisenberg.extension.model.Investment) Test(org.junit.Test) HEISENBERG_LIB_DESCRIPTION(org.mule.test.heisenberg.extension.HeisenbergExtension.HEISENBERG_LIB_DESCRIPTION) ConfigurationModel(org.mule.runtime.api.meta.model.config.ConfigurationModel) BLOCKING(org.mule.runtime.api.meta.model.operation.ExecutionType.BLOCKING) VeganExtension(org.mule.test.vegan.extension.VeganExtension) ExtensionModel(org.mule.runtime.api.meta.model.ExtensionModel) MoneyLaunderingOperation(org.mule.test.heisenberg.extension.MoneyLaunderingOperation) STREAMING_STRATEGY_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.STREAMING_STRATEGY_PARAMETER_NAME) Streaming(org.mule.runtime.extension.api.annotation.Streaming) MediaType(org.mule.runtime.extension.api.annotation.param.MediaType) HeisenbergErrors(org.mule.test.heisenberg.extension.HeisenbergErrors) Reference(org.mule.runtime.api.util.Reference) HEISENBERG_LIB_FILE_NAME(org.mule.test.heisenberg.extension.HeisenbergExtension.HEISENBERG_LIB_FILE_NAME) NOT_SUPPORTED(org.mule.runtime.api.meta.ExpressionSupport.NOT_SUPPORTED) CoreMatchers.is(org.hamcrest.CoreMatchers.is) TEXT_PLAIN(org.mule.runtime.extension.api.annotation.param.MediaType.TEXT_PLAIN) OperationModel(org.mule.runtime.api.meta.model.operation.OperationModel) CoreMatchers.notNullValue(org.hamcrest.CoreMatchers.notNullValue) Assert.assertThat(org.junit.Assert.assertThat) SourceModel(org.mule.runtime.api.meta.model.source.SourceModel) APPLE(org.mule.test.vegan.extension.VeganExtension.APPLE) SmallTest(org.mule.tck.size.SmallTest) WAIT(org.mule.runtime.extension.api.runtime.source.BackPressureMode.WAIT) MetadataTypeUtils.getTypeId(org.mule.metadata.api.utils.MetadataTypeUtils.getTypeId) HEISENBERG(org.mule.test.heisenberg.extension.HeisenbergExtension.HEISENBERG) IdempotentExtensionWalker(org.mule.runtime.api.meta.model.util.IdempotentExtensionWalker) SubTypeMapping(org.mule.runtime.extension.api.annotation.SubTypeMapping) StreamingStrategyTypeBuilder(org.mule.runtime.extension.api.declaration.type.StreamingStrategyTypeBuilder) Weapon(org.mule.test.heisenberg.extension.model.Weapon) ConnectionProviders(org.mule.runtime.extension.api.annotation.connectivity.ConnectionProviders) HeisenbergException(org.mule.test.heisenberg.extension.exception.HeisenbergException) PROCESSOR_DEFINITION(org.mule.runtime.extension.api.stereotype.MuleStereotypes.PROCESSOR_DEFINITION) BACK_PRESSURE_STRATEGY_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.BACK_PRESSURE_STRATEGY_PARAMETER_NAME) PRIMARY_CONTENT(org.mule.runtime.api.meta.model.parameter.ParameterRole.PRIMARY_CONTENT) List(java.util.List) Matchers.containsInAnyOrder(org.hamcrest.Matchers.containsInAnyOrder) Optional(java.util.Optional) HeisenbergRouters(org.mule.test.heisenberg.extension.HeisenbergRouters) IllegalModelDefinitionException(org.mule.runtime.extension.api.exception.IllegalModelDefinitionException) ParameterModel(org.mule.runtime.api.meta.model.parameter.ParameterModel) Alias(org.mule.runtime.extension.api.annotation.Alias) HeisenbergSource(org.mule.test.heisenberg.extension.HeisenbergSource) CPU_INTENSIVE(org.mule.runtime.api.meta.model.operation.ExecutionType.CPU_INTENSIVE) ExpectedException.none(org.junit.rules.ExpectedException.none) HeisenbergConnectionProvider(org.mule.test.heisenberg.extension.HeisenbergConnectionProvider) HEISENBERG_LIB_CLASS_NAME(org.mule.test.heisenberg.extension.HeisenbergExtension.HEISENBERG_LIB_CLASS_NAME) NoSuchElementException(java.util.NoSuchElementException) HeisenbergExtension(org.mule.test.heisenberg.extension.HeisenbergExtension) ExpectedException(org.junit.rules.ExpectedException) ErrorTypes(org.mule.runtime.extension.api.annotation.error.ErrorTypes) CoreMatchers.sameInstance(org.hamcrest.CoreMatchers.sameInstance) OBJECT_STORE(org.mule.runtime.extension.api.stereotype.MuleStereotypes.OBJECT_STORE) HEISENBERG_LIB_NAME(org.mule.test.heisenberg.extension.HeisenbergExtension.HEISENBERG_LIB_NAME) BANANA(org.mule.test.vegan.extension.VeganExtension.BANANA) ExtensionModelUtils(org.mule.runtime.extension.api.util.ExtensionModelUtils) Collectors.toList(java.util.stream.Collectors.toList) Rule(org.junit.Rule) PROCESSOR(org.mule.runtime.extension.api.stereotype.MuleStereotypes.PROCESSOR) CarWash(org.mule.test.heisenberg.extension.model.CarWash) FAIL(org.mule.runtime.extension.api.runtime.source.BackPressureMode.FAIL) ObjectStore(org.mule.runtime.api.store.ObjectStore) ParameterModel(org.mule.runtime.api.meta.model.parameter.ParameterModel) ImportedTypeModel(org.mule.runtime.api.meta.model.ImportedTypeModel) ExtensionModel(org.mule.runtime.api.meta.model.ExtensionModel) OperationModel(org.mule.runtime.api.meta.model.operation.OperationModel) Test(org.junit.Test) SmallTest(org.mule.tck.size.SmallTest)

Aggregations

ParameterModel (org.mule.runtime.api.meta.model.parameter.ParameterModel)133 Test (org.junit.Test)91 SmallTest (org.mule.tck.size.SmallTest)68 OperationModel (org.mule.runtime.api.meta.model.operation.OperationModel)29 ExtensionModel (org.mule.runtime.api.meta.model.ExtensionModel)21 List (java.util.List)19 ParameterGroupModel (org.mule.runtime.api.meta.model.parameter.ParameterGroupModel)19 Optional (java.util.Optional)16 SourceModel (org.mule.runtime.api.meta.model.source.SourceModel)15 Collectors.toList (java.util.stream.Collectors.toList)13 ObjectType (org.mule.metadata.api.model.ObjectType)13 String.format (java.lang.String.format)12 ConfigurationModel (org.mule.runtime.api.meta.model.config.ConfigurationModel)12 ParameterizedModel (org.mule.runtime.api.meta.model.parameter.ParameterizedModel)12 ExtensionsTypeLoaderFactory (org.mule.runtime.extension.api.declaration.type.ExtensionsTypeLoaderFactory)12 StringType (org.mule.metadata.api.model.StringType)11 ClassTypeLoader (org.mule.metadata.api.ClassTypeLoader)10 ArrayType (org.mule.metadata.api.model.ArrayType)10 MetadataType (org.mule.metadata.api.model.MetadataType)10 Map (java.util.Map)9