Package com.xebialabs.deployit.plugin.api.flow

## Interface ExecutionContext

-     public interface ExecutionContext

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.Object` | `getAttribute​(java.lang.String name)` | Returns the execution context attribute with the given name, or `null` if there is no attribute by that name.
    `InspectionContext` | `getInspectionContext()` | The link to the context of discovered CIs.
    `default java.lang.String` | `getMessage​(com.xebialabs.deployit.local.message.ProductName productName, java.lang.String key, java.lang.Object... args)` | Try to resolve the message.
    `Repository` | `getRepository()` | Returns the repository where all the ConfigurationItems known in XL Deploy are stored.
    `ITask` | `getTask()` | Returns the task of the current execution context.
    `void` | `logError​(java.lang.String error)` | Logs a line with a new line ending of error output.
    `void` | `logError​(java.lang.String error, java.lang.Throwable t)` | Logs a line with an new line mark ending and an exception to the error output .
    `default void` | `logErrorRaw​(java.lang.String error)` | Logs a line of error output.
    `default void` | `logMsgOutput​(com.xebialabs.deployit.local.message.ProductName productName, java.lang.String key, java.lang.Object... args)` | Get the logs line from message handler with the help of key and logs a line.
    `void` | `logOutput​(java.lang.String output)` | Logs a line with new line ending of output.
    `default void` | `logOutputRaw​(java.lang.String output)` | Logs a line of output.
    `void` | `setAttribute​(java.lang.String name, java.lang.Object value)` | Stores an attribute in the execution context.

- - ### Method Detail

    - #### logOutput

          void logOutput​(java.lang.String output)

      Logs a line with new line ending of output. If this step is executing a command, this would be the output that is sent to the `standard output stream`.
      Parameters:
        `output` - the log line to be written.

    - #### logMsgOutput

          default void logMsgOutput​(com.xebialabs.deployit.local.message.ProductName productName,
                                    java.lang.String key,
                                    java.lang.Object... args)

      Get the logs line from message handler with the help of key and logs a line. If this step is executing a command, this would be the output that is sent to the `standard output stream`.
      Parameters:
        `productName` - Deploy or Release
        `key` - Localization key
        `args` - sequence of object required.

    - #### logOutputRaw

          default void logOutputRaw​(java.lang.String output)

      Logs a line of output. If this step is executing a command, this would be the output that is sent to the `standard output stream`.
      Parameters:
        `output` - the log line to be written.

    - #### getMessage

          default java.lang.String getMessage​(com.xebialabs.deployit.local.message.ProductName productName,
                                              java.lang.String key,
                                              java.lang.Object... args)

      Try to resolve the message. Treat as an error if the message can't be found.
      Parameters:
        `productName` - Deploy or Release
        `key` - the message code to look up, e.g. 'command.nostep'.
        `args` - an array of arguments that will be filled in for params within the message (params look like "{0}", "{1,date}", "{2,time}" within a message), or `null` if none
      Returns:
        the resolved message (never `null`)

    - #### logError

          void logError​(java.lang.String error)

      Logs a line with a new line ending of error output. If this step is executing a command, this would be the output that is sent to the `standard error stream`.
      Parameters:
        `error` - the error line to be written.

    - #### logErrorRaw

          default void logErrorRaw​(java.lang.String error)

      Logs a line of error output. If this step is executing a command, this would be the output that is sent to the `standard error stream`.
      Parameters:
        `error` - the error line to be written.

    - #### logError

          void logError​(java.lang.String error,
                        java.lang.Throwable t)

      Logs a line with an new line mark ending and an exception to the error output .
      Parameters:
        `error` - the error to be written.
        `t` - the exception to be logged too

    - #### getAttribute

          java.lang.Object getAttribute​(java.lang.String name)

      Returns the execution context attribute with the given name, or `null` if there is no attribute by that name.
      Parameters:
        `name` - the name of the attribute
      Returns:
        the value of the attribute, or `null` if there is no attribute by that name.

    - #### setAttribute

          void setAttribute​(java.lang.String name,
                            java.lang.Object value)

      Stores an attribute in the execution context. This attribute will be available while the deployment plan is executing, until it is stopped or finished.
      Parameters:
        `name` - the name of the attribute
        `value` - the value of the attribute

    - #### getRepository

          Repository getRepository()

      Returns the repository where all the ConfigurationItems known in XL Deploy are stored. Note: The repository cannot be stored in a step, as it is not Serializable.
      Returns:
        the repository

    - #### getInspectionContext

          InspectionContext getInspectionContext()

      The link to the context of discovered CIs.
      Returns:

    - #### getTask

          ITask getTask()

      Returns the task of the current execution context.
      Returns:
        the task