Interface ArtifactAstBuilder

All Known Implementing Classes:
DefaultArtifactAstBuilder

@NoImplement public interface ArtifactAstBuilder
Provides a way of creating ArtifactAst instances, adding and configuring its components.
Since:
1.0
  • Method Details

    • builder

      static ArtifactAstBuilder builder(Set<org.mule.runtime.api.meta.model.ExtensionModel> extensionsModels, Optional<ArtifactAst> parentArtifact)
    • builder

      static ArtifactAstBuilder builder(Set<org.mule.runtime.api.meta.model.ExtensionModel> extensionsModels, Optional<ArtifactAst> parentArtifact, ExtensionModelHelper extModelHelper)
    • builder

      static ArtifactAstBuilder builder(Set<org.mule.runtime.api.meta.model.ExtensionModel> extensionsModels, Optional<ArtifactAst> parentArtifact, UnaryOperator<String> basePropertiesResolver)
      Instantiates a new raw builder, whose components will be declared in the provided extensionModels.
      Parameters:
      extensionsModels - contain the declaration of the components to be added to the target ArtifactAst.
      parentArtifact - the ArtifactAst that is the parent of the target artifact.
      basePropertiesResolver - the resolver for properties that may be found during the basic building of the AST (for instance, the names of components used to generate locations).
      Returns:
      the newly created builder
    • builder

      static ArtifactAstBuilder builder(Set<org.mule.runtime.api.meta.model.ExtensionModel> extensionsModels, Optional<ArtifactAst> parentArtifact, UnaryOperator<String> basePropertiesResolver, ExtensionModelHelper extModelHelper)
      Instantiates a new raw builder, whose components will be declared in the provided extensionModels.
      Parameters:
      extensionsModels - contain the declaration of the components to be added to the target ArtifactAst.
      parentArtifact - the ArtifactAst that is the parent of the target artifact.
      basePropertiesResolver - the resolver for properties that may be found during the basic building of the AST (for instance, the names of components used to generate locations).
      Returns:
      the newly created builder
    • builder

      static ArtifactAstBuilder builder(String artifactName, ArtifactType artifactType, Set<org.mule.runtime.api.meta.model.ExtensionModel> extensionsModels, Optional<ArtifactAst> parentArtifact, UnaryOperator<String> basePropertiesResolver)
    • builder

      static ArtifactAstBuilder builder(String artifactName, ArtifactType artifactType, Set<org.mule.runtime.api.meta.model.ExtensionModel> extensionsModels, Optional<ArtifactAst> parentArtifact, UnaryOperator<String> basePropertiesResolver, ExtensionModelHelper extModelHelper)
    • addTopLevelComponent

      ComponentAstBuilder addTopLevelComponent()
      Adds a top-level component to the artifact being built with this builder.
      Returns:
      the builder for the newly added top-level component
    • createMetadataBuilder

      ComponentMetadataAstBuilder createMetadataBuilder()
      Returns:
      A properly configured ComponentMetadataAstBuilder to use with this instance.
    • build

      ArtifactAst build()
      Builds the target artifact and its inner components.
      Returns:
      the target artifact.
    • withNamespaceDefinition

      void withNamespaceDefinition(NamespaceDefinition namespaceDefinition)
      Adds a NamespaceDefinition to the Artifact being built.
      Parameters:
      namespaceDefinition - the namespace definition to be added.
    • withImportedResource

      ArtifactAstBuilder withImportedResource(ImportedResource resource)
      Adds a resource to be imported by the resulting ArtifactAst.
      Parameters:
      resource - The resource to be imported by the resulting ArtifactAst.
      Returns:
      the same ast builder.