Search in sources :

Example 36 with ObjectType

use of org.mule.metadata.api.model.ObjectType in project mule by mulesoft.

the class XmlExtensionLoaderTestCase method testModuleJsonCustomTypes.

@Test
public void testModuleJsonCustomTypes() throws IOException {
    String modulePath = "modules/module-json-custom-types.xml";
    ExtensionModel extensionModel = getExtensionModelFrom(modulePath);
    assertThat(extensionModel.getName(), is("module-json-custom-types"));
    assertThat(extensionModel.getConfigurationModels().size(), is(0));
    assertThat(extensionModel.getModelProperty(GlobalElementComponentModelModelProperty.class).isPresent(), is(false));
    assertThat(extensionModel.getOperationModels().size(), is(8));
    Optional<OperationModel> operationModel = extensionModel.getOperationModel("operation-with-custom-types");
    assertThat(operationModel.isPresent(), is(true));
    final OperationModel operation = operationModel.get();
    assertThat(operation.getAllParameterModels().size(), is(3));
    final ParameterModel parameterValueModel = operation.getAllParameterModels().get(0);
    assertThat(parameterValueModel.getName(), is("value"));
    assertThat(operation.getAllParameterModels().get(1).getName(), is(TARGET_PARAMETER_NAME));
    assertThat(operation.getAllParameterModels().get(2).getName(), is(TARGET_VALUE_PARAMETER_NAME));
    assertThat(parameterValueModel.getType().getMetadataFormat(), is(MetadataFormat.JSON));
    assertThat(parameterValueModel.getType(), instanceOf(ObjectType.class));
    assertThat(((ObjectType) parameterValueModel.getType()).getFields().size(), is(2));
    assertThat(operation.getOutput().getType().getMetadataFormat(), is(MetadataFormat.JSON));
    assertThat(operation.getOutput().getType(), instanceOf(ObjectType.class));
    assertThat(((ObjectType) operation.getOutput().getType()).getFields().size(), is(3));
    Optional<OperationComponentModelModelProperty> modelProperty = operation.getModelProperty(OperationComponentModelModelProperty.class);
    assertThat(modelProperty.isPresent(), is(true));
    assertThat(modelProperty.get().getBodyComponentModel().getInnerComponents().size(), is(1));
}
Also used : ObjectType(org.mule.metadata.api.model.ObjectType) ParameterModel(org.mule.runtime.api.meta.model.parameter.ParameterModel) ExtensionModel(org.mule.runtime.api.meta.model.ExtensionModel) Matchers.containsString(org.hamcrest.Matchers.containsString) OperationComponentModelModelProperty(org.mule.runtime.config.internal.dsl.model.extension.xml.property.OperationComponentModelModelProperty) OperationModel(org.mule.runtime.api.meta.model.operation.OperationModel) Test(org.junit.Test)

Example 37 with ObjectType

use of org.mule.metadata.api.model.ObjectType in project mule by mulesoft.

the class IntrospectionUtilsTestCase method assertDictionary.

private void assertDictionary(MetadataType metadataType, Class<?> valueType) {
    assertThat(metadataType, is(instanceOf(ObjectType.class)));
    ObjectType dictionaryType = (ObjectType) metadataType;
    assertType(dictionaryType, Map.class);
    assertThat(dictionaryType.getOpenRestriction().isPresent(), is(true));
    assertType(dictionaryType.getOpenRestriction().get(), valueType);
}
Also used : ObjectType(org.mule.metadata.api.model.ObjectType)

Example 38 with ObjectType

use of org.mule.metadata.api.model.ObjectType in project mule by mulesoft.

the class InfrastructureElementModelDelegate method createReconnectionConfig.

private void createReconnectionConfig(ParameterValue value, ParameterModel parameterModel, DslElementSyntax paramDsl, InternalComponentConfiguration.Builder parentConfig, DslElementModel.Builder parentElement) {
    InternalComponentConfiguration.Builder config = InternalComponentConfiguration.builder().withIdentifier(builder().namespace(CORE_PREFIX).name(RECONNECTION_CONFIG_PARAMETER_NAME).build());
    final DslElementModel.Builder<Object> elementBuilder = DslElementModel.builder().withModel(parameterModel).withDsl(paramDsl);
    ((ParameterObjectValue) value).getParameters().forEach((name, fieldValue) -> fieldValue.accept(new ParameterValueVisitor() {

        @Override
        public void visitSimpleValue(ParameterSimpleValue text) {
            config.withParameter(name, text.getValue());
        }

        @Override
        public void visitObjectValue(ParameterObjectValue objectValue) {
            if (name.equals(RECONNECTION_STRATEGY_PARAMETER_NAME)) {
                createReconnectionStrategy(fieldValue, ((ObjectType) parameterModel.getType()).getFieldByName(RECONNECTION_STRATEGY_PARAMETER_NAME).get(), paramDsl.getContainedElement(RECONNECTION_STRATEGY_PARAMETER_NAME).get(), config, elementBuilder);
            }
        }
    }));
    final ComponentConfiguration result = config.build();
    parentConfig.withNestedComponent(result);
    parentElement.containing(elementBuilder.withConfig(result).build());
}
Also used : ComponentConfiguration(org.mule.runtime.dsl.api.component.config.ComponentConfiguration) InternalComponentConfiguration(org.mule.runtime.dsl.internal.component.config.InternalComponentConfiguration) ObjectType(org.mule.metadata.api.model.ObjectType) ParameterValueVisitor(org.mule.runtime.app.declaration.api.ParameterValueVisitor) ParameterSimpleValue(org.mule.runtime.app.declaration.api.fluent.ParameterSimpleValue) ParameterObjectValue(org.mule.runtime.app.declaration.api.fluent.ParameterObjectValue) DslElementModel(org.mule.runtime.config.api.dsl.model.DslElementModel) InternalComponentConfiguration(org.mule.runtime.dsl.internal.component.config.InternalComponentConfiguration)

Example 39 with ObjectType

use of org.mule.metadata.api.model.ObjectType in project mule by mulesoft.

the class ConfigurationBasedElementModelFactory method addElementParameter.

private void addElementParameter(Multimap<ComponentIdentifier, ComponentConfiguration> innerComponents, Map<String, String> parameters, DslElementSyntax groupDsl, DslElementModel.Builder<ParameterGroupModel> groupElementBuilder, ParameterModel paramModel) {
    groupDsl.getContainedElement(paramModel.getName()).ifPresent(paramDsl -> {
        if (isInfrastructure(paramModel)) {
            handleInfrastructure(paramModel, paramDsl, innerComponents, parameters, groupElementBuilder);
            return;
        }
        ComponentConfiguration paramComponent = getSingleComponentConfiguration(innerComponents, getIdentifier(paramDsl));
        if (paramDsl.isWrapped()) {
            resolveWrappedElement(groupElementBuilder, paramModel, paramDsl, paramComponent);
            return;
        }
        String value = paramDsl.supportsAttributeDeclaration() ? parameters.get(paramDsl.getAttributeName()) : null;
        Optional<String> defaultValue = getDefaultValue(paramModel);
        if (paramComponent != null || !isBlank(value) || defaultValue.isPresent()) {
            DslElementModel.Builder<ParameterModel> paramElementBuilder = DslElementModel.<ParameterModel>builder().withModel(paramModel).withDsl(paramDsl);
            if (paramComponent != null && !isContent(paramModel)) {
                paramElementBuilder.withConfig(paramComponent);
                paramModel.getType().accept(new MetadataTypeVisitor() {

                    @Override
                    public void visitArrayType(ArrayType arrayType) {
                        MetadataType itemType = arrayType.getType();
                        paramDsl.getGeneric(itemType).ifPresent(itemdsl -> {
                            ComponentIdentifier itemIdentifier = getIdentifier(itemdsl).get();
                            paramComponent.getNestedComponents().forEach(c -> {
                                if (c.getIdentifier().equals(itemIdentifier)) {
                                    itemType.accept(getComponentChildVisitor(paramElementBuilder, c, itemType, VALUE_ATTRIBUTE_NAME, itemdsl, defaultValue, new ArrayDeque<>()));
                                }
                            });
                        });
                    }

                    @Override
                    public void visitObject(ObjectType objectType) {
                        if (isMap(objectType)) {
                            populateMapEntries(objectType, paramDsl, paramElementBuilder, paramComponent);
                            return;
                        }
                        populateObjectFields(objectType, paramComponent, paramDsl, paramElementBuilder, new ArrayDeque<>());
                    }
                });
            } else {
                if (isBlank(value)) {
                    if (paramComponent != null && paramComponent.getValue().isPresent() && !isBlank(paramComponent.getValue().get())) {
                        value = paramComponent.getValue().get().trim();
                    } else if (defaultValue.isPresent()) {
                        value = defaultValue.get();
                        paramElementBuilder.isExplicitInDsl(false);
                    }
                }
                paramElementBuilder.withValue(value);
            }
            groupElementBuilder.containing(paramElementBuilder.build());
        }
    });
}
Also used : ArrayListMultimap(com.google.common.collect.ArrayListMultimap) ExtensionMetadataTypeUtils.getId(org.mule.runtime.extension.api.util.ExtensionMetadataTypeUtils.getId) RECONNECT_FOREVER_ELEMENT_IDENTIFIER(org.mule.runtime.internal.dsl.DslConstants.RECONNECT_FOREVER_ELEMENT_IDENTIFIER) OperationModel(org.mule.runtime.api.meta.model.operation.OperationModel) CORE_PREFIX(org.mule.runtime.internal.dsl.DslConstants.CORE_PREFIX) Optional.of(java.util.Optional.of) TLS_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.TLS_PARAMETER_NAME) FlattenedTypeAnnotation(org.mule.runtime.extension.api.declaration.type.annotation.FlattenedTypeAnnotation) ComposableModel(org.mule.runtime.api.meta.model.ComposableModel) EXPIRATION_POLICY_ELEMENT_IDENTIFIER(org.mule.runtime.internal.dsl.DslConstants.EXPIRATION_POLICY_ELEMENT_IDENTIFIER) SourceModel(org.mule.runtime.api.meta.model.source.SourceModel) REDELIVERY_POLICY_ELEMENT_IDENTIFIER(org.mule.runtime.internal.dsl.DslConstants.REDELIVERY_POLICY_ELEMENT_IDENTIFIER) ArrayType(org.mule.metadata.api.model.ArrayType) KEY_ATTRIBUTE_NAME(org.mule.runtime.internal.dsl.DslConstants.KEY_ATTRIBUTE_NAME) Map(java.util.Map) Sets.newHashSet(com.google.common.collect.Sets.newHashSet) REPEATABLE_IN_MEMORY_BYTES_STREAM_ALIAS(org.mule.runtime.extension.api.declaration.type.StreamingStrategyTypeBuilder.REPEATABLE_IN_MEMORY_BYTES_STREAM_ALIAS) ParameterGroupModel(org.mule.runtime.api.meta.model.parameter.ParameterGroupModel) ClassTypeLoader(org.mule.metadata.api.ClassTypeLoader) REDELIVERY_POLICY_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.REDELIVERY_POLICY_PARAMETER_NAME) ConstructModel(org.mule.runtime.api.meta.model.construct.ConstructModel) DslElementModelFactory(org.mule.runtime.config.api.dsl.model.DslElementModelFactory) MetadataTypeUtils.getLocalPart(org.mule.metadata.api.utils.MetadataTypeUtils.getLocalPart) NestableElementModel(org.mule.runtime.api.meta.model.nested.NestableElementModel) ExtensionModelUtils.isContent(org.mule.runtime.extension.api.util.ExtensionModelUtils.isContent) RECONNECT_ELEMENT_IDENTIFIER(org.mule.runtime.internal.dsl.DslConstants.RECONNECT_ELEMENT_IDENTIFIER) ExtensionMetadataTypeUtils.isMap(org.mule.runtime.extension.api.util.ExtensionMetadataTypeUtils.isMap) SCHEDULING_STRATEGY_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.SCHEDULING_STRATEGY_PARAMETER_NAME) ObjectType(org.mule.metadata.api.model.ObjectType) RECONNECTION_STRATEGY_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.RECONNECTION_STRATEGY_PARAMETER_NAME) Set(java.util.Set) ExtensionModelUtils.isText(org.mule.runtime.extension.api.util.ExtensionModelUtils.isText) InternalComponentConfiguration(org.mule.runtime.dsl.internal.component.config.InternalComponentConfiguration) POOLING_PROFILE_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.POOLING_PROFILE_PARAMETER_NAME) MetadataTypeVisitor(org.mule.metadata.api.visitor.MetadataTypeVisitor) Objects(java.util.Objects) NestedRouteModel(org.mule.runtime.api.meta.model.nested.NestedRouteModel) List(java.util.List) StringUtils.isNotBlank(org.apache.commons.lang3.StringUtils.isNotBlank) NON_REPEATABLE_BYTE_STREAM_ALIAS(org.mule.runtime.extension.api.declaration.type.StreamingStrategyTypeBuilder.NON_REPEATABLE_BYTE_STREAM_ALIAS) HasOperationModels(org.mule.runtime.api.meta.model.operation.HasOperationModels) DslElementSyntax(org.mule.runtime.extension.api.dsl.syntax.DslElementSyntax) REPEATABLE_FILE_STORE_OBJECTS_STREAM_ALIAS(org.mule.runtime.extension.api.declaration.type.StreamingStrategyTypeBuilder.REPEATABLE_FILE_STORE_OBJECTS_STREAM_ALIAS) ExtensionModelUtils.isInfrastructure(org.mule.runtime.extension.api.util.ExtensionModelUtils.isInfrastructure) MetadataType(org.mule.metadata.api.model.MetadataType) DslSyntaxResolver(org.mule.runtime.extension.api.dsl.syntax.resolver.DslSyntaxResolver) Optional(java.util.Optional) EE_PREFIX(org.mule.runtime.internal.dsl.DslConstants.EE_PREFIX) ComponentIdentifier.builder(org.mule.runtime.api.component.ComponentIdentifier.builder) NON_REPEATABLE_OBJECTS_STREAM_ALIAS(org.mule.runtime.extension.api.declaration.type.StreamingStrategyTypeBuilder.NON_REPEATABLE_OBJECTS_STREAM_ALIAS) ExtensionModelUtils.isRequired(org.mule.runtime.extension.api.util.ExtensionModelUtils.isRequired) Optional.empty(java.util.Optional.empty) ParameterModel(org.mule.runtime.api.meta.model.parameter.ParameterModel) CronScheduler(org.mule.runtime.core.api.source.scheduler.CronScheduler) CRON_STRATEGY_ELEMENT_IDENTIFIER(org.mule.runtime.internal.dsl.DslConstants.CRON_STRATEGY_ELEMENT_IDENTIFIER) REPEATABLE_IN_MEMORY_OBJECTS_STREAM_ALIAS(org.mule.runtime.extension.api.declaration.type.StreamingStrategyTypeBuilder.REPEATABLE_IN_MEMORY_OBJECTS_STREAM_ALIAS) HasConstructModels(org.mule.runtime.api.meta.model.construct.HasConstructModels) ExtensionsTypeLoaderFactory(org.mule.runtime.extension.api.declaration.type.ExtensionsTypeLoaderFactory) REPEATABLE_FILE_STORE_BYTES_STREAM_ALIAS(org.mule.runtime.extension.api.declaration.type.StreamingStrategyTypeBuilder.REPEATABLE_FILE_STORE_BYTES_STREAM_ALIAS) VALUE_ATTRIBUTE_NAME(org.mule.runtime.internal.dsl.DslConstants.VALUE_ATTRIBUTE_NAME) ComponentConfiguration(org.mule.runtime.dsl.api.component.config.ComponentConfiguration) Multimap(com.google.common.collect.Multimap) Deque(java.util.Deque) EXPIRATION_POLICY_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.EXPIRATION_POLICY_PARAMETER_NAME) ExtensionModelUtils.getDefaultValue(org.mule.runtime.extension.api.util.ExtensionModelUtils.getDefaultValue) Stream.concat(java.util.stream.Stream.concat) ParameterizedModel(org.mule.runtime.api.meta.model.parameter.ParameterizedModel) Iterator(java.util.Iterator) ConfigurationModel(org.mule.runtime.api.meta.model.config.ConfigurationModel) RECONNECTION_CONFIG_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.RECONNECTION_CONFIG_PARAMETER_NAME) FixedFrequencyScheduler(org.mule.runtime.core.api.source.scheduler.FixedFrequencyScheduler) ExtensionModel(org.mule.runtime.api.meta.model.ExtensionModel) DslElementModel(org.mule.runtime.config.api.dsl.model.DslElementModel) Collectors.toList(java.util.stream.Collectors.toList) STREAMING_STRATEGY_PARAMETER_NAME(org.mule.runtime.extension.api.ExtensionConstants.STREAMING_STRATEGY_PARAMETER_NAME) StringUtils.isBlank(org.apache.commons.lang3.StringUtils.isBlank) ExtensionWalker(org.mule.runtime.api.meta.model.util.ExtensionWalker) Reference(org.mule.runtime.api.util.Reference) SCHEDULING_STRATEGY_ELEMENT_IDENTIFIER(org.mule.runtime.internal.dsl.DslConstants.SCHEDULING_STRATEGY_ELEMENT_IDENTIFIER) ComponentIdentifier(org.mule.runtime.api.component.ComponentIdentifier) ArrayDeque(java.util.ArrayDeque) HasSourceModels(org.mule.runtime.api.meta.model.source.HasSourceModels) MetadataType(org.mule.metadata.api.model.MetadataType) ComponentIdentifier(org.mule.runtime.api.component.ComponentIdentifier) MetadataTypeVisitor(org.mule.metadata.api.visitor.MetadataTypeVisitor) ArrayDeque(java.util.ArrayDeque) InternalComponentConfiguration(org.mule.runtime.dsl.internal.component.config.InternalComponentConfiguration) ComponentConfiguration(org.mule.runtime.dsl.api.component.config.ComponentConfiguration) ArrayType(org.mule.metadata.api.model.ArrayType) ObjectType(org.mule.metadata.api.model.ObjectType) ParameterModel(org.mule.runtime.api.meta.model.parameter.ParameterModel) DslElementModel(org.mule.runtime.config.api.dsl.model.DslElementModel)

Example 40 with ObjectType

use of org.mule.metadata.api.model.ObjectType in project mule by mulesoft.

the class IntrospectionUtils method collectRelativeClasses.

/**
 * Given a {@link MetadataType} it adds all the {@link Class} that are related from that type. This includes generics of an
 * {@link ArrayType}, open restriction of an {@link ObjectType} as well as its fields.
 *
 * @param type {@link MetadataType} to inspect
 * @param extensionClassLoader extension class loader
 * @return {@link Set<Class<?>>} with the classes reachable from the {@code type}
 */
public static Set<Class<?>> collectRelativeClasses(MetadataType type, ClassLoader extensionClassLoader) {
    Set<Class<?>> relativeClasses = new HashSet<>();
    type.accept(new MetadataTypeVisitor() {

        @Override
        public void visitArrayType(ArrayType arrayType) {
            arrayType.getType().accept(this);
        }

        @Override
        public void visitObjectField(ObjectFieldType objectFieldType) {
            objectFieldType.getValue().accept(this);
        }

        @Override
        public void visitObject(ObjectType objectType) {
            if (objectType.getMetadataFormat() != JAVA) {
                return;
            }
            final Class<Object> clazz = getType(objectType).orElse(null);
            if (clazz == null || relativeClasses.contains(clazz)) {
                return;
            }
            Optional<ClassInformationAnnotation> classInformation = objectType.getAnnotation(ClassInformationAnnotation.class);
            if (classInformation.isPresent()) {
                classInformation.get().getGenericTypes().forEach(generic -> relativeClasses.add(loadClass(generic, extensionClassLoader)));
            }
            relativeClasses.add(clazz);
            objectType.getFields().stream().forEach(objectFieldType -> objectFieldType.accept(this));
            objectType.getOpenRestriction().ifPresent(t -> t.accept(this));
        }

        @Override
        public void visitString(StringType stringType) {
            if (stringType.getMetadataFormat() == JAVA && isEnum(stringType)) {
                getType(stringType).ifPresent(relativeClasses::add);
            }
        }
    });
    return relativeClasses;
}
Also used : ArrayType(org.mule.metadata.api.model.ArrayType) FieldElement(org.mule.runtime.module.extension.api.loader.java.type.FieldElement) READ_ONLY(org.mule.runtime.module.extension.api.loader.java.type.PropertyElement.Accessibility.READ_ONLY) ParameterDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.ParameterDeclaration) Message(org.mule.runtime.api.message.Message) Optional.of(java.util.Optional.of) RequireNameField(org.mule.runtime.module.extension.internal.loader.java.property.RequireNameField) ImplementingParameterModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.ImplementingParameterModelProperty) TypeElement(javax.lang.model.element.TypeElement) ClassUtils(org.mule.runtime.core.api.util.ClassUtils) DeclaringMemberModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.DeclaringMemberModelProperty) ArrayUtils.isEmpty(org.apache.commons.lang3.ArrayUtils.isEmpty) Type(org.mule.runtime.module.extension.api.loader.java.type.Type) ArrayType(org.mule.metadata.api.model.ArrayType) Arrays.asList(java.util.Arrays.asList) Map(java.util.Map) Objects.isNull(java.util.Objects.isNull) LiteralTypeAnnotation(org.mule.runtime.extension.api.declaration.type.annotation.LiteralTypeAnnotation) ClassTypeLoader(org.mule.metadata.api.ClassTypeLoader) ModelProperty(org.mule.runtime.api.meta.model.ModelProperty) Startable(org.mule.runtime.api.lifecycle.Startable) Collectors.toImmutableList(org.mule.runtime.api.util.collection.Collectors.toImmutableList) ObjectType(org.mule.metadata.api.model.ObjectType) ConnectionProvider(org.mule.runtime.api.connection.ConnectionProvider) Member(java.lang.reflect.Member) Set(java.util.Set) ParameterResolverTypeAnnotation(org.mule.runtime.extension.api.declaration.type.annotation.ParameterResolverTypeAnnotation) Element(javax.lang.model.element.Element) JavaTypeUtils.getId(org.mule.metadata.java.api.utils.JavaTypeUtils.getId) MetadataTypeVisitor(org.mule.metadata.api.visitor.MetadataTypeVisitor) IntrospectionException(java.beans.IntrospectionException) BaseTypeBuilder.create(org.mule.metadata.api.builder.BaseTypeBuilder.create) IllegalConfigurationModelDefinitionException(org.mule.runtime.extension.api.exception.IllegalConfigurationModelDefinitionException) ObjectFieldType(org.mule.metadata.api.model.ObjectFieldType) StringType(org.mule.metadata.api.model.StringType) ParameterResolver(org.mule.runtime.extension.api.runtime.parameter.ParameterResolver) Stream(java.util.stream.Stream) PropertyDescriptor(java.beans.PropertyDescriptor) MetadataType(org.mule.metadata.api.model.MetadataType) InjectedFieldModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.InjectedFieldModelProperty) Expression(org.mule.runtime.extension.api.annotation.Expression) AnnotatedElement(java.lang.reflect.AnnotatedElement) Optional.empty(java.util.Optional.empty) MetadataTypeUtils.isObjectType(org.mule.metadata.api.utils.MetadataTypeUtils.isObjectType) AnyType(org.mule.metadata.api.model.AnyType) ConnectionProviderModel(org.mule.runtime.api.meta.model.connection.ConnectionProviderModel) VariableElement(javax.lang.model.element.VariableElement) Preconditions.checkArgument(org.mule.runtime.api.util.Preconditions.checkArgument) Modifier.isStatic(java.lang.reflect.Modifier.isStatic) Supplier(java.util.function.Supplier) BaseTypeBuilder(org.mule.metadata.api.builder.BaseTypeBuilder) ArrayList(java.util.ArrayList) Introspector(java.beans.Introspector) DeclaredType(javax.lang.model.type.DeclaredType) ParameterGroup(org.mule.runtime.extension.api.annotation.param.ParameterGroup) LinkedHashSet(java.util.LinkedHashSet) Disposable(org.mule.runtime.api.lifecycle.Disposable) ParameterizedModel(org.mule.runtime.api.meta.model.parameter.ParameterizedModel) DataType(org.mule.runtime.api.metadata.DataType) Field(java.lang.reflect.Field) ExtensionModel(org.mule.runtime.api.meta.model.ExtensionModel) TypedValue(org.mule.runtime.api.metadata.TypedValue) ExtensionMetadataTypeUtils.getType(org.mule.runtime.extension.api.util.ExtensionMetadataTypeUtils.getType) Modifier.isPublic(java.lang.reflect.Modifier.isPublic) ParameterizedType(java.lang.reflect.ParameterizedType) Stoppable(org.mule.runtime.api.lifecycle.Stoppable) ExtensionWalker(org.mule.runtime.api.meta.model.util.ExtensionWalker) Reference(org.mule.runtime.api.util.Reference) RefName(org.mule.runtime.extension.api.annotation.param.RefName) CollectionUtils.isEmpty(org.apache.commons.collections.CollectionUtils.isEmpty) ReflectionUtils(org.reflections.ReflectionUtils) ReflectionUtils.getAllFields(org.reflections.ReflectionUtils.getAllFields) SubTypesModel(org.mule.runtime.api.meta.model.SubTypesModel) HasOutputModel(org.mule.runtime.api.meta.model.HasOutputModel) TargetModelProperty(org.mule.runtime.extension.internal.property.TargetModelProperty) NamedObject(org.mule.runtime.api.meta.NamedObject) Source(org.mule.runtime.extension.api.runtime.source.Source) VoidType(org.mule.metadata.api.model.VoidType) MetadataTypeUtils.isEnum(org.mule.metadata.api.utils.MetadataTypeUtils.isEnum) DefaultEncodingModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.DefaultEncodingModelProperty) ParameterGroupModel(org.mule.runtime.api.meta.model.parameter.ParameterGroupModel) SUPPORTED(org.mule.runtime.api.meta.ExpressionSupport.SUPPORTED) ResolvableType(org.springframework.core.ResolvableType) Pair(org.mule.runtime.api.util.Pair) Method(java.lang.reflect.Method) Collectors.toSet(java.util.stream.Collectors.toSet) Collections.reverse(java.util.Collections.reverse) Collections.emptyList(java.util.Collections.emptyList) Collection(java.util.Collection) ClassInformationAnnotation(org.mule.metadata.java.api.annotation.ClassInformationAnnotation) Types(javax.lang.model.util.Types) String.format(java.lang.String.format) List(java.util.List) Modifier(java.lang.reflect.Modifier) Annotation(java.lang.annotation.Annotation) Optional(java.util.Optional) TypeVariable(javax.lang.model.type.TypeVariable) EnrichableModel(org.mule.runtime.api.meta.model.EnrichableModel) Arrays.stream(java.util.Arrays.stream) IllegalModelDefinitionException(org.mule.runtime.extension.api.exception.IllegalModelDefinitionException) MessageMetadataTypeBuilder(org.mule.metadata.message.api.MessageMetadataTypeBuilder) ParameterModel(org.mule.runtime.api.meta.model.parameter.ParameterModel) Alias(org.mule.runtime.extension.api.annotation.Alias) TypeGeneric(org.mule.runtime.module.extension.api.loader.java.type.TypeGeneric) ComponentModel(org.mule.runtime.api.meta.model.ComponentModel) JAVA(org.mule.metadata.api.model.MetadataFormat.JAVA) MetadataKeyId(org.mule.runtime.extension.api.annotation.metadata.MetadataKeyId) Ignore(org.mule.runtime.extension.api.annotation.Ignore) HashSet(java.util.HashSet) Collectors.toCollection(java.util.stream.Collectors.toCollection) MethodElement(org.mule.runtime.module.extension.api.loader.java.type.MethodElement) ImmutableList(com.google.common.collect.ImmutableList) Literal(org.mule.runtime.extension.api.runtime.parameter.Literal) ParameterGroupModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.ParameterGroupModelProperty) LinkedList(java.util.LinkedList) Parameter(org.mule.runtime.extension.api.annotation.param.Parameter) TypedValueTypeAnnotation(org.mule.runtime.extension.api.declaration.type.annotation.TypedValueTypeAnnotation) AccessibleObject(java.lang.reflect.AccessibleObject) Iterator(java.util.Iterator) ElementKind(javax.lang.model.element.ElementKind) PUBLIC(javax.lang.model.element.Modifier.PUBLIC) ExpressionSupport(org.mule.runtime.api.meta.ExpressionSupport) ExecutableElement(javax.lang.model.element.ExecutableElement) READ_WRITE(org.mule.runtime.module.extension.api.loader.java.type.PropertyElement.Accessibility.READ_WRITE) Initialisable(org.mule.runtime.api.lifecycle.Initialisable) Result(org.mule.runtime.extension.api.runtime.operation.Result) DefaultEncoding(org.mule.runtime.extension.api.annotation.param.DefaultEncoding) Collectors.toList(java.util.stream.Collectors.toList) TypeMirror(javax.lang.model.type.TypeMirror) BaseDeclaration(org.mule.runtime.api.meta.model.declaration.fluent.BaseDeclaration) METHOD(javax.lang.model.element.ElementKind.METHOD) PagingProvider(org.mule.runtime.extension.api.runtime.streaming.PagingProvider) ProcessingEnvironment(javax.annotation.processing.ProcessingEnvironment) ComponentLocation(org.mule.runtime.api.component.location.ComponentLocation) MuleExtensionAnnotationParser(org.mule.runtime.module.extension.internal.loader.java.MuleExtensionAnnotationParser) ImplementingTypeModelProperty(org.mule.runtime.module.extension.internal.loader.java.property.ImplementingTypeModelProperty) ObjectType(org.mule.metadata.api.model.ObjectType) MetadataTypeUtils.isObjectType(org.mule.metadata.api.utils.MetadataTypeUtils.isObjectType) Optional(java.util.Optional) StringType(org.mule.metadata.api.model.StringType) ObjectFieldType(org.mule.metadata.api.model.ObjectFieldType) MetadataTypeVisitor(org.mule.metadata.api.visitor.MetadataTypeVisitor) ClassInformationAnnotation(org.mule.metadata.java.api.annotation.ClassInformationAnnotation) LinkedHashSet(java.util.LinkedHashSet) HashSet(java.util.HashSet)

Aggregations

ObjectType (org.mule.metadata.api.model.ObjectType)44 MetadataType (org.mule.metadata.api.model.MetadataType)32 MetadataTypeVisitor (org.mule.metadata.api.visitor.MetadataTypeVisitor)21 ArrayType (org.mule.metadata.api.model.ArrayType)19 Optional (java.util.Optional)17 ExtensionModel (org.mule.runtime.api.meta.model.ExtensionModel)17 Reference (org.mule.runtime.api.util.Reference)17 ParameterModel (org.mule.runtime.api.meta.model.parameter.ParameterModel)16 List (java.util.List)15 String.format (java.lang.String.format)14 ClassTypeLoader (org.mule.metadata.api.ClassTypeLoader)14 ObjectFieldType (org.mule.metadata.api.model.ObjectFieldType)14 ParameterGroupModel (org.mule.runtime.api.meta.model.parameter.ParameterGroupModel)14 Set (java.util.Set)13 ParameterizedModel (org.mule.runtime.api.meta.model.parameter.ParameterizedModel)13 Map (java.util.Map)12 DslElementSyntax (org.mule.runtime.extension.api.dsl.syntax.DslElementSyntax)12 Collectors.toList (java.util.stream.Collectors.toList)11 HashSet (java.util.HashSet)10 ExtensionsTypeLoaderFactory (org.mule.runtime.extension.api.declaration.type.ExtensionsTypeLoaderFactory)10