com.microfocus.awm.model

## Interface ISystemUtilities

-     public interface ISystemUtilities

  The basic Interface for accessing remote systems including sending TSO commands and receiving command results.
  Author:
    Micro Focus

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `disconnectSystem(ISystemImage pZosSystem, org.eclipse.core.runtime.IProgressMonitor pMon)` Disconnect a connected system.
    `java.util.List<ISystemImage>` | `getActivezOSSystems()` Get all defined z/OS system within the IDz client, which are currently connected to zOS.
    `java.util.List<ISystemImage>` | `getAllzOSSystems()` Get all defined z/OS system within the AWM client.
    `java.lang.String` | `getLastResult(java.lang.String pEncodingCharset)` Returns the output of the last sent command.
    `java.util.List<java.lang.String>` | `getLastResultLines(java.lang.String pEncodingCharset)` Returns the output of the last command line per line.
    `ISystemImage` | `getSystemFromName(java.lang.String pRemoteSystemName)`
    `java.lang.String` | `getUserID()` Gets the remote user ID.
    `boolean` | `sendHostCommand(ISystemImage pSI, java.lang.String pCommand, org.eclipse.core.runtime.IProgressMonitor pMonitor)` Executes a command on the selected remote system.
    `boolean` | `startDialogProcess(ISystemImage pSI, java.lang.String pCommand, ToolDescriptor pTool, IExecutionContext pContext, org.eclipse.core.runtime.IProgressMonitor pMonitor)` Starts an ISPF dialog application on the given remote system.

- - ### Method Detail

    - #### getAllzOSSystems

          java.util.List<ISystemImage> getAllzOSSystems()

      Get all defined z/OS system within the AWM client.
      Returns:
        list of all systems.

    - #### getActivezOSSystems

          java.util.List<ISystemImage> getActivezOSSystems()

      Get all defined z/OS system within the IDz client, which are currently connected to zOS.
      Returns:
        List of all connected systems.

    - #### disconnectSystem

          void disconnectSystem(ISystemImage pZosSystem,
                                org.eclipse.core.runtime.IProgressMonitor pMon)
                         throws TaurusCoreException

      Disconnect a connected system.
      Parameters:
        `pZosSystem` - zOS System
        `pMon` - progress monitor
      Throws:
        `TaurusCoreException` - if disconnecting the system fails

    - #### startDialogProcess

          boolean startDialogProcess(ISystemImage pSI,
                                     java.lang.String pCommand,
                                     ToolDescriptor pTool,
                                     IExecutionContext pContext,
                                     org.eclipse.core.runtime.IProgressMonitor pMonitor)
                              throws java.io.IOException,
                                     TaurusCoreException

      Starts an ISPF dialog application on the given remote system.
      Parameters:
        `pSI` - z/OS system where the dialog application is started
        `pCommand` - Name of the dialog REXX to be executed
        `pTool` - the tool describing the dialog to be executed
        `pContext` - execution context
        `pMonitor` - progress monitor or `null`
      Returns:
        `true`, if the command was successfully executed
      Throws:
        `java.io.IOException` - I/O error while communicating with the remote system
        `TaurusCoreException` - if the `ISystemImage` is not supported by the `ISystemUtilities`

    - #### sendHostCommand

          boolean sendHostCommand(ISystemImage pSI,
                                  java.lang.String pCommand,
                                  org.eclipse.core.runtime.IProgressMonitor pMonitor)
                           throws java.io.IOException,
                                  TaurusCoreException

      Executes a command on the selected remote system.
      Parameters:
        `pSI` - z/OS system to which the command is sent
        `pCommand` - TSO command string to be executed
        `pMonitor` - progress monitor or `null`
      Returns:
        `true`, if the command was successfully executed
      Throws:
        `TaurusCoreException` - if the `ISystemImage` is not supported by the `ISystemUtilities`
        `java.io.IOException` - severe error during the execution of the command

    - #### getLastResult

          java.lang.String getLastResult(java.lang.String pEncodingCharset)
                                  throws java.io.IOException

      Returns the output of the last sent command.
      Parameters:
        `pEncodingCharset` - the character set to convert the response stream
      Returns:
        output of the last command or `null`, if there was no command executed so far or the last command was not successfully executed
      Throws:
        `java.io.IOException` - if the last result could not be read or converted

    - #### getLastResultLines

          java.util.List<java.lang.String> getLastResultLines(java.lang.String pEncodingCharset)
                                                       throws java.io.IOException

      Returns the output of the last command line per line.
      Parameters:
        `pEncodingCharset` - the character set to convert the response stream
      Returns:
        list with the output lines of the last command or `null`, if there was no command executed so far or the last command was not successfully executed
      Throws:
        `java.io.IOException` - if the last result could not be read or converted

    - #### getUserID

          java.lang.String getUserID()

      Gets the remote user ID. This can be `null` if the user has never been connected to the remote system.
      Returns:
        the remote user ID or `null`

    - #### getSystemFromName

          ISystemImage getSystemFromName(java.lang.String pRemoteSystemName)
                                  throws TaurusCoreException

      Parameters:
        `pRemoteSystemName` - the name of an existing remote system
      Returns:
        the found `ISystemImage` or `null` if no system with the given name could be found
      Throws:
        `TaurusCoreException` - if an error occurs during the system search

Copyright © 2015 Micro Focus GmbH. All rights reserved.