com.microfocus.awm.model.toolexecution

## Interface IToolContext

- All Superinterfaces:
    IDynamicObject
  All Known Subinterfaces:
    IMassProcessingSubContext, IMassProcessingToolContext
  All Known Implementing Classes:
    AbstractToolContext, LegacyToolExecutorContext, MassProcessingSubContext, MassProcessingToolContext, SingleProcessingToolContext

      public interface IToolContext
      extends IDynamicObject

  A tool context is a modeled `ToolDescriptor` processed by AWM using the current `IExecutionContext`. It provides access to information a tool executor needs at execution time.

  The tool context offers easy access to:

  - Relevant input parameter values.
  - Modeled tool descriptor and input/output parameter attributes.
  - Relevant modeled output parameters.
  - The modeled ToolDescriptor and its related `FunctionPackage`.

  A tool context does not necessarily contain all modeled input parameters and output parameters. This is dependent of the context type, tool executor mass processing support, and mass processing flags in the model (`ActionDescriptor` and `RToolParameter`).

  More specific getter methods for parameters are provided by `ToolUtility`.

  Author:
    Micro Focus

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `IExecutionContext` | `getExecutionContext()` Gets the `IExecutionContext` of the currently executed action.
    `IFunctionPackage` | `getFunctionPackage()` Gets the function package instance which defines the `ToolDescriptor` type.
    `java.util.List<IToolInputParameter>` | `getInputParameters()` Gets all input parameters of the tool context.
    `java.util.Collection<IToolInputParameter>` | `getInputParameters(java.lang.String pName)` Gets all input parameters of the tool context with the specified name.
    `ToolDescriptor` | `getModelObject()` Gets the model object.
    `java.util.List<IModeledToolOutputParameter>` | `getOutputParameters()` Gets all output parameters of the tool context.
    `java.util.Collection<IModeledToolOutputParameter>` | `getOutputParameters(java.lang.String pName)` Gets all output parameters of the tool context with the specified name.

    - ### Methods inherited from interface com.microfocus.awm.model.toolexecution.IDynamicObject

      `getAttributes, getAttributeValue, getComplexAttributes`

- - ### Method Detail

    - #### getExecutionContext

          IExecutionContext getExecutionContext()

      Gets the `IExecutionContext` of the currently executed action.
      Returns:
        the execution context

    - #### getFunctionPackage

          IFunctionPackage getFunctionPackage()

      Gets the function package instance which defines the `ToolDescriptor` type.
      Returns:
        the function package instance or `null` if it doesn't exist in the model

    - #### getInputParameters

          java.util.List<IToolInputParameter> getInputParameters()

      Gets all input parameters of the tool context.

      See `ToolUtility` for more methods to obtain specific input parameters.

      Returns:
        all modeled input parameters
      See Also:
        `IToolInputParameter`

    - #### getInputParameters

          java.util.Collection<IToolInputParameter> getInputParameters(java.lang.String pName)

      Gets all input parameters of the tool context with the specified name.

      The name can either be the parameter's `id` attribute of the `toolType` extension or the fully qualified `id`, starting with the function package ID and ending with the parameter `id`.

      See `ToolUtility` for more methods to obtain specific input parameters.

      Parameters:
        `pName` - name of the desired parameter(s)
      Returns:
        a collection of all parameters with the given name

    - #### getOutputParameters

          java.util.List<IModeledToolOutputParameter> getOutputParameters()

      Gets all output parameters of the tool context.

      See `ToolUtility` for more methods to obtain specific output parameters.

      Returns:
        all modeled output parameters
      See Also:
        `IModeledToolOutputParameter`

    - #### getOutputParameters

          java.util.Collection<IModeledToolOutputParameter> getOutputParameters(java.lang.String pName)

      Gets all output parameters of the tool context with the specified name.

      The name can either be the parameter's `id` attribute of the `toolType` extension or the fully qualified `id`, starting with the function package ID and ending with the parameter `id`.

      See `ToolUtility` for more methods to obtain specific output parameters.

      Parameters:
        `pName` - name of the desired parameter(s)
      Returns:
        a collection of all parameters with the given name

    - #### getModelObject

          ToolDescriptor getModelObject()

      Description copied from interface: `IDynamicObject`
      Gets the model object.
      Specified by:
        `getModelObject` in interface `IDynamicObject`
      Returns:
        the model object

Copyright © 2015 Micro Focus GmbH. All rights reserved.