Class XmlModelUtils
java.lang.Object
org.mule.runtime.extension.api.util.XmlModelUtils
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final QNameQNamefor the byte streaming strategystatic final QNameQNamefor a reconnection configstatic final QNameQNamefor the object streaming strategystatic final QNameQNamefor a reconnection strategystatic final QNameQNamefor an abstract redelivery policystatic final QNameQNamefor theerror-mappingelementstatic final QNameQNamefor theerror-mappingselementstatic final QNameQNamefor theexpiration-policyelementstatic final QNameQNamefor aPoolingProfile -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringbuildSchemaLocation(String prefix, String namespace) Given a prefix and a namespace returns the correspondent schema locationstatic org.mule.runtime.api.meta.model.XmlDslModelcreateXmlLanguageModel(Optional<String> prefix, Optional<String> namespace, String extensionName, String extensionVersion) Takes a set of parameters extracted from the extension and generates aXmlDslModel.static booleansupportsTopLevelDeclaration(org.mule.metadata.api.model.MetadataType metadataType)
-
Field Details
-
MULE_ABSTRACT_REDELIVERY_POLICY_QNAME
QNamefor an abstract redelivery policy -
MULE_POOLING_PROFILE_TYPE_QNAME
QNamefor aPoolingProfile -
MULE_ABSTRACT_DEFAULT_RECONNECTION_QNAME
QNamefor a reconnection config -
MULE_ABSTRACT_RECONNECTION_STRATEGY_QNAME
QNamefor a reconnection strategy -
MULE_ABSTRACT_BYTE_STREAMING_STRATEGY_QNAME
QNamefor the byte streaming strategy -
MULE_ABSTRACT_OBJECT_STREAMING_STRATEGY_QNAME
QNamefor the object streaming strategy -
MULE_EXPIRATION_POLICY_QNAME
QNamefor theexpiration-policyelement -
MULE_ERROR_MAPPINGS_QNAME
QNamefor theerror-mappingselement -
MULE_ERROR_MAPPING_QNAME
QNamefor theerror-mappingelement
-
-
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 aXmlDslModel.- Parameters:
prefix- prefix of the extension. IfOptional.empty()or empty string, then it will default using theextensionName.namespace- namespace location of the extension. IfOptional.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
metadataTypecan be defined as a top level element
-
buildSchemaLocation
Given a prefix and a namespace returns the correspondent schema location- Parameters:
prefix-namespace-- Returns:
Stringwith the schema location
-