com.microfocus.awm.model

## Interface ITaurusJobUtilities

-     public interface ITaurusJobUtilities

  Contains helper methods for JES jobs.

  This interfaces is NOT intended to be implemented by clients.

  Author:
    Micro Focus

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.io.InputStream` | `getJobContents(ISystemImage pImg, ITaurusJob pJob, org.eclipse.core.runtime.IProgressMonitor pMon)` Deprecated. Use `getJobOutput(ISystemImage, ITaurusJob, IProgressMonitor)` instead
    `java.lang.String` | `getJobOutput(ISystemImage pImg, ITaurusJob pJob, org.eclipse.core.runtime.IProgressMonitor pMon)` Get the complete content of the given job.
    `java.io.InputStream` | `getJobPartContents(ISystemImage pImg, ITaurusJob pJob, java.lang.String pPartID, org.eclipse.core.runtime.IProgressMonitor pMon)` Deprecated. Use `getJobPartOutput(ISystemImage, ITaurusJob, String, IProgressMonitor)` instead.
    `java.lang.String` | `getJobPartOutput(ISystemImage pImg, ITaurusJob pJob, java.lang.String pPartID, org.eclipse.core.runtime.IProgressMonitor pMon)` Get the content of the job part with the given part id of the given job.
    `java.util.List<java.lang.String>` | `getJobParts(ISystemImage pImg, ITaurusJob pJob, org.eclipse.core.runtime.IProgressMonitor pMon)` Get a list of the parts of the job with the given job id.
    `java.lang.String` | `getJobReturnCode(ISystemImage pImg, ITaurusJob pJob)` Get the return code of the job.
    `java.lang.String` | `getJobReturnCode(ITaurusJob pJob)` Deprecated. contains dependencies to a loaded work flow manager application. Please use `getJobReturnCode(ISystemImage, ITaurusJob)` instead.
    `boolean` | `hasJobFinished(ISystemImage pImg, ITaurusJob pJob, org.eclipse.core.runtime.IProgressMonitor pMon)` Obtains job information and returns whether the job has finished running.
    `boolean` | `isConnected()` Deprecated. contains dependencies to a loaded work flow manager application. Please use `isConnected(ISystemImage)` instead.
    `boolean` | `isConnected(ISystemImage pImg)` Check if the associated job system is connected.
    `java.util.List<ITaurusJob>` | `listAllJobs(ISystemImage pImg, org.eclipse.core.runtime.IProgressMonitor pMon)` Retrieves all jobs from the implemented subsystem.
    `void` | `purgeJob(ISystemImage pImg, java.lang.String pJobID, org.eclipse.core.runtime.IProgressMonitor pMon)` Purges a job.
    `boolean` | `refreshJob(ISystemImage pImg, ITaurusJob pJob, org.eclipse.core.runtime.IProgressMonitor pMon)` Obtains job information from the mainframe and updates the given `ITaurusJob` accordingly.
    `java.lang.String` | `submitJob(ISystemImage pImg, java.io.InputStream pIs, org.eclipse.core.runtime.IProgressMonitor pMon)` Deprecated. use `submitJob(ISystemImage, String, IProgressMonitor)` instead.
    `java.lang.String` | `submitJob(ISystemImage pImg, java.io.InputStream pIs, ToolDescriptor pTool, IExecutionContext pContext, org.eclipse.core.runtime.IProgressMonitor pMon)` Deprecated. Use `submitJob(ISystemImage, String, ToolDescriptor, IExecutionContext, IProgressMonitor)` instead.
    `java.util.List<java.lang.String>` | `submitJob(ISystemImage pImg, java.lang.String pJcl, org.eclipse.core.runtime.IProgressMonitor pMon)` Submits a Job from the given input stream.
    `java.util.List<java.lang.String>` | `submitJob(ISystemImage pImg, java.lang.String pJcl, ToolDescriptor pTool, IExecutionContext pContext, org.eclipse.core.runtime.IProgressMonitor pMon)` Submits a job from the given input stream passing the current tool.

- - ### Method Detail

    - #### getJobContents

          @Deprecated
          java.io.InputStream getJobContents(ISystemImage pImg,
                                                          ITaurusJob pJob,
                                                          org.eclipse.core.runtime.IProgressMonitor pMon)
                                                   throws TaurusCoreException

      Deprecated. Use `getJobOutput(ISystemImage, ITaurusJob, IProgressMonitor)` instead
      Get the complete content of the given job.
      Parameters:
        `pImg` - the system image.
        `pJob` - the job.
        `pMon` - an `IProgressMonitor` or `NullProgressMonitor`
      Returns:
        input stream containing the job's content
      Throws:
        `TaurusCoreException` - if an Exception occurs during sending the command or parsing the response

    - #### getJobOutput

          java.lang.String getJobOutput(ISystemImage pImg,
                                        ITaurusJob pJob,
                                        org.eclipse.core.runtime.IProgressMonitor pMon)
                                 throws TaurusCoreException

      Get the complete content of the given job.
      Parameters:
        `pImg` - the system image.
        `pJob` - the job.
        `pMon` - an `IProgressMonitor` or `NullProgressMonitor`
      Returns:
        input stream containing the job's content
      Throws:
        `TaurusCoreException` - if an Exception occurs during sending the command or parsing the response

    - #### getJobPartContents

          @Deprecated
          java.io.InputStream getJobPartContents(ISystemImage pImg,
                                                              ITaurusJob pJob,
                                                              java.lang.String pPartID,
                                                              org.eclipse.core.runtime.IProgressMonitor pMon)
                                                       throws TaurusCoreException

      Deprecated. Use `getJobPartOutput(ISystemImage, ITaurusJob, String, IProgressMonitor)` instead.
      Get the content of the job part with the given part id of the given job.
      Parameters:
        `pImg` - the system image.
        `pJob` - the job
        `pPartID` - id of the job part
        `pMon` - an `IProgressMonitor` or `NullProgressMonitor`
      Returns:
        input stream containing the content of the job part with the given part id of the job with the given job id
      Throws:
        `TaurusCoreException` - if an Exception occurs during sending the command or parsing the response

    - #### getJobPartOutput

          java.lang.String getJobPartOutput(ISystemImage pImg,
                                            ITaurusJob pJob,
                                            java.lang.String pPartID,
                                            org.eclipse.core.runtime.IProgressMonitor pMon)
                                     throws TaurusCoreException

      Get the content of the job part with the given part id of the given job.
      Parameters:
        `pImg` - the system image.
        `pJob` - the job
        `pPartID` - id of the job part
        `pMon` - an `IProgressMonitor` or `NullProgressMonitor`
      Returns:
        input stream containing the content of the job part with the given part id of the job with the given job id
      Throws:
        `TaurusCoreException` - if an Exception occurs during sending the command or parsing the response

    - #### getJobParts

          java.util.List<java.lang.String> getJobParts(ISystemImage pImg,
                                                       ITaurusJob pJob,
                                                       org.eclipse.core.runtime.IProgressMonitor pMon)
                                                throws TaurusCoreException

      Get a list of the parts of the job with the given job id.
      Parameters:
        `pImg` - the system image.
        `pJob` - the job
        `pMon` - an `IProgressMonitor` or `NullProgressMonitor`
      Returns:
        list of the parts of the job with the given job id
      Throws:
        `TaurusCoreException` - if an Exception occurs during sending the command or parsing the response

    - #### getJobReturnCode

          @Deprecated
          java.lang.String getJobReturnCode(ITaurusJob pJob)
                                                  throws TaurusCoreException

      Deprecated. contains dependencies to a loaded work flow manager application. Please use `getJobReturnCode(ISystemImage, ITaurusJob)` instead.
      Get the return code of the job.
      Parameters:
        `pJob` - the `Job`
      Returns:
        return code of the job with the given id
      Throws:
        `TaurusCoreException` - if an Exception occurs during sending the command or parsing the response

    - #### getJobReturnCode

          java.lang.String getJobReturnCode(ISystemImage pImg,
                                            ITaurusJob pJob)
                                     throws TaurusCoreException

      Get the return code of the job.
      Parameters:
        `pImg` - the system image.
        `pJob` - the `Job`
      Returns:
        return code of the job with the given id
      Throws:
        `TaurusCoreException` - if an Exception occurs during sending the command or parsing the response

    - #### hasJobFinished

          boolean hasJobFinished(ISystemImage pImg,
                                 ITaurusJob pJob,
                                 org.eclipse.core.runtime.IProgressMonitor pMon)
                          throws TaurusCoreException

      Obtains job information and returns whether the job has finished running. The method also updates at least the following fields of the `ITaurusJob`:
      - Job Name.
      - Job Owner.
      - Completion/Return code.
      - Job Phase.
      - Job State.
      Parameters:
        `pImg` - the system image.
        `pJob` - the job
        `pMon` - progress monitor
      Returns:
        `true`, if the job has finished executing; otherwise `false`
      Throws:
        `TaurusCoreException` - if an exception occurs while initializing a job facility

    - #### isConnected

          @Deprecated
          boolean isConnected()

      Deprecated. contains dependencies to a loaded work flow manager application. Please use `isConnected(ISystemImage)` instead.
      Check if the associated job system is connected.
      Returns:
        `true`, if the associated job system is connected; otherwise `false`

    - #### isConnected

          boolean isConnected(ISystemImage pImg)

      Check if the associated job system is connected.
      Parameters:
        `pImg` - the system image.
      Returns:
        `true`, if the associated job system is connected; otherwise `false`

    - #### listAllJobs

          java.util.List<ITaurusJob> listAllJobs(ISystemImage pImg,
                                                 org.eclipse.core.runtime.IProgressMonitor pMon)
                                          throws TaurusCoreException

      Retrieves all jobs from the implemented subsystem.
      Parameters:
        `pImg` - the system image
        `pMon` - progress monitor
      Returns:
        a list of all jobs
      Throws:
        `TaurusCoreException` - if an exception occurs when connecting to the remote system or reading the job list

    - #### submitJob

          @Deprecated
          java.lang.String submitJob(ISystemImage pImg,
                                                  java.io.InputStream pIs,
                                                  org.eclipse.core.runtime.IProgressMonitor pMon)
                                           throws TaurusCoreException

      Deprecated. use `submitJob(ISystemImage, String, IProgressMonitor)` instead.
      Submits a Job from the given input stream.
      Parameters:
        `pImg` - the system image.
        `pIs` - the input stream, containing the JCL
        `pMon` - an IProgressmonitor
      Returns:
        a user-readable server message
      Throws:
        `TaurusCoreException` - if an Exception occurs during sending the command

    - #### submitJob

          java.util.List<java.lang.String> submitJob(ISystemImage pImg,
                                                     java.lang.String pJcl,
                                                     org.eclipse.core.runtime.IProgressMonitor pMon)
                                              throws TaurusCoreException

      Submits a Job from the given input stream.
      Parameters:
        `pImg` - the system image.
        `pJcl` - the JCL to submit
        `pMon` - an IProgressmonitor
      Returns:
        a list of submitted job IDs
      Throws:
        `TaurusCoreException` - if an Exception occurs during sending the command

    - #### submitJob

          @Deprecated
          java.lang.String submitJob(ISystemImage pImg,
                                                  java.io.InputStream pIs,
                                                  ToolDescriptor pTool,
                                                  IExecutionContext pContext,
                                                  org.eclipse.core.runtime.IProgressMonitor pMon)
                                           throws TaurusCoreException

      Deprecated. Use `submitJob(ISystemImage, String, ToolDescriptor, IExecutionContext, IProgressMonitor)` instead.
      Submits a job from the given input stream passing the current tool. descriptor and context to the job
      Parameters:
        `pImg` - the system image
        `pIs` - the JCL to submit
        `pTool` - the current tool descriptor
        `pContext` - the current context
        `pMon` - progress monitor
      Returns:
        a user-readable server message
      Throws:
        `TaurusCoreException` - if an Exception occurs during sending the command

    - #### submitJob

          java.util.List<java.lang.String> submitJob(ISystemImage pImg,
                                                     java.lang.String pJcl,
                                                     ToolDescriptor pTool,
                                                     IExecutionContext pContext,
                                                     org.eclipse.core.runtime.IProgressMonitor pMon)
                                              throws TaurusCoreException

      Submits a job from the given input stream passing the current tool. descriptor and context to the job
      Parameters:
        `pImg` - the system image
        `pJcl` -
        `pTool` - the JCL to submit the current tool descriptor
        `pContext` - the current context
        `pMon` - progress monitor
      Returns:
        a list of submitted job IDs
      Throws:
        `TaurusCoreException` - if an Exception occurs during sending the command

    - #### purgeJob

          void purgeJob(ISystemImage pImg,
                        java.lang.String pJobID,
                        org.eclipse.core.runtime.IProgressMonitor pMon)
                 throws TaurusCoreException

      Purges a job. The job is permanently removed from the remote system.
      Parameters:
        `pImg` - the system image
        `pJobID` - the job ID
        `pMon` - a progress monitor
      Throws:
        `TaurusCoreException` - if an Exception occurs during sending the command

    - #### refreshJob

          boolean refreshJob(ISystemImage pImg,
                             ITaurusJob pJob,
                             org.eclipse.core.runtime.IProgressMonitor pMon)
                      throws TaurusCoreException

      Obtains job information from the mainframe and updates the given `ITaurusJob` accordingly. At least the following fields will be updated:
      - Job Name.
      - Job Owner.
      - Completion/Return code.
      - Job Phase.
      - Job State.
      Parameters:
        `pImg` - the system image
        `pJob` - the job to update
        `pMon` - progress monitor
      Returns:
        `true`, if the job exists and was successfully updated, `false` if the job doesn't exist (anymore) on the mainframe
      Throws:
        `TaurusCoreException` - if an unexpected exception occurs

Copyright © 2015 Micro Focus GmbH. All rights reserved.