Class ArtifactAstDTO
java.lang.Object
org.mule.runtime.ast.api.util.BaseArtifactAst
org.mule.runtime.ast.internal.serialization.dto.ArtifactAstDTO
- All Implemented Interfaces:
ArtifactAst
This class represent an
ArtifactAst but in a serializable fashion. All the data that cannot be serialized can be added
after deserialization using #enrich(ExtensionModelResolver, GenerationInformationResolver).-
Constructor Summary
ConstructorsConstructorDescriptionArtifactAstDTO(String artifactName, ArtifactType artifactType, Set<ExtensionModelDTO> dependencies, List<ComponentAstDTO> topLevelComponentAsts, ErrorTypeRepositoryDTO errorTypeRepository, Collection<ImportedResourceDTO> importedResources) -
Method Summary
Modifier and TypeMethodDescriptionSet<org.mule.runtime.api.meta.model.ExtensionModel>Optional<org.mule.runtime.extension.api.dsl.syntax.resolver.DslSyntaxResolver>dependenciesDsl(org.mule.runtime.api.meta.model.ExtensionModel extModel) voidenrich(ExtensionModelResolver extensionModelResolver, GenerationInformationResolver generationInformationResolver, ParameterModelUtils parameterModelUtils) AnArtifactAstDTOis a serialized version of anArtifactAst.org.mule.runtime.api.exception.ErrorTypeRepositoryvoidsetParent(ArtifactAst parent) voidsetPropertiesResolver(PropertiesResolver propertiesResolver) Setting aPropertiesResolverto this DTO will cascade down all child components in order to eventually impact all parameters.voidupdatePropertiesResolver(UnaryOperator<String> newPropertiesResolver) Methods inherited from class org.mule.runtime.ast.api.util.BaseArtifactAst
filteredComponents, recursiveSpliterator, recursiveSpliterator, recursiveStream, recursiveStream, topLevelComponentsSpliterator, topLevelComponentsStreamMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.mule.runtime.ast.api.ArtifactAst
filteredComponents, namespaceDefinition, recursiveSpliterator, recursiveSpliterator, recursiveStream, recursiveStream, topLevelComponentsSpliterator, topLevelComponentsStream
-
Constructor Details
-
ArtifactAstDTO
public ArtifactAstDTO(String artifactName, ArtifactType artifactType, Set<ExtensionModelDTO> dependencies, List<ComponentAstDTO> topLevelComponentAsts, ErrorTypeRepositoryDTO errorTypeRepository, Collection<ImportedResourceDTO> importedResources)
-
-
Method Details
-
getArtifactName
- Specified by:
getArtifactNamein interfaceArtifactAst
-
getArtifactType
- Specified by:
getArtifactTypein interfaceArtifactAst
-
dependencies
- Specified by:
dependenciesin interfaceArtifactAst
-
getParent
- Specified by:
getParentin interfaceArtifactAst
-
topLevelComponents
- Specified by:
topLevelComponentsin interfaceArtifactAst
-
updatePropertiesResolver
- Specified by:
updatePropertiesResolverin interfaceArtifactAst
-
getErrorTypeRepository
public org.mule.runtime.api.exception.ErrorTypeRepository getErrorTypeRepository()- Specified by:
getErrorTypeRepositoryin interfaceArtifactAst- Overrides:
getErrorTypeRepositoryin classBaseArtifactAst
-
dependenciesDsl
public Optional<org.mule.runtime.extension.api.dsl.syntax.resolver.DslSyntaxResolver> dependenciesDsl(org.mule.runtime.api.meta.model.ExtensionModel extModel) - Specified by:
dependenciesDslin interfaceArtifactAst
-
getImportedResources
- Specified by:
getImportedResourcesin interfaceArtifactAst
-
getPropertiesResolver
-
setPropertiesResolver
Setting aPropertiesResolverto this DTO will cascade down all child components in order to eventually impact all parameters. TheComponentParameterAstDTOshould listen for changes in this properties resolver triggered by callingupdatePropertiesResolver(UnaryOperator).- Parameters:
propertiesResolver-
-
setParent
-
enrich
public void enrich(ExtensionModelResolver extensionModelResolver, GenerationInformationResolver generationInformationResolver, ParameterModelUtils parameterModelUtils) AnArtifactAstDTOis a serialized version of anArtifactAst. During serialization, some info such as theExtensionModelis lost. In order to use this DTO interchangeably as anArtifactAst, that information needs to be reloaded. This is done through this method (with the help of Resolvers)- Parameters:
extensionModelResolver-generationInformationResolver-parameterModelUtils-
-