public class MetadataRecordResolver extends Object
| Constructor and Description |
|---|
MetadataRecordResolver(org.mule.runtime.api.metadata.MetadataContext metadataContext,
DefaultMetadataRetriever metadataRetriever,
String operationName) |
| Modifier and Type | Method and Description |
|---|---|
protected List<org.mule.metadata.api.model.ObjectFieldType> |
convertCustomizationRecordToMetadataType(List<Node> customizationRecords,
String recordType,
boolean isCustomRecord) |
org.mule.metadata.api.model.ObjectFieldType |
createMetadataKeyFromCustomFieldRefType(CustomFieldRefType customFieldRefType,
String scriptId,
String internalId,
String separator,
String label)
Resolves the metadata key from the custom field
|
protected Optional<org.mule.metadata.api.model.ObjectFieldType> |
findValueForKey(org.mule.metadata.api.model.ObjectType objectType,
String keyLocalPartName) |
protected void |
generateCustomMetadataTypes(org.mule.metadata.api.model.ObjectType objectType,
String recordType,
boolean isCustomRecord) |
Set<org.mule.runtime.api.metadata.MetadataKey> |
getAttachRefTypes(String reference) |
Set<org.mule.runtime.api.metadata.MetadataKey> |
getCustomRecordKeys() |
org.mule.metadata.api.model.ObjectFieldType |
getDuplicateObjectFieldType(org.mule.metadata.api.model.ObjectFieldType objectFieldType,
QName metadataFieldKey,
String label) |
Set<org.mule.runtime.api.metadata.MetadataKey> |
getGetAllMetadataKeys() |
org.mule.metadata.api.model.MetadataType |
getMetadataForAttachInput(Optional<String> attachType,
String reference) |
protected org.mule.metadata.api.model.MetadataType |
getMetadataForAttachRefType(org.mule.metadata.api.model.MetadataType defaultMetadataType,
Optional<String> type,
String reference) |
org.mule.metadata.api.model.MetadataType |
getMetadataForRecordInput(Optional<String> recordType) |
org.mule.metadata.api.model.MetadataType |
getMetadataForRecordOutput(Optional<String> recordType) |
protected org.mule.metadata.api.model.MetadataType |
getMetadataForRef(org.mule.metadata.api.model.MetadataType defaultMetadataType,
Optional<String> refType,
boolean isInput)
Returns the metadata with the specific fields or attributes for the refType if it is available
|
org.mule.metadata.api.model.MetadataType |
getMetadataForRefInput(Optional<String> recordType) |
org.mule.metadata.api.model.MetadataType |
getMetadataForRefOutput(Optional<String> recordType) |
org.mule.metadata.api.model.MetadataType |
getMetadataForSearch(Optional<String> searchType) |
protected org.mule.metadata.api.model.MetadataType |
getMetadataForSearchType(org.mule.metadata.api.model.MetadataType defaultMetadataType,
Optional<String> type) |
Set<org.mule.runtime.api.metadata.MetadataKey> |
getRecordRefAndTypeParameterGroup()
Finds all complex types that extend from BaseRef at the main level of key.
|
Set<org.mule.runtime.api.metadata.MetadataKey> |
getRecordTypesMetadataType() |
protected static void |
replaceObjectFieldTypeValue(org.mule.metadata.api.model.ObjectType originalObjectType,
String keyLocalPartName,
org.mule.metadata.api.model.ObjectFieldType objectFieldTypeReplacement) |
protected Optional<org.mule.metadata.api.model.ObjectFieldType> |
replaceQNameNamespaceUriValue(org.mule.metadata.api.model.ObjectType originalObjectType,
String keyLocalPartName,
QName qNameReplacement) |
protected void |
replaceValue(Object to,
org.mule.metadata.api.model.ObjectFieldType from)
Replaces the metadata value from the given object using reflection, finding its "value" field
|
protected void |
replaceWithXmlTypeLoaderElement(org.mule.metadata.api.model.ObjectType metadataType,
String xmlTypeLoaderElement,
String whereLocalMetadataPartName) |
protected Map<String,List<Node>> |
retrieveAndExtractCustomizationRefNodesToMap(List<String> customizationTypes) |
protected List<Node> |
retrieveCustomizationRefNodes(String customizationId) |
protected List<org.mule.metadata.api.model.ObjectFieldType> |
retrieveRecordsForBaseRefs(List<Node> baseRefs,
String recordType,
boolean isCustomRecord) |
static String |
toSnakeCase(String input) |
public MetadataRecordResolver(org.mule.runtime.api.metadata.MetadataContext metadataContext,
DefaultMetadataRetriever metadataRetriever,
String operationName)
throws org.mule.runtime.api.connection.ConnectionException,
org.mule.runtime.api.metadata.MetadataResolvingException
org.mule.runtime.api.connection.ConnectionExceptionorg.mule.runtime.api.metadata.MetadataResolvingExceptionpublic org.mule.metadata.api.model.MetadataType getMetadataForRecordInput(Optional<String> recordType) throws org.mule.runtime.api.metadata.MetadataResolvingException
org.mule.runtime.api.metadata.MetadataResolvingExceptionpublic org.mule.metadata.api.model.MetadataType getMetadataForRecordOutput(Optional<String> recordType) throws org.mule.runtime.api.metadata.MetadataResolvingException
org.mule.runtime.api.metadata.MetadataResolvingExceptionpublic org.mule.metadata.api.model.MetadataType getMetadataForRefInput(Optional<String> recordType) throws org.mule.runtime.api.metadata.MetadataResolvingException
org.mule.runtime.api.metadata.MetadataResolvingExceptionpublic org.mule.metadata.api.model.MetadataType getMetadataForRefOutput(Optional<String> recordType) throws org.mule.runtime.api.metadata.MetadataResolvingException
org.mule.runtime.api.metadata.MetadataResolvingExceptionpublic org.mule.metadata.api.model.MetadataType getMetadataForAttachInput(Optional<String> attachType, String reference) throws org.mule.runtime.api.metadata.MetadataResolvingException
org.mule.runtime.api.metadata.MetadataResolvingExceptionpublic org.mule.metadata.api.model.MetadataType getMetadataForSearch(Optional<String> searchType) throws org.mule.runtime.api.metadata.MetadataResolvingException
org.mule.runtime.api.metadata.MetadataResolvingExceptionpublic Set<org.mule.runtime.api.metadata.MetadataKey> getRecordRefAndTypeParameterGroup() throws org.mule.runtime.api.metadata.MetadataResolvingException
org.mule.runtime.api.metadata.MetadataResolvingException - if some error occurs in metadata resolutionpublic Set<org.mule.runtime.api.metadata.MetadataKey> getRecordTypesMetadataType()
protected org.mule.metadata.api.model.MetadataType getMetadataForRef(org.mule.metadata.api.model.MetadataType defaultMetadataType,
Optional<String> refType,
boolean isInput)
throws org.mule.runtime.api.metadata.MetadataResolvingException
defaultMetadataType - the default metadata generated for the operationrefType - the specific Base Ref typeisInput - if it is input metadata it will replace the messages namespaceUri by the used for the complex typeorg.mule.runtime.api.metadata.MetadataResolvingException - if any error occurs in the metadata resolutionprotected org.mule.metadata.api.model.MetadataType getMetadataForAttachRefType(org.mule.metadata.api.model.MetadataType defaultMetadataType,
Optional<String> type,
String reference)
throws org.mule.runtime.api.metadata.MetadataResolvingException
org.mule.runtime.api.metadata.MetadataResolvingExceptionprotected org.mule.metadata.api.model.MetadataType getMetadataForSearchType(org.mule.metadata.api.model.MetadataType defaultMetadataType,
Optional<String> type)
throws org.mule.runtime.api.metadata.MetadataResolvingException
org.mule.runtime.api.metadata.MetadataResolvingExceptionpublic Set<org.mule.runtime.api.metadata.MetadataKey> getAttachRefTypes(String reference)
protected void replaceWithXmlTypeLoaderElement(org.mule.metadata.api.model.ObjectType metadataType,
String xmlTypeLoaderElement,
String whereLocalMetadataPartName)
throws org.mule.runtime.api.metadata.MetadataResolvingException
org.mule.runtime.api.metadata.MetadataResolvingExceptionprotected void replaceValue(Object to, org.mule.metadata.api.model.ObjectFieldType from) throws org.mule.runtime.api.metadata.MetadataResolvingException
to - the object to set the new metadata valuefrom - the new metadata valueorg.mule.runtime.api.metadata.MetadataResolvingException - in case of IllegalAccessException or NoSuchFieldExceptionprotected static void replaceObjectFieldTypeValue(org.mule.metadata.api.model.ObjectType originalObjectType,
String keyLocalPartName,
org.mule.metadata.api.model.ObjectFieldType objectFieldTypeReplacement)
protected Optional<org.mule.metadata.api.model.ObjectFieldType> replaceQNameNamespaceUriValue(org.mule.metadata.api.model.ObjectType originalObjectType, String keyLocalPartName, QName qNameReplacement)
protected Optional<org.mule.metadata.api.model.ObjectFieldType> findValueForKey(org.mule.metadata.api.model.ObjectType objectType, String keyLocalPartName)
protected void generateCustomMetadataTypes(org.mule.metadata.api.model.ObjectType objectType,
String recordType,
boolean isCustomRecord)
protected List<org.mule.metadata.api.model.ObjectFieldType> retrieveRecordsForBaseRefs(List<Node> baseRefs, String recordType, boolean isCustomRecord) throws ParserConfigurationException, TransformerException, XPathExpressionException
protected List<org.mule.metadata.api.model.ObjectFieldType> convertCustomizationRecordToMetadataType(List<Node> customizationRecords, String recordType, boolean isCustomRecord)
public org.mule.metadata.api.model.ObjectFieldType createMetadataKeyFromCustomFieldRefType(CustomFieldRefType customFieldRefType, String scriptId, String internalId, String separator, String label) throws org.mule.runtime.api.metadata.MetadataResolvingException
customFieldRefType - the custom field reference type to which the metadata key will be createdscriptId - the custom field's scriptIdinternalId - the custom field's internalIdseparator - the custom field separator indicated in the Connector Configurationlabel - the label for fieldorg.mule.runtime.api.metadata.MetadataResolvingException - if an error occurs in the metadata key resolutionpublic org.mule.metadata.api.model.ObjectFieldType getDuplicateObjectFieldType(org.mule.metadata.api.model.ObjectFieldType objectFieldType,
QName metadataFieldKey,
String label)
protected Map<String,List<Node>> retrieveAndExtractCustomizationRefNodesToMap(List<String> customizationTypes)
protected List<Node> retrieveCustomizationRefNodes(String customizationId) throws ParserConfigurationException, TransformerException, XPathExpressionException
public Set<org.mule.runtime.api.metadata.MetadataKey> getGetAllMetadataKeys()
public Set<org.mule.runtime.api.metadata.MetadataKey> getCustomRecordKeys()
Copyright © 2025 MuleSoft, Inc.. All rights reserved.