Search in sources :

Example 1 with Declarer

use of org.mule.runtime.api.meta.model.declaration.fluent.Declarer in project mule by mulesoft.

the class FunctionModelLoaderDelegate method declareFunctions.

void declareFunctions(ExtensionDeclarer extensionDeclarer, HasFunctionDeclarer declarer, FunctionContainerElement methodOwnerClass, List<FunctionElement> functions) {
    for (FunctionElement function : functions) {
        FunctionContainerElement functionOwner = methodOwnerClass != null ? methodOwnerClass : function.getEnclosingType();
        checkIsNotAnExtension(functionOwner);
        final Optional<ExtensionParameter> configParameter = loader.getConfigParameter(function);
        if (configParameter.isPresent()) {
            throw new IllegalModelDefinitionException(format("Function '%s' requires a config parameter, but that is not allowed. " + "Remove such parameter.", function.getName()));
        }
        HasFunctionDeclarer actualDeclarer = (HasFunctionDeclarer) loader.selectDeclarerBasedOnConfig(extensionDeclarer, (Declarer) declarer, configParameter, empty());
        if (functionDeclarers.containsKey(function)) {
            actualDeclarer.withFunction(functionDeclarers.get(function));
            continue;
        }
        final FunctionDeclarer functionDeclarer = actualDeclarer.withFunction(function.getAlias());
        function.getMethod().ifPresent(method -> {
            functionDeclarer.withModelProperty(new ImplementingMethodModelProperty(method));
            function.getDeclaringClass().ifPresent(clazz -> functionDeclarer.withModelProperty(new FunctionExecutorModelProperty(new ReflectiveFunctionExecutorFactory<>(clazz, method))));
        });
        functionDeclarer.withOutput().ofType(function.getReturnMetadataType());
        ParameterDeclarationContext declarationContext = new ParameterDeclarationContext(FUNCTION, functionDeclarer.getDeclaration());
        loader.getMethodParametersLoader().declare(functionDeclarer, function.getParameters(), declarationContext);
        functionDeclarers.put(function, functionDeclarer);
    }
}
Also used : FunctionContainerElement(org.mule.runtime.module.extension.api.loader.java.type.FunctionContainerElement) IllegalModelDefinitionException(org.mule.runtime.extension.api.exception.IllegalModelDefinitionException) ParameterDeclarationContext(org.mule.runtime.module.extension.internal.loader.utils.ParameterDeclarationContext) FunctionElement(org.mule.runtime.module.extension.api.loader.java.type.FunctionElement) FunctionExecutorModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.FunctionExecutorModelProperty) ExtensionParameter(org.mule.runtime.module.extension.api.loader.java.type.ExtensionParameter) HasFunctionDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.HasFunctionDeclarer) FunctionDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.FunctionDeclarer) ImplementingMethodModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.ImplementingMethodModelProperty) HasFunctionDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.HasFunctionDeclarer) FunctionDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.FunctionDeclarer) ExtensionDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclarer) Declarer(org.mule.runtime.api.meta.model.declaration.fluent.Declarer) HasFunctionDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.HasFunctionDeclarer)

Example 2 with Declarer

use of org.mule.runtime.api.meta.model.declaration.fluent.Declarer in project mule by mulesoft.

the class RouterModelLoaderDelegate method declareRouter.

void declareRouter(ExtensionDeclarer extensionDeclarer, HasOperationDeclarer ownerDeclarer, OperationContainerElement enclosingType, OperationElement routerMethod, Optional<ExtensionParameter> configParameter, Optional<ExtensionParameter> connectionParameter) {
    checkDefinition(!configParameter.isPresent(), format("Scope '%s' requires a config, but that is not allowed, remove such parameter", routerMethod.getName()));
    checkDefinition(!connectionParameter.isPresent(), format("Scope '%s' requires a connection, but that is not allowed, remove such parameter", routerMethod.getName()));
    HasConstructDeclarer actualDeclarer = (HasConstructDeclarer) loader.selectDeclarerBasedOnConfig(extensionDeclarer, (Declarer) ownerDeclarer, configParameter, connectionParameter);
    if (constructDeclarers.containsKey(routerMethod)) {
        actualDeclarer.withConstruct(constructDeclarers.get(routerMethod));
        return;
    }
    final ConstructDeclarer router = actualDeclarer.withConstruct(routerMethod.getAlias());
    router.withModelProperty(new ExtensionOperationDescriptorModelProperty(routerMethod));
    Optional<Method> method = routerMethod.getMethod();
    Optional<Class<?>> declaringClass = enclosingType.getDeclaringClass();
    if (method.isPresent() && declaringClass.isPresent()) {
        router.withModelProperty(new ImplementingMethodModelProperty(method.get())).withModelProperty(new ComponentExecutorModelProperty(new ReflectiveOperationExecutorFactory<>(declaringClass.get(), method.get())));
    }
    processMimeType(router, routerMethod);
    List<ExtensionParameter> callbackParameters = routerMethod.getParameters().stream().filter(p -> VALID_CALLBACK_PARAMETERS.stream().anyMatch(validType -> p.getType().isSameType(validType))).collect(toList());
    List<ExtensionParameter> routes = routerMethod.getParameters().stream().filter(this::isRoute).collect(toList());
    checkDefinition(!callbackParameters.isEmpty(), format("Router '%s' does not declare a parameter with one of the types '%s'. One is required.", routerMethod.getAlias(), VALID_CALLBACK_PARAMETERS));
    checkDefinition(!routes.isEmpty(), format("Router '%s' does not declare a '%s' parameter. One is required.", routerMethod.getAlias(), Route.class.getSimpleName()));
    checkDefinition(callbackParameters.size() <= 1, format("Router '%s' defines more than one CompletionCallback parameters. Only one is allowed", routerMethod.getAlias()));
    checkDefinition(isVoid(routerMethod), format("Router '%s' is not declared in a void method.", routerMethod.getAlias()));
    List<ExtensionParameter> nonRouteParameters = routerMethod.getParameters().stream().filter(p -> !isRoute(p) && !callbackParameters.contains(p)).collect(toList());
    declareParameters(router, nonRouteParameters, routerMethod.getEnclosingType().getParameters(), new ParameterDeclarationContext(CONSTRUCT, router.getDeclaration()));
    declareRoutes(router, routes);
}
Also used : OperationModelLoaderDelegate.checkDefinition(org.mule.runtime.module.extension.internal.loader.java.OperationModelLoaderDelegate.checkDefinition) FieldElement(org.mule.runtime.module.extension.api.loader.java.type.FieldElement) HashMap(java.util.HashMap) RouterCompletionCallback(org.mule.runtime.extension.api.runtime.process.RouterCompletionCallback) OperationElement(org.mule.runtime.module.extension.api.loader.java.type.OperationElement) ReflectiveOperationExecutorFactory(org.mule.runtime.module.extension.internal.runtime.execution.ReflectiveOperationExecutorFactory) MethodElement(org.mule.runtime.module.extension.api.loader.java.type.MethodElement) Arrays.asList(java.util.Arrays.asList) Map(java.util.Map) ConstructDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.ConstructDeclarer) VoidCompletionCallback(org.mule.runtime.extension.api.runtime.process.VoidCompletionCallback) Parameter(org.mule.runtime.extension.api.annotation.param.Parameter) Method(java.lang.reflect.Method) String.format(java.lang.String.format) HasConstructDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.HasConstructDeclarer) NestedRouteDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.NestedRouteDeclarer) Collectors.toList(java.util.stream.Collectors.toList) List(java.util.List) ParameterDeclarationContext(org.mule.runtime.module.extension.internal.loader.utils.ParameterDeclarationContext) IntrospectionUtils.isVoid(org.mule.runtime.module.extension.internal.util.IntrospectionUtils.isVoid) ComponentExecutorModelProperty(org.mule.runtime.module.extension.api.loader.java.property.ComponentExecutorModelProperty) Route(org.mule.runtime.extension.api.runtime.route.Route) OperationContainerElement(org.mule.runtime.module.extension.api.loader.java.type.OperationContainerElement) Optional(java.util.Optional) ExtensionDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclarer) ExtensionParameter(org.mule.runtime.module.extension.api.loader.java.type.ExtensionParameter) Declarer(org.mule.runtime.api.meta.model.declaration.fluent.Declarer) ImplementingTypeModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.ImplementingTypeModelProperty) ImplementingMethodModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.ImplementingMethodModelProperty) ExtensionOperationDescriptorModelProperty(org.mule.runtime.module.extension.internal.loader.java.type.property.ExtensionOperationDescriptorModelProperty) HasOperationDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.HasOperationDeclarer) ParameterDeclarationContext(org.mule.runtime.module.extension.internal.loader.utils.ParameterDeclarationContext) ExtensionOperationDescriptorModelProperty(org.mule.runtime.module.extension.internal.loader.java.type.property.ExtensionOperationDescriptorModelProperty) ExtensionParameter(org.mule.runtime.module.extension.api.loader.java.type.ExtensionParameter) ConstructDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.ConstructDeclarer) HasConstructDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.HasConstructDeclarer) ReflectiveOperationExecutorFactory(org.mule.runtime.module.extension.internal.runtime.execution.ReflectiveOperationExecutorFactory) Method(java.lang.reflect.Method) HasConstructDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.HasConstructDeclarer) ImplementingMethodModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.ImplementingMethodModelProperty) ConstructDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.ConstructDeclarer) HasConstructDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.HasConstructDeclarer) NestedRouteDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.NestedRouteDeclarer) ExtensionDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclarer) Declarer(org.mule.runtime.api.meta.model.declaration.fluent.Declarer) HasOperationDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.HasOperationDeclarer) ComponentExecutorModelProperty(org.mule.runtime.module.extension.api.loader.java.property.ComponentExecutorModelProperty)

Example 3 with Declarer

use of org.mule.runtime.api.meta.model.declaration.fluent.Declarer in project mule by mulesoft.

the class ScopeModelLoaderDelegate method declareScope.

void declareScope(ExtensionDeclarer extensionDeclarer, HasOperationDeclarer ownerDeclarer, OperationContainerElement enclosingType, OperationElement scopeMethod, Optional<ExtensionParameter> configParameter, Optional<ExtensionParameter> connectionParameter) {
    HasOperationDeclarer actualDeclarer = (HasOperationDeclarer) loader.selectDeclarerBasedOnConfig(extensionDeclarer, (Declarer) ownerDeclarer, configParameter, connectionParameter);
    checkDefinition(!configParameter.isPresent(), format("Scope '%s' requires a config, but that is not allowed, remove such parameter", scopeMethod.getName()));
    checkDefinition(!connectionParameter.isPresent(), format("Scope '%s' requires a connection, but that is not allowed, remove such parameter", scopeMethod.getName()));
    checkDefinition(isNonBlocking(scopeMethod), format("Scope '%s' does not declare a '%s' parameter. One is required for all operations " + "that receive and execute a Chain of other components", scopeMethod.getAlias(), CompletionCallback.class.getSimpleName()));
    if (operationDeclarers.containsKey(scopeMethod)) {
        actualDeclarer.withOperation(operationDeclarers.get(scopeMethod));
        return;
    }
    final OperationDeclarer scope = actualDeclarer.withOperation(scopeMethod.getAlias());
    scope.withModelProperty(new ExtensionOperationDescriptorModelProperty(scopeMethod));
    Optional<Method> method = scopeMethod.getMethod();
    Optional<Class<?>> declaringClass = enclosingType.getDeclaringClass();
    if (method.isPresent() && declaringClass.isPresent()) {
        scope.withModelProperty(new ImplementingMethodModelProperty(method.get())).withModelProperty(new ComponentExecutorModelProperty(new ReflectiveOperationExecutorFactory<>(declaringClass.get(), method.get())));
    }
    processMimeType(scope, scopeMethod);
    processNonBlockingOperation(scope, scopeMethod, false);
    List<ExtensionParameter> processorChain = scopeMethod.getParameters().stream().filter(ModelLoaderUtils::isProcessorChain).collect(toList());
    checkDefinition(processorChain.size() <= 1, format("Scope '%s' declares too many parameters of type '%s', only one input of this kind is supported." + "Offending parameters are: %s", scopeMethod.getAlias(), Chain.class.getSimpleName(), processorChain.stream().map(ExtensionParameter::getName).collect(toList())));
    declareParameters(scope, scopeMethod.getParameters(), scopeMethod.getEnclosingType().getParameters(), new ParameterDeclarationContext(SCOPE, scope.getDeclaration()));
    loader.addExceptionEnricher(scopeMethod, scope);
    operationDeclarers.put(scopeMethod, scope);
}
Also used : ParameterDeclarationContext(org.mule.runtime.module.extension.internal.loader.utils.ParameterDeclarationContext) ExtensionOperationDescriptorModelProperty(org.mule.runtime.module.extension.internal.loader.java.type.property.ExtensionOperationDescriptorModelProperty) ExtensionParameter(org.mule.runtime.module.extension.api.loader.java.type.ExtensionParameter) ReflectiveOperationExecutorFactory(org.mule.runtime.module.extension.internal.runtime.execution.ReflectiveOperationExecutorFactory) HasOperationDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.HasOperationDeclarer) Method(java.lang.reflect.Method) OperationDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.OperationDeclarer) HasOperationDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.HasOperationDeclarer) ImplementingMethodModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.ImplementingMethodModelProperty) OperationDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.OperationDeclarer) ExtensionDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclarer) Declarer(org.mule.runtime.api.meta.model.declaration.fluent.Declarer) HasOperationDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.HasOperationDeclarer) ComponentExecutorModelProperty(org.mule.runtime.module.extension.api.loader.java.property.ComponentExecutorModelProperty)

Example 4 with Declarer

use of org.mule.runtime.api.meta.model.declaration.fluent.Declarer in project mule by mulesoft.

the class SourceModelLoaderDelegate method declareMessageSource.

void declareMessageSource(ExtensionDeclarer extensionDeclarer, HasSourceDeclarer declarer, SourceElement sourceType, boolean supportsConfig) {
    // TODO: MULE-9220 - Add a syntax validator which checks that the sourceType doesn't implement
    if (isLifecycle(sourceType)) {
        throw new IllegalSourceModelDefinitionException(format("Source class '%s' implements a lifecycle interface. Sources are not allowed to", sourceType.getName()));
    }
    final Optional<ExtensionParameter> configParameter = loader.getConfigParameter(sourceType);
    final Optional<ExtensionParameter> connectionParameter = loader.getConnectionParameter(sourceType);
    if (loader.isInvalidConfigSupport(supportsConfig, configParameter, connectionParameter)) {
        throw new IllegalSourceModelDefinitionException(format("Source '%s' is defined at the extension level but it requires a config parameter. " + "Remove such parameter or move the source to the proper config", sourceType.getName()));
    }
    HasSourceDeclarer actualDeclarer = (HasSourceDeclarer) loader.selectDeclarerBasedOnConfig(extensionDeclarer, (Declarer) declarer, configParameter, connectionParameter);
    SourceDeclarer existingDeclarer = sourceDeclarers.get(sourceType);
    if (existingDeclarer != null) {
        actualDeclarer.withMessageSource(existingDeclarer);
        return;
    }
    SourceDeclarer sourceDeclarer = actualDeclarer.withMessageSource(sourceType.getAlias());
    sourceDeclarer.withModelProperty(new ExtensionTypeDescriptorModelProperty(sourceType));
    List<Type> sourceGenerics = sourceType.getSuperClassGenerics();
    if (sourceGenerics.size() != 2) {
        // TODO: MULE-9220: Add a syntax validator for this
        throw new IllegalModelDefinitionException(format("Message source class '%s' was expected to have 2 generic types " + "(one for the Payload type and another for the Attributes type) but %d were found", sourceType.getName(), sourceGenerics.size()));
    }
    sourceDeclarer.hasResponse(sourceType.isAnnotatedWith(EmitsResponse.class)).requiresConnection(connectionParameter.isPresent());
    sourceType.getDeclaringClass().ifPresent(clazz -> sourceDeclarer.withModelProperty(new SourceFactoryModelProperty(new DefaultSourceFactory((Class<? extends Source>) clazz))).withModelProperty(new ImplementingTypeModelProperty(clazz)));
    processMimeType(sourceDeclarer, sourceType);
    processComponentConnectivity(sourceDeclarer, sourceType, sourceType);
    resolveOutputTypes(sourceDeclarer, sourceType);
    loader.addExceptionEnricher(sourceType, sourceDeclarer);
    declareSourceParameters(sourceType, sourceDeclarer);
    declareSourceCallback(sourceType, sourceDeclarer);
    sourceDeclarers.put(sourceType, sourceDeclarer);
}
Also used : ExtensionParameter(org.mule.runtime.module.extension.api.loader.java.type.ExtensionParameter) ExtensionTypeDescriptorModelProperty(org.mule.runtime.module.extension.internal.loader.java.type.property.ExtensionTypeDescriptorModelProperty) IllegalSourceModelDefinitionException(org.mule.runtime.extension.api.exception.IllegalSourceModelDefinitionException) HasSourceDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.HasSourceDeclarer) SourceFactoryModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.SourceFactoryModelProperty) IllegalModelDefinitionException(org.mule.runtime.extension.api.exception.IllegalModelDefinitionException) Type(org.mule.runtime.module.extension.api.loader.java.type.Type) MetadataType(org.mule.metadata.api.model.MetadataType) DefaultSourceFactory(org.mule.runtime.module.extension.internal.runtime.source.DefaultSourceFactory) SourceDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.SourceDeclarer) HasSourceDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.HasSourceDeclarer) SourceDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.SourceDeclarer) HasSourceDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.HasSourceDeclarer) ParameterizedDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.ParameterizedDeclarer) ParameterDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.ParameterDeclarer) ExtensionDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclarer) Declarer(org.mule.runtime.api.meta.model.declaration.fluent.Declarer) ImplementingTypeModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.ImplementingTypeModelProperty)

Example 5 with Declarer

use of org.mule.runtime.api.meta.model.declaration.fluent.Declarer in project mule by mulesoft.

the class ParameterModelsLoaderDelegate method declaredAsGroup.

private List<ParameterDeclarer> declaredAsGroup(HasParametersDeclarer component, ParameterDeclarationContext declarationContext, ExtensionParameter groupParameter) throws IllegalParameterModelDefinitionException {
    ParameterGroup groupAnnotation = groupParameter.getAnnotation(ParameterGroup.class).orElse(null);
    if (groupAnnotation == null) {
        return emptyList();
    }
    final String groupName = groupAnnotation.name();
    if (DEFAULT_GROUP_NAME.equals(groupName)) {
        throw new IllegalParameterModelDefinitionException(format("%s '%s' defines parameter group of name '%s' which is the default one. " + "@%s cannot be used with the default group name", getComponentDeclarationTypeName(((Declarer) component).getDeclaration()), ((NamedDeclaration) ((Declarer) component).getDeclaration()).getName(), groupName, ParameterGroup.class.getSimpleName()));
    }
    final Type type = groupParameter.getType();
    final List<FieldElement> nestedGroups = type.getAnnotatedFields(ParameterGroup.class);
    if (!nestedGroups.isEmpty()) {
        throw new IllegalParameterModelDefinitionException(format("Class '%s' is used as a @%s but contains fields which also hold that annotation. Nesting groups is not allowed. " + "Offending fields are: [%s]", type.getName(), ParameterGroup.class.getSimpleName(), nestedGroups.stream().map(element -> element.getName()).collect(joining(","))));
    }
    if (groupParameter.isAnnotatedWith(org.mule.runtime.extension.api.annotation.param.Optional.class)) {
        throw new IllegalParameterModelDefinitionException(format("@%s can not be applied alongside with @%s. Affected parameter is [%s].", org.mule.runtime.extension.api.annotation.param.Optional.class.getSimpleName(), ParameterGroup.class.getSimpleName(), groupParameter.getName()));
    }
    ParameterGroupDeclarer declarer = component.onParameterGroup(groupName);
    if (declarer.getDeclaration().getModelProperty(ParameterGroupModelProperty.class).isPresent()) {
        throw new IllegalParameterModelDefinitionException(format("Parameter group '%s' has already been declared on %s '%s'", groupName, getComponentDeclarationTypeName(((Declarer) component).getDeclaration()), ((NamedDeclaration) ((Declarer) component).getDeclaration()).getName()));
    } else {
        declarer.withModelProperty(new ParameterGroupModelProperty(new ParameterGroupDescriptor(groupName, type, groupParameter.getType().asMetadataType(), // TODO: Eliminate dependency to Annotated Elements
        groupParameter.getDeclaringElement().orElse(null), groupParameter)));
    }
    final List<FieldElement> annotatedParameters = type.getAnnotatedFields(Parameter.class);
    type.getAnnotation(ExclusiveOptionals.class).ifPresent(annotation -> {
        Set<String> optionalParamNames = annotatedParameters.stream().filter(f -> !f.isRequired()).map(WithAlias::getAlias).collect(toSet());
        declarer.withExclusiveOptionals(optionalParamNames, annotation.isOneRequired());
    });
    declarer.withDslInlineRepresentation(groupAnnotation.showInDsl());
    groupParameter.getAnnotation(DisplayName.class).ifPresent(displayName -> declarer.withDisplayModel(DisplayModel.builder().displayName(displayName.value()).build()));
    parseLayoutAnnotations(groupParameter, LayoutModel.builder()).ifPresent(declarer::withLayout);
    declarer.withModelProperty(new ExtensionParameterDescriptorModelProperty(groupParameter));
    if (!annotatedParameters.isEmpty()) {
        return declare(component, annotatedParameters, declarationContext, declarer);
    } else {
        return declare(component, getFieldsWithGetters(type), declarationContext, declarer);
    }
}
Also used : FieldElement(org.mule.runtime.module.extension.api.loader.java.type.FieldElement) MuleExtensionAnnotationParser.parseLayoutAnnotations(org.mule.runtime.module.extension.internal.loader.java.MuleExtensionAnnotationParser.parseLayoutAnnotations) ImplementingParameterModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.ImplementingParameterModelProperty) NameUtils.getComponentDeclarationTypeName(org.mule.runtime.extension.api.util.NameUtils.getComponentDeclarationTypeName) HasParametersDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.HasParametersDeclarer) NullSafeModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.NullSafeModelProperty) DeclaringMemberModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.DeclaringMemberModelProperty) Type(org.mule.runtime.module.extension.api.loader.java.type.Type) ArrayType(org.mule.metadata.api.model.ArrayType) DisplayName(org.mule.runtime.extension.api.annotation.param.display.DisplayName) ClassTypeLoader(org.mule.metadata.api.ClassTypeLoader) ParameterDsl(org.mule.runtime.extension.api.annotation.dsl.xml.ParameterDsl) ParameterDeclarerContributor(org.mule.runtime.module.extension.internal.loader.java.contributor.ParameterDeclarerContributor) Collectors.toSet(java.util.stream.Collectors.toSet) ParameterDslConfiguration(org.mule.runtime.api.meta.model.ParameterDslConfiguration) IntrospectionUtils.getFieldsWithGetters(org.mule.runtime.module.extension.internal.util.IntrospectionUtils.getFieldsWithGetters) ExtensionMetadataTypeUtils.isMap(org.mule.runtime.extension.api.util.ExtensionMetadataTypeUtils.isMap) IllegalParameterModelDefinitionException(org.mule.runtime.extension.api.exception.IllegalParameterModelDefinitionException) ObjectType(org.mule.metadata.api.model.ObjectType) ParameterGroupDescriptor(org.mule.runtime.module.extension.internal.loader.ParameterGroupDescriptor) ExclusiveParametersModel(org.mule.runtime.api.meta.model.parameter.ExclusiveParametersModel) Collections.emptyList(java.util.Collections.emptyList) WithAlias(org.mule.runtime.module.extension.api.loader.java.type.WithAlias) Connection(org.mule.runtime.extension.api.annotation.param.Connection) ExclusiveOptionals(org.mule.runtime.extension.api.annotation.param.ExclusiveOptionals) Set(java.util.Set) String.format(java.lang.String.format) Collectors.joining(java.util.stream.Collectors.joining) DisplayModel(org.mule.runtime.api.meta.model.display.DisplayModel) List(java.util.List) ParameterGroupDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.ParameterGroupDeclarer) NullSafe(org.mule.runtime.extension.api.annotation.param.NullSafe) LayoutModel(org.mule.runtime.api.meta.model.display.LayoutModel) Annotation(java.lang.annotation.Annotation) MetadataType(org.mule.metadata.api.model.MetadataType) ExtensionParameterDescriptorModelProperty(org.mule.runtime.module.extension.internal.loader.java.type.property.ExtensionParameterDescriptorModelProperty) ExtensionParameter(org.mule.runtime.module.extension.api.loader.java.type.ExtensionParameter) Expression(org.mule.runtime.extension.api.annotation.Expression) IllegalModelDefinitionException(org.mule.runtime.extension.api.exception.IllegalModelDefinitionException) AnnotatedElement(java.lang.reflect.AnnotatedElement) ConfigOverride(org.mule.runtime.extension.api.annotation.param.ConfigOverride) HasNestedComponentsDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.HasNestedComponentsDeclarer) MetadataKeyId(org.mule.runtime.extension.api.annotation.metadata.MetadataKeyId) DefaultImplementingTypeModelProperty(org.mule.runtime.extension.api.property.DefaultImplementingTypeModelProperty) Config(org.mule.runtime.extension.api.annotation.param.Config) ArrayList(java.util.ArrayList) ExtensionModelUtils.roleOf(org.mule.runtime.extension.api.util.ExtensionModelUtils.roleOf) ImmutableExclusiveParametersModel(org.mule.runtime.extension.api.model.parameter.ImmutableExclusiveParametersModel) Content(org.mule.runtime.extension.api.annotation.param.Content) IntrospectionUtils.getExpressionSupport(org.mule.runtime.module.extension.internal.util.IntrospectionUtils.getExpressionSupport) DEFAULT_GROUP_NAME(org.mule.runtime.api.meta.model.parameter.ParameterGroupModel.DEFAULT_GROUP_NAME) BasicTypeMetadataVisitor(org.mule.metadata.api.visitor.BasicTypeMetadataVisitor) ParameterGroupModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.ParameterGroupModelProperty) ParameterGroupDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.ParameterGroupDeclaration) Parameter(org.mule.runtime.extension.api.annotation.param.Parameter) ParameterGroup(org.mule.runtime.extension.api.annotation.param.ParameterGroup) ExclusiveOptionalModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.ExclusiveOptionalModelProperty) ModelLoaderUtils.isProcessorChain(org.mule.runtime.module.extension.internal.loader.utils.ModelLoaderUtils.isProcessorChain) NamedDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.NamedDeclaration) ExclusiveParametersDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.ExclusiveParametersDeclaration) Field(java.lang.reflect.Field) Collectors.toList(java.util.stream.Collectors.toList) ParameterDeclarationContext(org.mule.runtime.module.extension.internal.loader.utils.ParameterDeclarationContext) ParameterDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.ParameterDeclarer) Declarer(org.mule.runtime.api.meta.model.declaration.fluent.Declarer) JavaTypeUtils.getType(org.mule.metadata.java.api.utils.JavaTypeUtils.getType) ExclusiveOptionals(org.mule.runtime.extension.api.annotation.param.ExclusiveOptionals) ParameterGroupDescriptor(org.mule.runtime.module.extension.internal.loader.ParameterGroupDescriptor) FieldElement(org.mule.runtime.module.extension.api.loader.java.type.FieldElement) ParameterGroupModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.ParameterGroupModelProperty) ExtensionParameterDescriptorModelProperty(org.mule.runtime.module.extension.internal.loader.java.type.property.ExtensionParameterDescriptorModelProperty) Type(org.mule.runtime.module.extension.api.loader.java.type.Type) ArrayType(org.mule.metadata.api.model.ArrayType) ObjectType(org.mule.metadata.api.model.ObjectType) MetadataType(org.mule.metadata.api.model.MetadataType) JavaTypeUtils.getType(org.mule.metadata.java.api.utils.JavaTypeUtils.getType) ParameterGroup(org.mule.runtime.extension.api.annotation.param.ParameterGroup) DisplayName(org.mule.runtime.extension.api.annotation.param.display.DisplayName) NamedDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.NamedDeclaration) IllegalParameterModelDefinitionException(org.mule.runtime.extension.api.exception.IllegalParameterModelDefinitionException) ParameterGroupDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.ParameterGroupDeclarer)

Aggregations

Declarer (org.mule.runtime.api.meta.model.declaration.fluent.Declarer)5 ExtensionDeclarer (org.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclarer)4 ExtensionParameter (org.mule.runtime.module.extension.api.loader.java.type.ExtensionParameter)4 ImplementingMethodModelProperty (org.mule.runtime.module.extension.internal.loader.java.property.ImplementingMethodModelProperty)3 ParameterDeclarationContext (org.mule.runtime.module.extension.internal.loader.utils.ParameterDeclarationContext)3 String.format (java.lang.String.format)2 Method (java.lang.reflect.Method)2 List (java.util.List)2 Collectors.toList (java.util.stream.Collectors.toList)2 MetadataType (org.mule.metadata.api.model.MetadataType)2 HasOperationDeclarer (org.mule.runtime.api.meta.model.declaration.fluent.HasOperationDeclarer)2 ParameterDeclarer (org.mule.runtime.api.meta.model.declaration.fluent.ParameterDeclarer)2 Parameter (org.mule.runtime.extension.api.annotation.param.Parameter)2 IllegalModelDefinitionException (org.mule.runtime.extension.api.exception.IllegalModelDefinitionException)2 ComponentExecutorModelProperty (org.mule.runtime.module.extension.api.loader.java.property.ComponentExecutorModelProperty)2 ImplementingTypeModelProperty (org.mule.runtime.module.extension.internal.loader.java.property.ImplementingTypeModelProperty)2 ExtensionOperationDescriptorModelProperty (org.mule.runtime.module.extension.internal.loader.java.type.property.ExtensionOperationDescriptorModelProperty)2 ReflectiveOperationExecutorFactory (org.mule.runtime.module.extension.internal.runtime.execution.ReflectiveOperationExecutorFactory)2 Annotation (java.lang.annotation.Annotation)1 AnnotatedElement (java.lang.reflect.AnnotatedElement)1