Search in sources :

Example 1 with Type

use of org.mule.runtime.module.extension.api.loader.java.type.Type in project mule by mulesoft.

the class ConnectionProviderModelLoaderDelegate method declareConnectionProvider.

private void declareConnectionProvider(HasConnectionProviderDeclarer declarer, ConnectionProviderElement providerType) {
    ConnectionProviderDeclarer providerDeclarer = connectionProviderDeclarers.get(providerType);
    if (providerDeclarer != null) {
        declarer.withConnectionProvider(providerDeclarer);
        return;
    }
    String name = providerType.getAlias();
    String description = providerType.getDescription();
    if (providerType.getName().equals(providerType.getAlias())) {
        name = DEFAULT_CONNECTION_PROVIDER_NAME;
    }
    List<Type> providerGenerics = providerType.getInterfaceGenerics(ConnectionProvider.class);
    if (providerGenerics.size() != 1) {
        // TODO: MULE-9220: Add a syntax validator for this
        throw new IllegalConnectionProviderModelDefinitionException(format("Connection provider class '%s' was expected to have 1 generic type " + "(for the connection type) but %d were found", providerType.getName(), providerGenerics.size()));
    }
    providerDeclarer = declarer.withConnectionProvider(name).describedAs(description);
    ConnectionProviderDeclarer finalProviderDeclarer = providerDeclarer;
    providerType.getDeclaringClass().ifPresent(clazz -> finalProviderDeclarer.withModelProperty(new ConnectionProviderFactoryModelProperty(new DefaultConnectionProviderFactory<>(clazz, getExtensionClassLoader()))).withModelProperty(new ImplementingTypeModelProperty(clazz)));
    providerDeclarer.withModelProperty(new ConnectionTypeModelProperty(providerGenerics.get(0))).withModelProperty(new ExtensionTypeDescriptorModelProperty(providerType));
    loader.parseExternalLibs(providerType, providerDeclarer);
    ConnectionManagementType managementType = NONE;
    if (providerType.isAssignableTo(PoolingConnectionProvider.class)) {
        managementType = POOLING;
    } else if (providerType.isAssignableTo(CachedConnectionProvider.class)) {
        managementType = CACHED;
    }
    parseOAuthGrantType(providerType, providerDeclarer);
    providerDeclarer.withConnectionManagementType(managementType);
    providerDeclarer.supportsConnectivityTesting(!providerType.isAssignableTo(NoConnectivityTest.class));
    connectionProviderDeclarers.put(providerType, providerDeclarer);
    ParameterDeclarationContext context = new ParameterDeclarationContext(CONNECTION_PROVIDER, providerDeclarer.getDeclaration());
    loader.getFieldParametersLoader().declare(providerDeclarer, providerType.getParameters(), context);
}
Also used : ParameterDeclarationContext(org.mule.runtime.module.extension.internal.loader.utils.ParameterDeclarationContext) ExtensionTypeDescriptorModelProperty(org.mule.runtime.module.extension.internal.loader.java.type.property.ExtensionTypeDescriptorModelProperty) ConnectionManagementType(org.mule.runtime.api.meta.model.connection.ConnectionManagementType) CachedConnectionProvider(org.mule.runtime.api.connection.CachedConnectionProvider) IllegalConnectionProviderModelDefinitionException(org.mule.runtime.extension.api.exception.IllegalConnectionProviderModelDefinitionException) Type(org.mule.runtime.module.extension.api.loader.java.type.Type) ConnectionManagementType(org.mule.runtime.api.meta.model.connection.ConnectionManagementType) AuthorizationCodeGrantType(org.mule.runtime.extension.api.connectivity.oauth.AuthorizationCodeGrantType) ConnectionProviderDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.ConnectionProviderDeclarer) HasConnectionProviderDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.HasConnectionProviderDeclarer) ConnectionProviderFactoryModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.ConnectionProviderFactoryModelProperty) ConnectionTypeModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.ConnectionTypeModelProperty) ImplementingTypeModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.ImplementingTypeModelProperty)

Example 2 with Type

use of org.mule.runtime.module.extension.api.loader.java.type.Type in project mule by mulesoft.

the class ParameterModelsLoaderDelegate method parseNullSafe.

private void parseNullSafe(ExtensionParameter extensionParameter, ParameterDeclarer parameter) {
    if (extensionParameter.isAnnotatedWith(NullSafe.class)) {
        if (extensionParameter.isAnnotatedWith(ConfigOverride.class)) {
            throw new IllegalParameterModelDefinitionException(format("Parameter '%s' is annotated with '@%s' and also marked as a config override, which is redundant. " + "The default value for this parameter will come from the configuration parameter", extensionParameter.getName(), NullSafe.class.getSimpleName()));
        }
        if (extensionParameter.isRequired() && !extensionParameter.isAnnotatedWith(ParameterGroup.class)) {
            throw new IllegalParameterModelDefinitionException(format("Parameter '%s' is required but annotated with '@%s', which is redundant", extensionParameter.getName(), NullSafe.class.getSimpleName()));
        }
        Type nullSafeAnnotationType = extensionParameter.getValueFromAnnotation(NullSafe.class).get().getClassValue(NullSafe::defaultImplementingType);
        final boolean hasDefaultOverride = !nullSafeAnnotationType.isSameType(Object.class);
        MetadataType nullSafeType = hasDefaultOverride ? nullSafeAnnotationType.asMetadataType() : parameter.getDeclaration().getType();
        boolean isInstantiable = hasDefaultOverride ? nullSafeAnnotationType.isInstantiable() : extensionParameter.getType().isInstantiable();
        parameter.getDeclaration().getType().accept(new BasicTypeMetadataVisitor() {

            @Override
            protected void visitBasicType(MetadataType metadataType) {
                throw new IllegalParameterModelDefinitionException(format("Parameter '%s' is annotated with '@%s' but is of type '%s'. That annotation can only be " + "used with complex types (Pojos, Lists, Maps)", extensionParameter.getName(), NullSafe.class.getSimpleName(), extensionParameter.getType().getName()));
            }

            @Override
            public void visitArrayType(ArrayType arrayType) {
                if (hasDefaultOverride) {
                    throw new IllegalParameterModelDefinitionException(format("Parameter '%s' is annotated with '@%s' is of type '%s'" + " but a 'defaultImplementingType' was provided." + " Type override is not allowed for Collections", extensionParameter.getName(), NullSafe.class.getSimpleName(), extensionParameter.getType().getName()));
                }
            }

            @Override
            public void visitObject(ObjectType objectType) {
                if (hasDefaultOverride && isMap(objectType)) {
                    throw new IllegalParameterModelDefinitionException(format("Parameter '%s' is annotated with '@%s' is of type '%s'" + " but a 'defaultImplementingType' was provided." + " Type override is not allowed for Maps", extensionParameter.getName(), NullSafe.class.getSimpleName(), extensionParameter.getType().getName()));
                }
                if (hasDefaultOverride && extensionParameter.getType().isInstantiable()) {
                    throw new IllegalParameterModelDefinitionException(format("Parameter '%s' is annotated with '@%s' is of concrete type '%s'," + " but a 'defaultImplementingType' was provided." + " Type override is not allowed for concrete types", extensionParameter.getName(), NullSafe.class.getSimpleName(), extensionParameter.getType().getName()));
                }
                if (!isInstantiable && !isMap(nullSafeType)) {
                    throw new IllegalParameterModelDefinitionException(format("Parameter '%s' is annotated with '@%s' but is of type '%s'. That annotation can only be " + "used with complex instantiable types (Pojos, Lists, Maps)", extensionParameter.getName(), NullSafe.class.getSimpleName(), extensionParameter.getType().getName()));
                }
                if (hasDefaultOverride && !extensionParameter.getType().isAssignableFrom(nullSafeAnnotationType)) {
                    throw new IllegalParameterModelDefinitionException(format("Parameter '%s' is annotated with '@%s' of type '%s', but provided type '%s" + " is not a subtype of the parameter's type", extensionParameter.getName(), NullSafe.class.getSimpleName(), extensionParameter.getType().getName(), getType(nullSafeType).getName()));
                }
            }
        });
        parameter.withModelProperty(new NullSafeModelProperty(nullSafeType));
        if (hasDefaultOverride) {
            parameter.withModelProperty(new DefaultImplementingTypeModelProperty(nullSafeType));
        }
    }
}
Also used : BasicTypeMetadataVisitor(org.mule.metadata.api.visitor.BasicTypeMetadataVisitor) ArrayType(org.mule.metadata.api.model.ArrayType) ObjectType(org.mule.metadata.api.model.ObjectType) 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) NullSafeModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.NullSafeModelProperty) MetadataType(org.mule.metadata.api.model.MetadataType) DefaultImplementingTypeModelProperty(org.mule.runtime.extension.api.property.DefaultImplementingTypeModelProperty) NullSafe(org.mule.runtime.extension.api.annotation.param.NullSafe) ConfigOverride(org.mule.runtime.extension.api.annotation.param.ConfigOverride) IllegalParameterModelDefinitionException(org.mule.runtime.extension.api.exception.IllegalParameterModelDefinitionException)

Example 3 with Type

use of org.mule.runtime.module.extension.api.loader.java.type.Type 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 4 with Type

use of org.mule.runtime.module.extension.api.loader.java.type.Type in project mule by mulesoft.

the class JavaExportedTypesDeclarationEnricher method enrich.

@Override
public void enrich(ExtensionLoadingContext extensionLoadingContext) {
    Optional<ExtensionTypeDescriptorModelProperty> modelProperty = extensionLoadingContext.getExtensionDeclarer().getDeclaration().getModelProperty(ExtensionTypeDescriptorModelProperty.class);
    modelProperty.map(ExtensionTypeDescriptorModelProperty::getType).flatMap(type -> type.getValueFromAnnotation(Export.class)).ifPresent(exportAnnotation -> {
        ExtensionDeclarer declarer = extensionLoadingContext.getExtensionDeclarer();
        exportAnnotation.getClassArrayValue(Export::classes).stream().map(Type::asMetadataType).forEach(type -> registerType(declarer, type));
        exportAnnotation.getArrayValue(Export::resources).forEach(declarer::withResource);
    });
}
Also used : ObjectType(org.mule.metadata.api.model.ObjectType) ExtensionTypeDescriptorModelProperty(org.mule.runtime.module.extension.internal.loader.java.type.property.ExtensionTypeDescriptorModelProperty) DeclarationEnricherPhase(org.mule.runtime.extension.api.loader.DeclarationEnricherPhase) ExtensionLoadingContext(org.mule.runtime.extension.api.loader.ExtensionLoadingContext) MetadataTypeVisitor(org.mule.metadata.api.visitor.MetadataTypeVisitor) Export(org.mule.runtime.extension.api.annotation.Export) Type(org.mule.runtime.module.extension.api.loader.java.type.Type) ObjectFieldType(org.mule.metadata.api.model.ObjectFieldType) ArrayType(org.mule.metadata.api.model.ArrayType) IntersectionType(org.mule.metadata.api.model.IntersectionType) MetadataType(org.mule.metadata.api.model.MetadataType) Optional(java.util.Optional) UnionType(org.mule.metadata.api.model.UnionType) ExtensionDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclarer) INITIALIZE(org.mule.runtime.extension.api.loader.DeclarationEnricherPhase.INITIALIZE) ExtensionTypeDescriptorModelProperty(org.mule.runtime.module.extension.internal.loader.java.type.property.ExtensionTypeDescriptorModelProperty) ExtensionDeclarer(org.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclarer)

Example 5 with Type

use of org.mule.runtime.module.extension.api.loader.java.type.Type in project mule by mulesoft.

the class NotificationsDeclarationEnricher method enrich.

@Override
public void enrich(ExtensionLoadingContext extensionLoadingContext) {
    ExtensionDeclaration declaration = extensionLoadingContext.getExtensionDeclarer().getDeclaration();
    Optional<ExtensionTypeDescriptorModelProperty> extensionType = declaration.getModelProperty(ExtensionTypeDescriptorModelProperty.class);
    String extensionNamespace = getExtensionsNamespace(declaration);
    ClassTypeLoader typeLoader = ExtensionsTypeLoaderFactory.getDefault().createTypeLoader();
    if (extensionType.isPresent() && extensionType.get().getType().getDeclaringClass().isPresent()) {
        Type extensionElement = extensionType.get().getType();
        Optional<NotificationActions> annotation = extensionElement.getAnnotation(NotificationActions.class);
        annotation.ifPresent(actionsAnnotation -> {
            NotificationActionDefinition<?>[] actions = (NotificationActionDefinition<?>[]) actionsAnnotation.value().getEnumConstants();
            Map<NotificationActionDefinition, NotificationModel> notificationModels = new HashMap<>();
            stream(actions).forEach(action -> {
                NotificationModel model = new ImmutableNotificationModel(extensionNamespace, ((Enum) action).name(), typeLoader.load(action.getDataType().getType()));
                declaration.addNotificationModel(model);
                notificationModels.put(action, model);
            });
            new IdempotentDeclarationWalker() {

                @Override
                public void onOperation(WithOperationsDeclaration owner, OperationDeclaration declaration) {
                    Optional<ExtensionOperationDescriptorModelProperty> modelProperty = declaration.getModelProperty(ExtensionOperationDescriptorModelProperty.class);
                    if (modelProperty.isPresent()) {
                        MethodElement method = modelProperty.get().getOperationMethod();
                        Optional<Fires> emitsNotifications = getOperationNotificationDeclaration(method, extensionElement);
                        includeNotificationDeclarationIfNeeded(declaration, emitsNotifications);
                    }
                }

                @Override
                public void onSource(SourceDeclaration declaration) {
                    Optional<ExtensionTypeDescriptorModelProperty> modelProperty = declaration.getModelProperty(ExtensionTypeDescriptorModelProperty.class);
                    if (modelProperty.isPresent()) {
                        Type sourceContainer = modelProperty.get().getType();
                        Optional<Fires> emitsNotifications = getNotificationDeclaration(sourceContainer, extensionElement);
                        includeNotificationDeclarationIfNeeded(declaration, emitsNotifications);
                    }
                }

                private Optional<Fires> getOperationNotificationDeclaration(MethodElement operationMethod, Type extensionElement) {
                    Type operationContainer = operationMethod.getEnclosingType();
                    return ofNullable(operationMethod.getAnnotation(Fires.class)).orElse(getNotificationDeclaration(operationContainer, extensionElement));
                }

                private Optional<Fires> getNotificationDeclaration(Type container, Type extensionElement) {
                    return ofNullable(container.getAnnotation(Fires.class).orElseGet(() -> extensionElement.getAnnotation(Fires.class).orElse(null)));
                }

                private void includeNotificationDeclarationIfNeeded(ExecutableComponentDeclaration declaration, Optional<Fires> emitsNotifications) {
                    emitsNotifications.ifPresent(emits -> {
                        Class<? extends NotificationActionProvider>[] providers = emits.value();
                        stream(providers).forEach(provider -> {
                            try {
                                NotificationActionProvider notificationActionProvider = provider.newInstance();
                                notificationActionProvider.getNotificationActions().stream().map(action -> validateEmits(actions, action)).forEach(action -> declaration.addNotificationModel(notificationModels.get(action)));
                            } catch (InstantiationException | IllegalAccessException e) {
                                throw new MuleRuntimeException(createStaticMessage("Could not create NotificationActionProvider of type " + provider.getName()), e);
                            }
                        });
                    });
                }

                private NotificationActionDefinition validateEmits(NotificationActionDefinition[] actions, NotificationActionDefinition action) {
                    Class<?> extensionAction = actions.getClass().getComponentType();
                    if (!action.getClass().equals(extensionAction) && !action.getClass().getSuperclass().equals(extensionAction)) {
                        throw new IllegalModelDefinitionException(format("Invalid EmitsNotification detected, the extension declared" + " firing notifications of %s type, but a notification of %s type has been detected", extensionAction, action.getClass()));
                    } else {
                        return action;
                    }
                }
            }.walk(declaration);
        });
    }
}
Also used : ImmutableNotificationModel(org.mule.runtime.extension.api.model.notification.ImmutableNotificationModel) MuleExtensionUtils.getExtensionsNamespace(org.mule.runtime.module.extension.internal.util.MuleExtensionUtils.getExtensionsNamespace) OperationModel(org.mule.runtime.api.meta.model.operation.OperationModel) NotificationActionProvider(org.mule.runtime.extension.api.annotation.notification.NotificationActionProvider) ExtensionsTypeLoaderFactory(org.mule.runtime.extension.api.declaration.type.ExtensionsTypeLoaderFactory) ExtensionTypeDescriptorModelProperty(org.mule.runtime.module.extension.internal.loader.java.type.property.ExtensionTypeDescriptorModelProperty) OperationDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.OperationDeclaration) NotificationActions(org.mule.runtime.extension.api.annotation.notification.NotificationActions) HashMap(java.util.HashMap) NotificationActionDefinition(org.mule.runtime.extension.api.notification.NotificationActionDefinition) Type(org.mule.runtime.module.extension.api.loader.java.type.Type) SourceModel(org.mule.runtime.api.meta.model.source.SourceModel) WithOperationsDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.WithOperationsDeclaration) MethodElement(org.mule.runtime.module.extension.api.loader.java.type.MethodElement) Map(java.util.Map) NotificationModel(org.mule.runtime.api.meta.model.notification.NotificationModel) ClassTypeLoader(org.mule.metadata.api.ClassTypeLoader) DeclarationEnricher(org.mule.runtime.extension.api.loader.DeclarationEnricher) SourceDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.SourceDeclaration) Optional.ofNullable(java.util.Optional.ofNullable) I18nMessageFactory.createStaticMessage(org.mule.runtime.api.i18n.I18nMessageFactory.createStaticMessage) DeclarationEnricherPhase(org.mule.runtime.extension.api.loader.DeclarationEnricherPhase) ExtensionDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclaration) ExtensionLoadingContext(org.mule.runtime.extension.api.loader.ExtensionLoadingContext) MuleRuntimeException(org.mule.runtime.api.exception.MuleRuntimeException) String.format(java.lang.String.format) ExtensionModel(org.mule.runtime.api.meta.model.ExtensionModel) Fires(org.mule.runtime.extension.api.annotation.notification.Fires) Optional(java.util.Optional) ExecutableComponentDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.ExecutableComponentDeclaration) Arrays.stream(java.util.Arrays.stream) IdempotentDeclarationWalker(org.mule.runtime.extension.api.declaration.fluent.util.IdempotentDeclarationWalker) ExtensionOperationDescriptorModelProperty(org.mule.runtime.module.extension.internal.loader.java.type.property.ExtensionOperationDescriptorModelProperty) INITIALIZE(org.mule.runtime.extension.api.loader.DeclarationEnricherPhase.INITIALIZE) IllegalModelDefinitionException(org.mule.runtime.extension.api.exception.IllegalModelDefinitionException) NotificationActionProvider(org.mule.runtime.extension.api.annotation.notification.NotificationActionProvider) ExtensionOperationDescriptorModelProperty(org.mule.runtime.module.extension.internal.loader.java.type.property.ExtensionOperationDescriptorModelProperty) HashMap(java.util.HashMap) MethodElement(org.mule.runtime.module.extension.api.loader.java.type.MethodElement) ImmutableNotificationModel(org.mule.runtime.extension.api.model.notification.ImmutableNotificationModel) NotificationModel(org.mule.runtime.api.meta.model.notification.NotificationModel) OperationDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.OperationDeclaration) NotificationActions(org.mule.runtime.extension.api.annotation.notification.NotificationActions) IllegalModelDefinitionException(org.mule.runtime.extension.api.exception.IllegalModelDefinitionException) ClassTypeLoader(org.mule.metadata.api.ClassTypeLoader) Fires(org.mule.runtime.extension.api.annotation.notification.Fires) ExecutableComponentDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.ExecutableComponentDeclaration) ImmutableNotificationModel(org.mule.runtime.extension.api.model.notification.ImmutableNotificationModel) SourceDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.SourceDeclaration) Optional(java.util.Optional) ExtensionTypeDescriptorModelProperty(org.mule.runtime.module.extension.internal.loader.java.type.property.ExtensionTypeDescriptorModelProperty) NotificationActionDefinition(org.mule.runtime.extension.api.notification.NotificationActionDefinition) ExtensionDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.ExtensionDeclaration) WithOperationsDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.WithOperationsDeclaration) Type(org.mule.runtime.module.extension.api.loader.java.type.Type) MuleRuntimeException(org.mule.runtime.api.exception.MuleRuntimeException) IdempotentDeclarationWalker(org.mule.runtime.extension.api.declaration.fluent.util.IdempotentDeclarationWalker)

Aggregations

Type (org.mule.runtime.module.extension.api.loader.java.type.Type)26 MetadataType (org.mule.metadata.api.model.MetadataType)20 ObjectType (org.mule.metadata.api.model.ObjectType)16 ArrayType (org.mule.metadata.api.model.ArrayType)15 AnyType (org.mule.metadata.api.model.AnyType)13 StringType (org.mule.metadata.api.model.StringType)11 VoidType (org.mule.metadata.api.model.VoidType)11 DataType (org.mule.runtime.api.metadata.DataType)11 ResolvableType (org.springframework.core.ResolvableType)11 ObjectFieldType (org.mule.metadata.api.model.ObjectFieldType)9 TypeGeneric (org.mule.runtime.module.extension.api.loader.java.type.TypeGeneric)9 ExtensionTypeDescriptorModelProperty (org.mule.runtime.module.extension.internal.loader.java.type.property.ExtensionTypeDescriptorModelProperty)9 ParameterizedType (java.lang.reflect.ParameterizedType)8 Optional (java.util.Optional)8 DeclaredType (javax.lang.model.type.DeclaredType)8 MetadataTypeUtils.isObjectType (org.mule.metadata.api.utils.MetadataTypeUtils.isObjectType)8 IllegalModelDefinitionException (org.mule.runtime.extension.api.exception.IllegalModelDefinitionException)8 String.format (java.lang.String.format)7 Field (java.lang.reflect.Field)6 Map (java.util.Map)6