Skip to content

Commit

Permalink
Avoid using mule infrastructure typeId as className
Browse files Browse the repository at this point in the history
  • Loading branch information
elrodro83 committed Dec 4, 2023
1 parent ef9680b commit ee676a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
import static org.mule.runtime.extension.api.ExtensionConstants.TARGET_VALUE_PARAMETER_NAME;
import static org.mule.runtime.extension.api.annotation.param.Optional.PAYLOAD;
import static org.mule.runtime.extension.api.annotation.param.display.Placement.ADVANCED_TAB;
import static org.mule.runtime.extension.api.declaration.type.TypeUtils.MULE_INFRASTRUCTURE_FORMAT;
import static org.mule.runtime.extension.api.error.ErrorConstants.ERROR;
import static org.mule.runtime.extension.api.error.ErrorConstants.ERROR_TYPE_DEFINITION;
import static org.mule.runtime.extension.api.error.ErrorConstants.ERROR_TYPE_MATCHER;
Expand Down Expand Up @@ -761,7 +762,7 @@ private void declareScatterGather(ExtensionDeclarer extensionDeclarer, ClassType
.withOptionalParameter("collectList")
.withRole(BEHAVIOUR)
.withExpressionSupport(NOT_SUPPORTED)
.ofType(BaseTypeBuilder.create(JAVA).objectType()
.ofType(BaseTypeBuilder.create(MULE_INFRASTRUCTURE_FORMAT).objectType()
.id("CollectList")
.with(new TypeDslAnnotation(true, false, null, null))
.build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
*/
package org.mule.runtime.core.api.extension.provider;

import static java.lang.String.format;
import static org.mule.metadata.api.model.MetadataFormat.JAVA;
import static org.mule.metadata.catalog.api.PrimitiveTypesTypeLoader.ANY;
import static org.mule.metadata.catalog.api.PrimitiveTypesTypeLoader.BOOLEAN;
import static org.mule.metadata.catalog.api.PrimitiveTypesTypeLoader.NUMBER;
import static org.mule.metadata.catalog.api.PrimitiveTypesTypeLoader.PRIMITIVE_TYPES;
import static org.mule.metadata.catalog.api.PrimitiveTypesTypeLoader.STRING;
import static org.mule.runtime.api.util.MuleSystemProperties.FORCE_EXTENSION_VALIDATION_PROPERTY_NAME;
import static org.mule.runtime.extension.api.declaration.type.TypeUtils.MULE_INFRASTRUCTURE_FORMAT;
import static org.mule.runtime.internal.dsl.DslConstants.CORE_PREFIX;
import static org.mule.runtime.internal.dsl.DslConstants.DEFAULT_NAMESPACE_URI_MASK;

import static java.lang.String.format;

import org.mule.metadata.api.ClassTypeLoader;
import org.mule.metadata.api.builder.BaseTypeBuilder;
import org.mule.metadata.api.model.MetadataType;
Expand Down Expand Up @@ -54,7 +54,7 @@ public final class MuleExtensionModelProvider {
public static final ClassTypeLoader TYPE_LOADER = ExtensionsTypeLoaderFactory.getDefault()
.createTypeLoader(MuleExtensionModelProvider.class.getClassLoader());

public static final BaseTypeBuilder BASE_TYPE_BUILDER = BaseTypeBuilder.create(JAVA);
public static final BaseTypeBuilder BASE_TYPE_BUILDER = BaseTypeBuilder.create(MULE_INFRASTRUCTURE_FORMAT);
public static final MetadataType STRING_TYPE = loadPrimitive(STRING);
public static final MetadataType INTEGER_TYPE = TYPE_LOADER.load(Integer.class);
public static final MetadataType NUMBER_TYPE = loadPrimitive(NUMBER);
Expand Down

0 comments on commit ee676a5

Please sign in to comment.