java.lang.Object
org.mule.runtime.extension.api.util.XmlModelUtils

public final class XmlModelUtils extends Object
Utils class for parsing and generation of Xml related values of an extension. This is an internal utils class, not to be considered part of the API. Backwards compatibility not guaranteed
Since:
1.0
  • Field Details

    • MULE_ABSTRACT_REDELIVERY_POLICY_QNAME

      public static final QName MULE_ABSTRACT_REDELIVERY_POLICY_QNAME
      QName for an abstract redelivery policy
    • MULE_POOLING_PROFILE_TYPE_QNAME

      public static final QName MULE_POOLING_PROFILE_TYPE_QNAME
      QName for a PoolingProfile
    • MULE_ABSTRACT_DEFAULT_RECONNECTION_QNAME

      public static final QName MULE_ABSTRACT_DEFAULT_RECONNECTION_QNAME
      QName for a reconnection config
    • MULE_ABSTRACT_RECONNECTION_STRATEGY_QNAME

      public static final QName MULE_ABSTRACT_RECONNECTION_STRATEGY_QNAME
      QName for a reconnection strategy
    • MULE_ABSTRACT_BYTE_STREAMING_STRATEGY_QNAME

      public static final QName MULE_ABSTRACT_BYTE_STREAMING_STRATEGY_QNAME
      QName for the byte streaming strategy
    • MULE_ABSTRACT_OBJECT_STREAMING_STRATEGY_QNAME

      public static final QName MULE_ABSTRACT_OBJECT_STREAMING_STRATEGY_QNAME
      QName for the object streaming strategy
    • MULE_EXPIRATION_POLICY_QNAME

      public static final QName MULE_EXPIRATION_POLICY_QNAME
      QName for the expiration-policy element
    • MULE_ERROR_MAPPINGS_QNAME

      public static final QName MULE_ERROR_MAPPINGS_QNAME
      QName for the error-mappings element
    • MULE_ERROR_MAPPING_QNAME

      public static final QName MULE_ERROR_MAPPING_QNAME
      QName for the error-mapping element
  • Constructor Details

    • XmlModelUtils

      public XmlModelUtils()
  • Method Details

    • createXmlLanguageModel

      public static org.mule.runtime.api.meta.model.XmlDslModel createXmlLanguageModel(Optional<String> prefix, Optional<String> namespace, String extensionName, String extensionVersion)
      Takes a set of parameters extracted from the extension and generates a XmlDslModel.
      Parameters:
      prefix - prefix of the extension. If Optional.empty() or empty string, then it will default using the extensionName.
      namespace - namespace location of the extension. If Optional.empty() or empty string, then it will default using a generated namespace.
      extensionName - name of the extension, cannot be null.
      extensionVersion - version of the extension, cannot be null.
      Returns:
      a wellformed XmlDslModel
    • supportsTopLevelDeclaration

      public static boolean supportsTopLevelDeclaration(org.mule.metadata.api.model.MetadataType metadataType)
      Parameters:
      metadataType - a type
      Returns:
      Whether the given metadataType can be defined as a top level element
    • buildSchemaLocation

      public static String buildSchemaLocation(String prefix, String namespace)
      Given a prefix and a namespace returns the correspondent schema location
      Parameters:
      prefix -
      namespace -
      Returns:
      String with the schema location