@NoImplement
public interface AstXmlParser
ArtifactAst.
This parser needs to know the extension models that are used by the artifact in order to generate the ArtifactAst
correctly.
A single parser instance may be used to generate more than one ArtifactAst from different configs, since no state
specific to a parsing process is kept by this parser. The same parser may be used to parse different configs concurrently, as
well.
| Modifier and Type | Interface and Description |
|---|---|
static class |
AstXmlParser.Builder
A builder for creating
AstXmlParser instances. |
| Modifier and Type | Field and Description |
|---|---|
static org.mule.runtime.api.component.ComponentIdentifier |
ANNOTATIONS_IDENTIFIER |
static org.mule.runtime.api.component.ComponentIdentifier |
DOMAIN_ROOT_IDENTIFIER |
static org.mule.runtime.api.component.ComponentIdentifier |
IMPORT_IDENTIFIER |
static org.mule.runtime.api.component.ComponentIdentifier |
MULE_ROOT_IDENTIFIER |
| Modifier and Type | Method and Description |
|---|---|
static AstXmlParser.Builder |
builder()
Creates a builder for an
AstXmlParser. |
ArtifactAst |
parse(org.mule.runtime.dsl.api.ConfigResource... appXmlConfigResources)
Generate a new
ArtifactAst representation form the XML read from the provided inputStreams. |
ArtifactAst |
parse(List<org.mule.runtime.api.util.Pair<String,InputStream>> appXmlConfigInputStreams)
Generate a new
ArtifactAst representation form the XML read from the provided inputStreams. |
ArtifactAst |
parse(String artifactName,
org.mule.runtime.dsl.api.ConfigResource... appXmlConfigResources)
Generate a new
ArtifactAst representation form the XML read from the provided inputStreams. |
ArtifactAst |
parse(String resourceName,
InputStream appXmlConfigInputStream)
Generate a new
ArtifactAst representation form the XML read from the provided inputStream. |
ArtifactAst |
parse(String artifactName,
List<org.mule.runtime.api.util.Pair<String,InputStream>> appXmlConfigInputStreams)
Generate a new
ArtifactAst representation form the XML read from the provided inputStreams. |
ArtifactAst |
parse(String artifactName,
String resourceName,
InputStream appXmlConfigInputStream)
Generate a new
ArtifactAst representation form the XML read from the provided inputStream. |
ArtifactAst |
parse(String artifactName,
URI... appXmlConfigUris)
Generate a new
ArtifactAst representation form the XML read from the provided uris. |
ArtifactAst |
parse(String artifactName,
URL... appXmlConfigUrls)
Generate a new
ArtifactAst representation form the XML read from the provided urls. |
ArtifactAst |
parse(URI... appXmlConfigUris)
Generate a new
ArtifactAst representation form the XML read from the provided uris. |
ArtifactAst |
parse(URL... appXmlConfigUrls)
Generate a new
ArtifactAst representation form the XML read from the provided urls. |
ArtifactAst |
parseDocument(List<org.mule.runtime.api.util.Pair<String,Document>> appXmlConfigDocuments)
Generate a new
ArtifactAst representation form the XML DOM tree. |
ArtifactAst |
parseDocument(String artifactName,
List<org.mule.runtime.api.util.Pair<String,Document>> appXmlConfigDocuments)
Generate a new
ArtifactAst representation from the XML DOM tree. |
static final org.mule.runtime.api.component.ComponentIdentifier IMPORT_IDENTIFIER
static final org.mule.runtime.api.component.ComponentIdentifier MULE_ROOT_IDENTIFIER
static final org.mule.runtime.api.component.ComponentIdentifier DOMAIN_ROOT_IDENTIFIER
static final org.mule.runtime.api.component.ComponentIdentifier ANNOTATIONS_IDENTIFIER
static AstXmlParser.Builder builder()
AstXmlParser.AstXmlParser.ArtifactAst parseDocument(String artifactName, List<org.mule.runtime.api.util.Pair<String,Document>> appXmlConfigDocuments)
ArtifactAst representation from the XML DOM tree.
The parsing process will resolve references in import tags. Relative paths will be resolved using
the currently set ThreadContextClassLoader.
Note: The component metadata that is generated relies on data populated at the time of parsing the config XML into its
Document. In the case of this method, the provided Document must be of
level 3 and have that data populated for the component metadata about
the underlying DSL to be accurate. The required data is a userData with key
XmlMetadataAnnotations.METADATA_ANNOTATIONS_KEY and value of type XmlMetadataAnnotations on every node of the
DOM tree.
artifactName - the name of the artifact to parseappXmlConfigDocuments - the XML content to be parsed. The first part of each pair is the name to be used as fileName in
the metadata of the generates ArtifactAst.ArtifactAst representation of the provided XML config.ArtifactAst parseDocument(List<org.mule.runtime.api.util.Pair<String,Document>> appXmlConfigDocuments)
ArtifactAst representation form the XML DOM tree.
The parsing process will resolve references in import tags. Relative paths will be resolved using
the currently set ThreadContextClassLoader.
Note: The component metadata that is generated relies on data populated at the time of parsing the config XML into its
Document. In the case of this method, the provided Document must be of
level 3 and have that data populated for the component metadata about
the underlying DSL to be accurate. The required data is a userData with key
XmlMetadataAnnotations.METADATA_ANNOTATIONS_KEY and value of type XmlMetadataAnnotations on every node of the
DOM tree.
appXmlConfigDocuments - the XML content to be parsed. The first part of each pair is the name to be used as fileName in
the metadata of the generates ArtifactAst.ArtifactAst representation of the provided XML config.ArtifactAst parse(String artifactName, List<org.mule.runtime.api.util.Pair<String,InputStream>> appXmlConfigInputStreams)
ArtifactAst representation form the XML read from the provided inputStreams.
The parsing process will resolve references in import tags. Relative paths will be resolved using
the currently set ThreadContextClassLoader.
artifactName - the name of the artifact to parseappXmlConfigInputStreams - the streams that will provide the XML content to be parsed. The first part of each pair is
the name to be used as fileName in the metadata of the generates ArtifactAst.ArtifactAst representation of the provided XML config.ArtifactAst parse(List<org.mule.runtime.api.util.Pair<String,InputStream>> appXmlConfigInputStreams)
ArtifactAst representation form the XML read from the provided inputStreams.
The parsing process will resolve references in import tags. Relative paths will be resolved using
the currently set ThreadContextClassLoader.
appXmlConfigInputStreams - the streams that will provide the XML content to be parsed. The first part of each pair is
the name to be used as fileName in the metadata of the generates ArtifactAst.ArtifactAst representation of the provided XML config.ArtifactAst parse(String artifactName, org.mule.runtime.dsl.api.ConfigResource... appXmlConfigResources)
ArtifactAst representation form the XML read from the provided inputStreams.
The parsing process will resolve references in import tags. Relative paths will be resolved using
the currently set ThreadContextClassLoader.
artifactName - the name of the artifact to parseappXmlConfigResources - the resources that will provide the XML content to be parsed.ArtifactAst representation of the provided XML config.ArtifactAst parse(org.mule.runtime.dsl.api.ConfigResource... appXmlConfigResources)
ArtifactAst representation form the XML read from the provided inputStreams.
The parsing process will resolve references in import tags. Relative paths will be resolved using
the currently set ThreadContextClassLoader.
appXmlConfigResources - the resources that will provide the XML content to be parsed.ArtifactAst representation of the provided XML config.ArtifactAst parse(String artifactName, String resourceName, InputStream appXmlConfigInputStream)
ArtifactAst representation form the XML read from the provided inputStream.
The parsing process will resolve references in import tags. Relative paths will be resolved using
the currently set ThreadContextClassLoader.
artifactName - the name of the artifact to parseresourceName - the name to be used as fileName in the metadata of the generates ArtifactAst.appXmlConfigInputStream - the stream that will provide the XML content to be parsed.ArtifactAst representation of the provided XML config.ArtifactAst parse(String resourceName, InputStream appXmlConfigInputStream)
ArtifactAst representation form the XML read from the provided inputStream.
The parsing process will resolve references in import tags. Relative paths will be resolved using
the currently set ThreadContextClassLoader.
resourceName - the name to be used as fileName in the metadata of the generates ArtifactAst.appXmlConfigInputStream - the stream that will provide the XML content to be parsed.ArtifactAst representation of the provided XML config.ArtifactAst parse(String artifactName, URI... appXmlConfigUris)
ArtifactAst representation form the XML read from the provided uris.
The parsing process will resolve references in import tags. Relative paths will be resolved using
the currently set ThreadContextClassLoader.
artifactName - the name of the artifact to parseappXmlConfigUris - the uris that will provide the XML content to be parsed.ArtifactAst representation of the provided XML config.ArtifactAst parse(URI... appXmlConfigUris)
ArtifactAst representation form the XML read from the provided uris.
The parsing process will resolve references in import tags. Relative paths will be resolved using
the currently set ThreadContextClassLoader.
appXmlConfigUris - the uris that will provide the XML content to be parsed.ArtifactAst representation of the provided XML config.ArtifactAst parse(String artifactName, URL... appXmlConfigUrls)
ArtifactAst representation form the XML read from the provided urls.
The parsing process will resolve references in import tags. Relative paths will be resolved using
the currently set ThreadContextClassLoader.
artifactName - the name of the artifact to parseappXmlConfigUrls - the urls that will provide the XML content to be parsed.ArtifactAst representation of the provided XML config.ArtifactAst parse(URL... appXmlConfigUrls)
ArtifactAst representation form the XML read from the provided urls.
The parsing process will resolve references in import tags. Relative paths will be resolved using
the currently set ThreadContextClassLoader.
appXmlConfigUrls - the urls that will provide the XML content to be parsed.ArtifactAst representation of the provided XML config.Copyright © 2022 MuleSoft, Inc.. All rights reserved.