com.microfocus.awm.core

## Class ToolExecutionStatus

- java.lang.Object
- - com.microfocus.awm.core.ToolExecutionStatus

-     public class ToolExecutionStatus
      extends java.lang.Object

  The result of an executed AWM tool.

  Contains:

  - The name of the tool
  - A readable tool message
  - The returncode of the tool
  - All the tool's resource operations

  The return code is important to decide whether AWM should execute the next tool in the sequence of an ActionDescriptor or abort the action with an exception.

  Author:
    Micro Focus
  See Also:
    `IToolExecutor`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ToolExecutionStatus(java.lang.String pToolName, int pToolRc)` Creates a new ToolExecutionStatus without a message.
    `ToolExecutionStatus(java.lang.String pToolName, int pToolRc, java.lang.String pToolMsg)` Creates a new ToolExecutionStatus with a message.
    `ToolExecutionStatus(java.lang.String pToolName, int pToolRc, java.lang.String pToolMsg, java.util.List<ResourceOperation> pResOps)` Creates a new ToolExecutionStatus with a message and resource operations (see `ResourceOperation`).
    `ToolExecutionStatus(java.lang.String pToolName, int pToolRc, java.lang.String pToolMsg, java.util.List<ResourceOperation> pResOps, java.util.Map<Property,IPropertyValue> pParmMap)` Creates a new ToolExecutionStatus with a message and resource operations (see `ResourceOperation`).

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.List<java.util.Map<Property,IPropertyValue>>` | `getMassOutputParameters()`
    `java.util.Map<Property,IPropertyValue>` | `getOutputParameters()`
    `java.util.List<ResourceOperation>` | `getResourceOperations()`
    `ToolDescriptor` | `getToolDescriptor()` Gets the `ToolDescriptor` which returned the execution status.
    `java.lang.String` | `getToolMsg()`
    `java.lang.String` | `getToolName()`
    `int` | `getToolRC()`
    `java.util.List<ValidateMessage>` | `getValidateMessages()` Deprecated. validation messages are now returned by `IToolResult` and can be obtained via `IToolOutput.getValidationMessages()` or `ActionExecutor.getAllValidationMessages(IAction)`
    `boolean` | `isProcessed()` Gets the "processed" flag of the execution status.
    `void` | `putOutputParameter(Property pProp, java.lang.String pValue)` Puts a single output parameter in the ToolExecutionStatus.
    `void` | `putResourceOperation(ResourceOperation pResOp)` Adds a new ResourceOperation.
    `boolean` | `resourceOperationErrorsOccurred()`
    `void` | `setMassOutputParameters(java.util.List<java.util.Map<Property,IPropertyValue>> pMassOutParms)` Sets all mass output parameters of the tool.
    `void` | `setOutputParameters(java.util.Map<Property,IPropertyValue> pOutParms)` Sets all output parameters of the tool.
    `void` | `setProcessed(boolean pProcessed)` Set the "processed" flag of this tool execution status.
    `void` | `setresourceOperationErrorsOccurred(boolean pErrorsOccurred)`
    `void` | `setResourceOperations(java.util.List<ResourceOperation> pResOperations)`
    `void` | `setToolDescriptor(ToolDescriptor pToolDescriptor)` Sets the `ToolDescriptor` which returned the status.
    `void` | `setToolMsg(java.lang.String pToolMsg)` Sets the tool message in the ToolExecutionStatus.
    `void` | `setValidateMessages(java.util.List<ValidateMessage> pValidateMessages)` Deprecated. Use `IToolResult` instead to return validation messages.
    `java.lang.String` | `toString()`

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

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

- - ### Constructor Detail

    - #### ToolExecutionStatus

          public ToolExecutionStatus(java.lang.String pToolName,
                                     int pToolRc)

      Creates a new ToolExecutionStatus without a message.
      Parameters:
        `pToolName` - The name of the executed tool
        `pToolRc` - The return code of the executed tool

    - #### ToolExecutionStatus

          public ToolExecutionStatus(java.lang.String pToolName,
                                     int pToolRc,
                                     java.lang.String pToolMsg)

      Creates a new ToolExecutionStatus with a message.
      Parameters:
        `pToolName` - The name of the executed tool
        `pToolRc` - The return code of the executed tool
        `pToolMsg` - A readable message which describes the tool execution

    - #### ToolExecutionStatus

          public ToolExecutionStatus(java.lang.String pToolName,
                                     int pToolRc,
                                     java.lang.String pToolMsg,
                                     java.util.List<ResourceOperation> pResOps)

      Creates a new ToolExecutionStatus with a message and resource operations (see `ResourceOperation`).
      Parameters:
        `pToolName` - The name of the executed tool
        `pToolRc` - The return code of the executed tool
        `pToolMsg` - A readable message which describes the tool execution
        `pResOps` - The resource operations of the tool, if there were some

    - #### ToolExecutionStatus

          public ToolExecutionStatus(java.lang.String pToolName,
                                     int pToolRc,
                                     java.lang.String pToolMsg,
                                     java.util.List<ResourceOperation> pResOps,
                                     java.util.Map<Property,IPropertyValue> pParmMap)

      Creates a new ToolExecutionStatus with a message and resource operations (see `ResourceOperation`).
      Parameters:
        `pToolName` - The name of the executed tool.
        `pToolRc` - The return code of the executed tool.
        `pToolMsg` - A readable message which describes the tool execution.
        `pResOps` - The resource operations of the tool. Can be `null` or an empty list.
        `pParmMap` - The output parameters of the executed tool.

  - ### Method Detail

    - #### getToolMsg

          public java.lang.String getToolMsg()

      Returns:
        the message of the tool.

    - #### setToolMsg

          public void setToolMsg(java.lang.String pToolMsg)

      Sets the tool message in the ToolExecutionStatus.
      Parameters:
        `pToolMsg` - the message of the tool.

    - #### getToolName

          public java.lang.String getToolName()

      Returns:
        the name of the tool

    - #### getToolRC

          public int getToolRC()

      Returns:
        the return code of the tool

    - #### getResourceOperations

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

      Returns:
        the resource operations of the executed tool

    - #### setResourceOperations

          public void setResourceOperations(java.util.List<ResourceOperation> pResOperations)

      Parameters:
        `pResOperations` - the resource operations to be set

    - #### putResourceOperation

          public void putResourceOperation(ResourceOperation pResOp)

      Adds a new ResourceOperation.
      Parameters:
        `pResOp` - the ResourceOperation to add

    - #### getOutputParameters

          public java.util.Map<Property,IPropertyValue> getOutputParameters()

      Returns:
        the output parameters of the tool.

    - #### setOutputParameters

          public void setOutputParameters(java.util.Map<Property,IPropertyValue> pOutParms)

      Sets all output parameters of the tool.
      Parameters:
        `pOutParms` - Map with Properties and their corresponding PropertyValues.

    - #### getMassOutputParameters

          public java.util.List<java.util.Map<Property,IPropertyValue>> getMassOutputParameters()

      Returns:
        the mass output parameters of the tool.

    - #### setMassOutputParameters

          public void setMassOutputParameters(java.util.List<java.util.Map<Property,IPropertyValue>> pMassOutParms)

      Sets all mass output parameters of the tool.
      Parameters:
        `pMassOutParms` - Map with Properties and their corresponding PropertyValues.

    - #### putOutputParameter

          public void putOutputParameter(Property pProp,
                                         java.lang.String pValue)

      Puts a single output parameter in the ToolExecutionStatus.
      Parameters:
        `pProp` - The Property of the output parameter
        `pValue` - The value of the output parameter

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### setProcessed

          public void setProcessed(boolean pProcessed)

      Set the "processed" flag of this tool execution status. This can be done e.g. after the execution status was displayed in a dialog. Will not change the status other than setting the processed flag to `true`.
      Parameters:
        `pProcessed` - the "processed" flag.
      See Also:
        `isProcessed()`

    - #### isProcessed

          public boolean isProcessed()

      Gets the "processed" flag of the execution status. If it is `true` this usually means that the execution status was already processed in a way (e.g. shown in a dialog).
      Returns:
        the "processed" flag.

    - #### resourceOperationErrorsOccurred

          public boolean resourceOperationErrorsOccurred()

      Returns:
        whether resource operation errors occurred during tool execution.

    - #### setresourceOperationErrorsOccurred

          public void setresourceOperationErrorsOccurred(boolean pErrorsOccurred)

      Parameters:
        `pErrorsOccurred` - whether resource operation errors occurred
      See Also:
        `resourceOperationErrorsOccurred()`

    - #### getValidateMessages

          @Deprecated
          public java.util.List<ValidateMessage> getValidateMessages()

      Deprecated. validation messages are now returned by `IToolResult` and can be obtained via `IToolOutput.getValidationMessages()` or `ActionExecutor.getAllValidationMessages(IAction)`
      Gets the validate messages which were set in the execution status.
      Returns:
        the validate messages

    - #### setValidateMessages

          @Deprecated
          public void setValidateMessages(java.util.List<ValidateMessage> pValidateMessages)

      Deprecated. Use `IToolResult` instead to return validation messages.
      Sets validate messages of this execution status. Clients can use this to support validation within custom tools/plug-ins.
      Parameters:
        `pValidateMessages` - the validate messages

    - #### getToolDescriptor

          public ToolDescriptor getToolDescriptor()

      Gets the `ToolDescriptor` which returned the execution status.
      Returns:
        the tool descriptor or `null` if the tool execution status has not been returned by an `IToolExecutor` executed by the `ActionExecutor`

    - #### setToolDescriptor

          public void setToolDescriptor(ToolDescriptor pToolDescriptor)

      Sets the `ToolDescriptor` which returned the status. This should not be called by clients, since it's done internally after the `ActionExecutor` executed the tool.
      Parameters:
        `pToolDescriptor` - the tool descriptor to set

Copyright © 2015 Micro Focus GmbH. All rights reserved.