Class MetadataTypeModelAdapter
java.lang.Object
org.mule.runtime.ast.internal.builder.adapter.MetadataTypeModelAdapter
- All Implemented Interfaces:
org.mule.runtime.api.meta.DescribedObject,org.mule.runtime.api.meta.model.parameter.ParameterizedModel,org.mule.runtime.api.meta.NamedObject,MetadataTypeAdapter
public class MetadataTypeModelAdapter
extends Object
implements org.mule.runtime.api.meta.model.parameter.ParameterizedModel, MetadataTypeAdapter
-
Method Summary
Modifier and TypeMethodDescriptionstatic MetadataTypeModelAdaptercreateKeyValueWrapperTypeModelAdapter(String keyParamName, org.mule.metadata.api.model.MetadataType simpleKeyType, String valueParamName, org.mule.metadata.api.model.MetadataType simpleValueType, ExtensionModelHelper extensionModelHelper) Adapts the provided types representing the key/values of a map for treatment as aParameterizedModel.static Optional<MetadataTypeModelAdapter>createMetadataTypeModelAdapterWithStereotype(org.mule.metadata.api.model.MetadataType type, ExtensionModelHelper extensionModelHelper) Adapts the providedtypefor treatment as both aParameterizedModelandHasStereotypeModel.static MetadataTypeModelAdaptercreateParameterizedTypeModelAdapter(org.mule.metadata.api.model.MetadataType type, ExtensionModelHelper extensionModelHelper) Adapts the providedtypefor treatment as aParameterizedModel.static MetadataTypeModelAdaptercreateSimpleWrapperTypeModelAdapter(org.mule.metadata.api.model.SimpleType simpleType, ExtensionModelHelper extensionModelHelper) Adapts the providedsingleTypefor treatment as aParameterizedModel.getName()List<org.mule.runtime.api.meta.model.parameter.ParameterGroupModel>org.mule.metadata.api.model.MetadataTypegetType()booleanisWrapperFor(org.mule.metadata.api.model.MetadataType type) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.mule.runtime.api.meta.model.parameter.ParameterizedModel
getAllParameterModels
-
Method Details
-
createMetadataTypeModelAdapterWithStereotype
public static Optional<MetadataTypeModelAdapter> createMetadataTypeModelAdapterWithStereotype(org.mule.metadata.api.model.MetadataType type, ExtensionModelHelper extensionModelHelper) Adapts the providedtypefor treatment as both aParameterizedModelandHasStereotypeModel.- Parameters:
type- theMetadataTypeto adapt.extensionModelHelper- used for actions relative toMetadataTypes.- Returns:
- the newly created adapter if the provided is stereotyped,
Optional.empty()if not. - Since:
- 1.0
-
createSimpleWrapperTypeModelAdapter
public static MetadataTypeModelAdapter createSimpleWrapperTypeModelAdapter(org.mule.metadata.api.model.SimpleType simpleType, ExtensionModelHelper extensionModelHelper) Adapts the providedsingleTypefor treatment as aParameterizedModel.A new type is created around the provided
simpleTypeto represent how it is represented in a DSL when it is nested in an array.- Parameters:
simpleType- theMetadataTypeto adapt.extensionModelHelper- used for actions relative toMetadataTypes.- Returns:
- the newly created adapter.
- Since:
- 1.0
-
createKeyValueWrapperTypeModelAdapter
public static MetadataTypeModelAdapter createKeyValueWrapperTypeModelAdapter(String keyParamName, org.mule.metadata.api.model.MetadataType simpleKeyType, String valueParamName, org.mule.metadata.api.model.MetadataType simpleValueType, ExtensionModelHelper extensionModelHelper) Adapts the provided types representing the key/values of a map for treatment as aParameterizedModel.A new type is created around the provided types with the given paramNames to represent how it is represented in a DSL when it is nested in a map.
- Parameters:
keyParamName- the name of the attribute in the DSL containing the entry key.simpleKeyType- theMetadataTypeof the entry keyvalueParamName- the name of the attribute in the DSL containing the entry value.simpleValueType- theMetadataTypeof the entry valueextensionModelHelper- used for actions relative toMetadataTypes.- Returns:
- the newly created adapter.
- Since:
- 1.0
-
createParameterizedTypeModelAdapter
public static MetadataTypeModelAdapter createParameterizedTypeModelAdapter(org.mule.metadata.api.model.MetadataType type, ExtensionModelHelper extensionModelHelper) Adapts the providedtypefor treatment as aParameterizedModel.- Parameters:
type- theMetadataTypeto adapt.extensionModelHelper- used for actions relative toMetadataTypes.- Returns:
- the newly created adapter.
- Since:
- 1.0
-
getName
- Specified by:
getNamein interfaceorg.mule.runtime.api.meta.NamedObject
-
getDescription
- Specified by:
getDescriptionin interfaceorg.mule.runtime.api.meta.DescribedObject
-
getParameterGroupModels
public List<org.mule.runtime.api.meta.model.parameter.ParameterGroupModel> getParameterGroupModels()- Specified by:
getParameterGroupModelsin interfaceorg.mule.runtime.api.meta.model.parameter.ParameterizedModel
-
getType
public org.mule.metadata.api.model.MetadataType getType()- Specified by:
getTypein interfaceMetadataTypeAdapter- Returns:
- the adapted
MetadataType.
-
isWrapperFor
public boolean isWrapperFor(org.mule.metadata.api.model.MetadataType type) - Specified by:
isWrapperForin interfaceMetadataTypeAdapter- Parameters:
type- theMetadataTypeto check- Returns:
trueif this adapter's wrapped type is the giventype
-
toString
-