Package org.mule.runtime.ast.api.xml
Class AstXmlParser.Builder
java.lang.Object
org.mule.runtime.ast.api.xml.AstXmlParser.Builder
- Enclosing interface:
- AstXmlParser
A builder for creating
AstXmlParser instances.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates a newArtifactAstaccording to the state set to this builder.withArtifactType(ArtifactType artifactType) Set theArtifactTypeof the targetArtifactAstwithExtensionModel(org.mule.runtime.api.meta.model.ExtensionModel extensionModel) Add an extension model for the parser.withExtensionModels(Collection<org.mule.runtime.api.meta.model.ExtensionModel> extensionModels) Add an extension model for the parser.withParentArtifact(ArtifactAst parentArtifact) Set theArtifactAstfrom the parent artifact (i.e.: the parent domain)withPropertyResolver(org.mule.runtime.dsl.api.xml.parser.ParsingPropertyResolver propertyResolver) Sets thepropertyResolverto be used to resolve property placeholders ({@code ${...}) found in the config. @param propertyResolver the property resolver to be used by the created {@link ArtifactAst}s. @return the updated builder.Disables schema validations during the parse process.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
withExtensionModel
public AstXmlParser.Builder withExtensionModel(org.mule.runtime.api.meta.model.ExtensionModel extensionModel) Add an extension model for the parser.The target parser must contain the extension models for every namespace that is used in the XML config for the
ArtifactAsts to be created correctly.- Parameters:
extensionModel- the extension model to add to the target parser- Returns:
- the updated builder.
-
withExtensionModels
public AstXmlParser.Builder withExtensionModels(Collection<org.mule.runtime.api.meta.model.ExtensionModel> extensionModels) Add an extension model for the parser.The target parser must contain the extension models for every namespace that is used in the XML config for the
ArtifactAsts to be created correctly.- Parameters:
extensionModels- the extension model to add to the target parser- Returns:
- the updated builder.
-
withArtifactType
Set theArtifactTypeof the targetArtifactAst- Parameters:
artifactType- the type pf the target artifact.- Returns:
- the updated builder.
-
withParentArtifact
Set theArtifactAstfrom the parent artifact (i.e.: the parent domain)- Parameters:
parentArtifact- theArtifactAstthat is the parent of the artifacts generated with this parser.- Returns:
- the updated builder.
-
withSchemaValidationsDisabled
Disables schema validations during the parse process.This will speed up the parsing process, but may provide an invalid
ArtifactAstfor invalid XMLs.- Returns:
- the updated builder.
-
withPropertyResolver
public AstXmlParser.Builder withPropertyResolver(org.mule.runtime.dsl.api.xml.parser.ParsingPropertyResolver propertyResolver) Sets thepropertyResolverto be used to resolve property placeholders ({@code ${...}) found in the config. @param propertyResolver the property resolver to be used by the created {@link ArtifactAst}s. @return the updated builder. -
withLegacyFailStrategy
-
build
Creates a newArtifactAstaccording to the state set to this builder.- Returns:
- a newly built
ArtifactAst.
-