public class DefaultAstXmlParser extends Object implements AstXmlParser
AstXmlParser.BuilderANNOTATIONS_IDENTIFIER, DOMAIN_ROOT_IDENTIFIER, IMPORT_IDENTIFIER, MULE_ROOT_IDENTIFIER| Constructor and Description |
|---|
DefaultAstXmlParser(ArtifactType artifactType,
Set<org.mule.runtime.api.meta.model.ExtensionModel> extensionModels,
ArtifactAst parentArtifact,
Optional<org.mule.runtime.extension.api.dsl.syntax.resources.spi.ExtensionSchemaGenerator> schemaGenerator,
org.mule.runtime.dsl.api.xml.parser.ParsingPropertyResolver propertyResolver,
ResolveEntityFailStrategy resolveEntityFailStrategy) |
| Modifier and Type | Method and Description |
|---|---|
protected ArtifactAst |
doParse(String artifactName,
Document document,
String resourceName,
URL resourceUrl,
List<ImportedResource> importChain) |
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. |
protected ArtifactAst |
resolveImports(ArtifactAst base,
Map<org.mule.runtime.dsl.api.ConfigResource,ArtifactAst> importedConfigs) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuilderpublic DefaultAstXmlParser(ArtifactType artifactType, Set<org.mule.runtime.api.meta.model.ExtensionModel> extensionModels, ArtifactAst parentArtifact, Optional<org.mule.runtime.extension.api.dsl.syntax.resources.spi.ExtensionSchemaGenerator> schemaGenerator, org.mule.runtime.dsl.api.xml.parser.ParsingPropertyResolver propertyResolver, ResolveEntityFailStrategy resolveEntityFailStrategy)
public ArtifactAst parseDocument(String artifactName, List<org.mule.runtime.api.util.Pair<String,Document>> appXmlConfigDocuments)
AstXmlParserArtifactAst 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.
parseDocument in interface AstXmlParserartifactName - 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.public ArtifactAst parseDocument(List<org.mule.runtime.api.util.Pair<String,Document>> appXmlConfigDocuments)
AstXmlParserArtifactAst 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.
parseDocument in interface AstXmlParserappXmlConfigDocuments - 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.public ArtifactAst parse(String artifactName, List<org.mule.runtime.api.util.Pair<String,InputStream>> appXmlConfigInputStreams)
AstXmlParserArtifactAst 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.
parse in interface AstXmlParserartifactName - 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.public ArtifactAst parse(List<org.mule.runtime.api.util.Pair<String,InputStream>> appXmlConfigInputStreams)
AstXmlParserArtifactAst 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.
parse in interface AstXmlParserappXmlConfigInputStreams - 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.public ArtifactAst parse(String artifactName, org.mule.runtime.dsl.api.ConfigResource... appXmlConfigResources)
AstXmlParserArtifactAst 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.
parse in interface AstXmlParserartifactName - 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.public ArtifactAst parse(org.mule.runtime.dsl.api.ConfigResource... appXmlConfigResources)
AstXmlParserArtifactAst 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.
parse in interface AstXmlParserappXmlConfigResources - the resources that will provide the XML content to be parsed.ArtifactAst representation of the provided XML config.public ArtifactAst parse(String artifactName, String resourceName, InputStream appXmlConfigInputStream)
AstXmlParserArtifactAst 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.
parse in interface AstXmlParserartifactName - 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.public ArtifactAst parse(String resourceName, InputStream appXmlConfigInputStream)
AstXmlParserArtifactAst 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.
parse in interface AstXmlParserresourceName - 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.public ArtifactAst parse(String artifactName, URI... appXmlConfigUris)
AstXmlParserArtifactAst 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.
parse in interface AstXmlParserartifactName - 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.public ArtifactAst parse(URI... appXmlConfigUris)
AstXmlParserArtifactAst 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.
parse in interface AstXmlParserappXmlConfigUris - the uris that will provide the XML content to be parsed.ArtifactAst representation of the provided XML config.public ArtifactAst parse(String artifactName, URL... appXmlConfigUrls)
AstXmlParserArtifactAst 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.
parse in interface AstXmlParserartifactName - 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.public ArtifactAst parse(URL... appXmlConfigUrls)
AstXmlParserArtifactAst 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.
parse in interface AstXmlParserappXmlConfigUrls - the urls that will provide the XML content to be parsed.ArtifactAst representation of the provided XML config.protected ArtifactAst resolveImports(ArtifactAst base, Map<org.mule.runtime.dsl.api.ConfigResource,ArtifactAst> importedConfigs)
protected ArtifactAst doParse(String artifactName, Document document, String resourceName, URL resourceUrl, List<ImportedResource> importChain)
Copyright © 2022 MuleSoft, Inc.. All rights reserved.