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 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

      <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.

      When using the right part returned by this method for a parameter that is a complex object defined inline, the definition of the object will be returned (a ComponentAst), 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,T>> getValueOrResolutionError()
      Returns either the expression for this parameter, a ParameterResolutionException occurred 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 the left and the right,right returned 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. Use getResolvedRawValue() or getValue() 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. Use getRawValue() 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

      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()
      Returns true if this is a default parameter; returns false otherwise.
      Returns:
      true if and only if this is a default parameter