public abstract class BaseComponentAstBuilder<B extends BaseComponentAstBuilder> extends Object implements ComponentAstBuilder
| Modifier and Type | Field and Description |
|---|---|
static String |
BODY_RAW_PARAM_NAME |
protected Supplier<Optional<String>> |
componentId |
static String |
SOURCE_TYPE |
static String |
TARGET_TYPE |
| Constructor and Description |
|---|
BaseComponentAstBuilder(PropertiesResolver propertiesResolver) |
| Modifier and Type | Method and Description |
|---|---|
ComponentAstBuilder |
addChildComponent(B childComponent) |
Stream<B> |
childComponentsStream() |
protected Map<org.mule.runtime.api.util.Pair<org.mule.runtime.api.meta.model.parameter.ParameterModel,org.mule.runtime.api.meta.model.parameter.ParameterGroupModel>,ComponentParameterAst> |
createParameterAsts() |
protected void |
doRemoveParamChild(org.mule.runtime.api.component.ComponentIdentifier componentIdentifier) |
Map<String,Object> |
getAnnotations() |
Optional<String> |
getComponentId() |
org.mule.runtime.api.component.TypedComponentIdentifier.ComponentType |
getComponentType() |
protected org.mule.runtime.api.meta.model.ExtensionModel |
getExtensionModel() |
DefaultComponentGenerationInformation.Builder |
getGenerationInformation() |
org.mule.runtime.api.component.ComponentIdentifier |
getIdentifier() |
org.mule.runtime.api.component.location.ComponentLocation |
getLocation() |
ComponentMetadataAst |
getMetadata() |
protected Set<B> |
getParamsChildren() |
protected PropertiesResolver |
getPropertiesResolver() |
Map<String,String> |
getRawParameters() |
org.mule.metadata.api.model.MetadataType |
getType() |
protected void |
prepareForBuild() |
protected void |
removeParamChild(org.mule.runtime.api.meta.model.parameter.ParameterModel paramModel,
org.mule.runtime.api.meta.model.parameter.ParameterGroupModel parameterGroupModel) |
protected Optional<String> |
resolveComponentId(Map<org.mule.runtime.api.util.Pair<org.mule.runtime.api.meta.model.parameter.ParameterModel,org.mule.runtime.api.meta.model.parameter.ParameterGroupModel>,ComponentParameterAst> parameterAsts) |
protected void |
setComponentId(Supplier<Optional<String>> componentId) |
protected void |
validateSingleModelSet() |
ComponentAstBuilder |
withAnnotation(String name,
Object value)
Adds an annotation as defined in the DSL to this component builder.
|
ComponentAstBuilder |
withBodyParameter(String parameterRawValue)
Adds a body parameter as defined in the DSL to this component builder.
|
ComponentAstBuilder |
withComponentModel(org.mule.runtime.api.meta.model.ComponentModel componentModel)
Sets the model declaration of the target component.
|
ComponentAstBuilder |
withComponentType(org.mule.runtime.api.component.TypedComponentIdentifier.ComponentType componentType) |
ComponentAstBuilder |
withConfigurationModel(org.mule.runtime.api.meta.model.config.ConfigurationModel configurationModel)
Sets the model declaration of the target component.
|
ComponentAstBuilder |
withConnectionProviderModel(org.mule.runtime.api.meta.model.connection.ConnectionProviderModel connectionProviderModel)
Sets the model declaration of the target component.
|
ComponentAstBuilder |
withExtensionModel(org.mule.runtime.api.meta.model.ExtensionModel extensionModel) |
ComponentAstBuilder |
withIdentifier(org.mule.runtime.api.component.ComponentIdentifier identifier) |
ComponentAstBuilder |
withLocation(org.mule.runtime.api.component.location.ComponentLocation location) |
ComponentAstBuilder |
withMetadata(ComponentMetadataAst metadata) |
ComponentAstBuilder |
withNestableElementModel(org.mule.runtime.api.meta.model.nested.NestableElementModel nestableElementModel)
Sets the model declaration of the target component.
|
BaseComponentAstBuilder<B> |
withParameter(org.mule.runtime.api.meta.model.parameter.ParameterModel paramModel,
org.mule.runtime.api.meta.model.parameter.ParameterGroupModel parameterGroupModel,
ComponentParameterAst paramValue,
Iterable<org.mule.runtime.api.component.ComponentIdentifier> paramIdentifiers) |
BaseComponentAstBuilder<B> |
withParameter(org.mule.runtime.api.meta.model.parameter.ParameterModel paramModel,
org.mule.runtime.api.meta.model.parameter.ParameterGroupModel parameterGroupModel,
ComponentParameterAst paramValue,
Optional<org.mule.runtime.api.component.ComponentIdentifier> paramIdentifier) |
BaseComponentAstBuilder<B> |
withParameterizedModel(org.mule.runtime.api.meta.model.parameter.ParameterizedModel parameterizedModel)
Sets the model declaration of the target component.
|
ComponentAstBuilder |
withRawParameter(String paramName,
String paramRawValue)
Adds a parameter as defined in the DSL to this component builder.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddChildComponent, build, builderpublic static final String BODY_RAW_PARAM_NAME
public static final String SOURCE_TYPE
public static final String TARGET_TYPE
public BaseComponentAstBuilder(PropertiesResolver propertiesResolver)
public ComponentAstBuilder addChildComponent(B childComponent)
public ComponentAstBuilder withRawParameter(String paramName, String paramRawValue)
ComponentAstBuilder
When the target component is actually being built, these parameter names are matched to the parameters
defined in the model provided by ComponentAstBuilder.withParameterizedModel(ParameterizedModel) to create the actual parameters map of
the component.
withRawParameter in interface ComponentAstBuilderparamName - the name of the parameter for which a raw value is provided.paramRawValue - the raw value of the parameter, as defined in the DSL.public ComponentAstBuilder withBodyParameter(String parameterRawValue)
ComponentAstBuilder
When the target component is actually being built, these body parameter is matched to the parameters defined
in the model provided by ComponentAstBuilder.withParameterizedModel(ParameterizedModel) to create the actual parameters map of the
component.
withBodyParameter in interface ComponentAstBuilderparameterRawValue - the raw value of the body parameter.public ComponentAstBuilder withAnnotation(String name, Object value)
ComponentAstBuilderwithAnnotation in interface ComponentAstBuildervalue - the value of the annotation.public BaseComponentAstBuilder<B> withParameter(org.mule.runtime.api.meta.model.parameter.ParameterModel paramModel, org.mule.runtime.api.meta.model.parameter.ParameterGroupModel parameterGroupModel, ComponentParameterAst paramValue, Optional<org.mule.runtime.api.component.ComponentIdentifier> paramIdentifier)
public BaseComponentAstBuilder<B> withParameter(org.mule.runtime.api.meta.model.parameter.ParameterModel paramModel, org.mule.runtime.api.meta.model.parameter.ParameterGroupModel parameterGroupModel, ComponentParameterAst paramValue, Iterable<org.mule.runtime.api.component.ComponentIdentifier> paramIdentifiers)
protected void prepareForBuild()
protected void removeParamChild(org.mule.runtime.api.meta.model.parameter.ParameterModel paramModel,
org.mule.runtime.api.meta.model.parameter.ParameterGroupModel parameterGroupModel)
protected void doRemoveParamChild(org.mule.runtime.api.component.ComponentIdentifier componentIdentifier)
protected Map<org.mule.runtime.api.util.Pair<org.mule.runtime.api.meta.model.parameter.ParameterModel,org.mule.runtime.api.meta.model.parameter.ParameterGroupModel>,ComponentParameterAst> createParameterAsts()
public ComponentAstBuilder withExtensionModel(org.mule.runtime.api.meta.model.ExtensionModel extensionModel)
extensionModel - the extension that declares the model that represents this compoennt.protected org.mule.runtime.api.meta.model.ExtensionModel getExtensionModel()
public ComponentAstBuilder withComponentModel(org.mule.runtime.api.meta.model.ComponentModel componentModel)
This method is exclusive with withNestableElementModel(NestableElementModel),
withConfigurationModel(ConfigurationModel), withConnectionProviderModel(ConnectionProviderModel) and
withParameterizedModel(ParameterizedModel); only one of these may be called for a single builder.
componentModel - the model that represents this component.public ComponentAstBuilder withNestableElementModel(org.mule.runtime.api.meta.model.nested.NestableElementModel nestableElementModel)
This method is exclusive with withComponentModel(ComponentModel),
withConfigurationModel(ConfigurationModel), withConnectionProviderModel(ConnectionProviderModel) and
withParameterizedModel(ParameterizedModel); only one of these may be called for a single builder.
nestableElementModel - the model that represents this component.public ComponentAstBuilder withConfigurationModel(org.mule.runtime.api.meta.model.config.ConfigurationModel configurationModel)
This method is exclusive with withComponentModel(ComponentModel),
withNestableElementModel(NestableElementModel), withConnectionProviderModel(ConnectionProviderModel) and
withParameterizedModel(ParameterizedModel); only one of these may be called for a single builder.
configurationModel - the model that represents this component.public ComponentAstBuilder withConnectionProviderModel(org.mule.runtime.api.meta.model.connection.ConnectionProviderModel connectionProviderModel)
This method is exclusive with withComponentModel(ComponentModel),
withNestableElementModel(NestableElementModel), withConfigurationModel(ConfigurationModel) and
withParameterizedModel(ParameterizedModel); only one of these may be called for a single builder.
connectionProviderModel - the model that represents this component.public BaseComponentAstBuilder<B> withParameterizedModel(org.mule.runtime.api.meta.model.parameter.ParameterizedModel parameterizedModel)
This method is exclusive with withComponentModel(ComponentModel),
withNestableElementModel(NestableElementModel), withConfigurationModel(ConfigurationModel) and
withConnectionProviderModel(ConnectionProviderModel); only one of these may be called for a single builder.
withParameterizedModel in interface ComponentAstBuilderparameterizedModel - the model that represents this component.protected void validateSingleModelSet()
public org.mule.metadata.api.model.MetadataType getType()
public ComponentAstBuilder withMetadata(ComponentMetadataAst metadata)
withMetadata in interface ComponentAstBuildermetadata - the parser metadata for this component.public ComponentMetadataAst getMetadata()
public ComponentAstBuilder withLocation(org.mule.runtime.api.component.location.ComponentLocation location)
location - the location of the component in the configuration.public ComponentAstBuilder withComponentType(org.mule.runtime.api.component.TypedComponentIdentifier.ComponentType componentType)
componentType - a general typification of the role of this component.public org.mule.runtime.api.component.TypedComponentIdentifier.ComponentType getComponentType()
public ComponentAstBuilder withIdentifier(org.mule.runtime.api.component.ComponentIdentifier identifier)
withIdentifier in interface ComponentAstBuilderidentifier - the identifier for the configuration element this object represents.public org.mule.runtime.api.component.ComponentIdentifier getIdentifier()
public org.mule.runtime.api.component.location.ComponentLocation getLocation()
public DefaultComponentGenerationInformation.Builder getGenerationInformation()
protected Optional<String> resolveComponentId(Map<org.mule.runtime.api.util.Pair<org.mule.runtime.api.meta.model.parameter.ParameterModel,org.mule.runtime.api.meta.model.parameter.ParameterGroupModel>,ComponentParameterAst> parameterAsts)
protected PropertiesResolver getPropertiesResolver()
Copyright © 2022 MuleSoft, Inc.. All rights reserved.