Interface ExecutionContext<M extends org.mule.runtime.api.meta.model.ComponentModel>

Type Parameters:
M - the generic type of of the model which represents the component beign executed

@NoImplement public interface ExecutionContext<M extends org.mule.runtime.api.meta.model.ComponentModel>
Provides context information about the execution of a modeled component
Since:
1.0
  • Method Details

    • hasParameter

      boolean hasParameter(String parameterName)
      Returns whether parameter of name parameterName has a value associated to it.
      Parameters:
      parameterName - the name of a ParameterModel of the ComponentModel being executed
      Returns:
      true if the parameter is present.
    • getParameter

      <T> T getParameter(String parameterName)
      Returns the value associated to a parameter of name parameterName
      Type Parameters:
      T - the returned value's generic type
      Parameters:
      parameterName - the name of a ParameterModel of the ComponentModel being executed
      Returns:
      the parameter's value or null. Notice that null means that the parameter has been resolved to that value.
      Throws:
      NoSuchElementException - if the parameter is not present.
    • getParameterOrDefault

      <T> T getParameterOrDefault(String parameterName, T defaultValue)
      Returns the value associated to a parameter of name parameterName or defaultValue if such parameter is not present.
      Type Parameters:
      T - the returned value's generic type
      Parameters:
      parameterName - the name of a ParameterModel of the ComponentModel being executed
      defaultValue - the default value to return in case the parameter is not present
      Returns:
      Since:
      1.3.0
    • getParameters

      Map<String,Object> getParameters()
      Returns an immutable map containing all the parameters associated with this execution. The keys are the parameter names and the values are... well, the values.

      It is guaranteed that whatever value returned in this map will be the exact same as invoking getParameter(String) with the same key, no matter how many times invoked nor in which order.

      Returns:
      an immutable Map with all the parameters
    • getConfiguration

      Optional<ConfigurationInstance> getConfiguration()
      Returns the ConfigurationInstance for the operation being executed.
      Returns:
      a ConfigurationInstance consistent with a corresponding ConfigurationModel
    • getExtensionModel

      org.mule.runtime.api.meta.model.ExtensionModel getExtensionModel()
      Returns:
      the ExtensionModel which owns the getComponentModel()
    • getComponentModel

      M getComponentModel()
      Returns:
      the model for the component being executed