Package org.mule.runtime.ast.api
Interface ComponentParameterAst
- All Known Implementing Classes:
BaseComponentParameterAstDecorator
@NoImplement
public interface ComponentParameterAst
Represents the user configuration of a parameter of a component.
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionorg.mule.runtime.api.meta.model.parameter.ParameterGroupModelorg.mule.runtime.api.meta.model.parameter.ParameterModelgetModel()This method WILL NOT resolve any property placeholders to the actual values if present.This method WILL resolve any property placeholders to the actual values if present.<T> org.mule.runtime.api.functional.Either<String,T> getValue()Returns either the expression for this parameter or a fixed value, depending on what is set in the DSL.<T> org.mule.runtime.api.functional.Either<String,org.mule.runtime.api.functional.Either<ParameterResolutionException, T>> Returns either the expression for this parameter, aParameterResolutionExceptionoccurred while converting the value to its expected type, a fixed value, depending on what is set in the DSL.booleanReturnstrueif this is a default parameter; returnsfalseotherwise.
-
Method Details
-
getModel
org.mule.runtime.api.meta.model.parameter.ParameterModel getModel()- Returns:
- the model that represents this parameter.
-
getGroupModel
org.mule.runtime.api.meta.model.parameter.ParameterGroupModel getGroupModel()- Returns:
- the group model that contains the represented parameter or
null.
-
getValue
Returns either the expression for this parameter or a fixed value, depending on what is set in the DSL.When using the
rightpart returned by this method for a parameter that is a complex object defined inline, the definition of the object will be returned (aComponentAst), not the object itself.- Returns:
- the value of the parameter, or its default value if there is one defined and the parameter is not set in the DSL.
- Throws:
ParameterResolutionException- if an error occurs converting a fixed value to the type of the parameter declaration.
-
getValueOrResolutionError
<T> org.mule.runtime.api.functional.Either<String,org.mule.runtime.api.functional.Either<ParameterResolutionException, getValueOrResolutionError()T>> Returns either the expression for this parameter, aParameterResolutionExceptionoccurred while converting the value to its expected type, a fixed value, depending on what is set in the DSL.Refer to
getValue()for details on theleftand theright,rightreturned value.- Returns:
- the value of the parameter, or a ParameterResolutionException if an error occurred converting a fixed value to the type of the parameter declaration.
- Since:
- 1.1
-
getRawValue
String getRawValue()This method WILL NOT resolve any property placeholders to the actual values if present. UsegetResolvedRawValue()orgetValue()if properties resolution is needed.- Returns:
- the value of the parameter as defined in the DSL.
-
getResolvedRawValue
String getResolvedRawValue()This method WILL resolve any property placeholders to the actual values if present. UsegetRawValue()if properties resolution is not wanted.Property placeholders resolution is done with the object given to
ArtifactAst.updatePropertiesResolver(java.util.function.UnaryOperator).- Returns:
- the value of the parameter as defined in the DSL and its property placeholders resolved.
-
getMetadata
Optional<ComponentMetadataAst> getMetadata()- Returns:
- the parser metadata for this parameter if it is defined as a nested component, or
Optional.empty()otherwise.
-
getGenerationInformation
ComponentGenerationInformation getGenerationInformation()- Returns:
- an object containing information about the generation of this parameter.
-
isDefaultValue
boolean isDefaultValue()Returnstrueif this is a default parameter; returnsfalseotherwise.- Returns:
- true if and only if this is a default parameter
-