com.microfocus.awm.control.toolexecution

## Class ToolOutput

- java.lang.Object
- - com.microfocus.awm.control.toolexecution.ToolOutput

- All Implemented Interfaces:
    IToolOutput

      public class ToolOutput
      extends java.lang.Object
      implements IToolOutput

  Standard `IToolOutput` implementation. Provides different constructors as well as Setter methods for defining the tool output.
  Author:
    Micro Focus

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ToolOutput()` Creates an empty tool output.
    `ToolOutput(java.util.List<IToolOutputParameter> pOutputParameters)` Creates a tool output only containing output parameters.
    `ToolOutput(java.util.List<IToolOutputParameter> pOutputParameters, java.util.List<IMassOutputEntry> pMassOutput)` Creates a tool output containing output parameters and a mass output.
    `ToolOutput(java.util.List<IToolOutputParameter> pOutputParameters, java.util.List<IMassOutputEntry> pMassOutput, java.util.List<IResourceOperation> pResourceOperations, java.util.List<IValidationMessage> pValidationMessages)` Creates a tool output containing output parameters, a mass output, resource operations and validation messages.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addOutputParameter(IToolOutputParameter pToolOutputParameter, IToolContext pToolContext)` Adds an output parameter to the tool output.
    `java.util.List<IMassOutputEntry>` | `getMassOutput()` Gets mass output parameters returned by the tool.
    `java.util.List<IToolOutputParameter>` | `getOutputParameters()` Gets output parameters returned by the tool.
    `java.util.List<IResourceOperation>` | `getResourceOperations()` Gets resource operations created by the tool.
    `java.util.List<IValidationMessage>` | `getValidationMessages()` Returns validation messages returned by the tool.
    `void` | `setMassOutput(java.util.List<IMassOutputEntry> pMassOutput)` Sets the mass output.
    `void` | `setOutputParameters(java.util.List<IToolOutputParameter> pOutputParameters)` Sets the list of output parameters.
    `void` | `setResourceOperations(java.util.List<IResourceOperation> pResourceOperations)` Sets the list of resource operations.
    `void` | `setValidationMessages(java.util.List<IValidationMessage> pValidationMessages)` Sets a list of validation messages.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ToolOutput

          public ToolOutput()

      Creates an empty tool output.

    - #### ToolOutput

          public ToolOutput(java.util.List<IToolOutputParameter> pOutputParameters)

      Creates a tool output only containing output parameters.
      Parameters:
        `pOutputParameters` - a list of output parameters. Can be `null`.

    - #### ToolOutput

          public ToolOutput(java.util.List<IToolOutputParameter> pOutputParameters,
                            java.util.List<IMassOutputEntry> pMassOutput)

      Creates a tool output containing output parameters and a mass output.
      Parameters:
        `pOutputParameters` - single-processing output parameters. Can be `null`.
        `pMassOutput` - mass-processing output parameters. Can be `null`.

    - #### ToolOutput

          public ToolOutput(java.util.List<IToolOutputParameter> pOutputParameters,
                            java.util.List<IMassOutputEntry> pMassOutput,
                            java.util.List<IResourceOperation> pResourceOperations,
                            java.util.List<IValidationMessage> pValidationMessages)

      Creates a tool output containing output parameters, a mass output, resource operations and validation messages.
      Parameters:
        `pOutputParameters` - single-processing output parameters. Can be `null`.
        `pMassOutput` - mass-processing output parameters. Can be `null`.
        `pResourceOperations` - tool-defined resource operations. Can be `null`.
        `pValidationMessages` - validation messages. Can be `null`.

  - ### Method Detail

    - #### addOutputParameter

          public void addOutputParameter(IToolOutputParameter pToolOutputParameter,
                                         IToolContext pToolContext)

      Adds an output parameter to the tool output.

      If the given tool context is a sub-context of an `IMassProcessingToolContext`, this method will add it to the appropriate `IMassOutputEntry`.

      Parameters:
        `pToolOutputParameter` - the parameter to be added
        `pToolContext` - the corresponding tool context

    - #### getOutputParameters

          public java.util.List<IToolOutputParameter> getOutputParameters()

      Description copied from interface: `IToolOutput`
      Gets output parameters returned by the tool. Returned parameter values are accessible by subsequent tools (through input parameters with `Parameter From` = `EParmFromTypes.PREVIOUS_TOOL`) and are used for resource operations set in the tool descriptor.

      The returned list only contains single-processing output parameters. Mass-output parameters must be returned via `IMassOutputEntry`s (see `IToolOutput.getMassOutput()`).

      Returned file output parameters can also be processed by AWM, if an element list should be created.

      Specified by:
        `getOutputParameters` in interface `IToolOutput`
      Returns:
        returned tool output parameters. Can be empty.

    - #### getMassOutput

          public java.util.List<IMassOutputEntry> getMassOutput()

      Description copied from interface: `IToolOutput`
      Gets mass output parameters returned by the tool.
      Specified by:
        `getMassOutput` in interface `IToolOutput`
      Returns:
        the tool's mass output parameters. Can be empty.

    - #### getResourceOperations

          public java.util.List<IResourceOperation> getResourceOperations()

      Description copied from interface: `IToolOutput`
      Gets resource operations created by the tool. Resource operations can update, insert or delete AWM elements in the application to reflect changes a tool has made in the real application.

      Returned operations are only processed if the `Resource Processing` attribute of the executed tool descriptor is set to `EResourceProcessingTypes.TOOLDEFINED`. Otherwise they will be ignored.

      Specified by:
        `getResourceOperations` in interface `IToolOutput`
      Returns:
        a list of tool-defined resource operations. Can be empty.

    - #### getValidationMessages

          public java.util.List<IValidationMessage> getValidationMessages()

      Description copied from interface: `IToolOutput`
      Returns validation messages returned by the tool.

      By default, validation messages can only be displayed in AWM modeled dialogs, when the tool was executed as part of an Open Modeled Dialog Validation Action.

      Specified by:
        `getValidationMessages` in interface `IToolOutput`
      Returns:
        validation messages returned by the tool. Can be empty.

    - #### setOutputParameters

          public void setOutputParameters(java.util.List<IToolOutputParameter> pOutputParameters)

      Sets the list of output parameters.
      Parameters:
        `pOutputParameters` - the output parameters to set. Must not be `null`.

    - #### setResourceOperations

          public void setResourceOperations(java.util.List<IResourceOperation> pResourceOperations)

      Sets the list of resource operations.
      Parameters:
        `pResourceOperations` - the resource operations to set. Must not be `null`.

    - #### setValidationMessages

          public void setValidationMessages(java.util.List<IValidationMessage> pValidationMessages)

      Sets a list of validation messages.
      Parameters:
        `pValidationMessages` - the validation messages to set. Must not be `null`.

    - #### setMassOutput

          public void setMassOutput(java.util.List<IMassOutputEntry> pMassOutput)

      Sets the mass output.
      Parameters:
        `pMassOutput` - the mass output to set. Must not be `null`.

Copyright © 2015 Micro Focus GmbH. All rights reserved.