com.microfocus.awm.model.internal

## Class TaurusJob

- java.lang.Object
- - com.microfocus.awm.model.internal.TaurusJob

- All Implemented Interfaces:
    ITaurusJob, IJob

      public class TaurusJob
      extends java.lang.Object
      implements ITaurusJob

  Main implementation of `ITaurusJob`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TaurusJob(java.lang.String pJobID)` Basic constructor.
    `TaurusJob(java.lang.String pJobID, java.lang.String pCacheID)` Constructor for loading a job from cache.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `cancel(org.eclipse.core.runtime.IProgressMonitor pMon)` Cancels a running job.
    `boolean` | `endedWithError()` Gets whether the job has finished with errors.
    `boolean` | `equals(java.lang.Object obj)`
    `java.lang.String` | `getActionLabel()` Gets the label of the action which scheduled the job.
    `java.lang.String` | `getCacheID()` Gets the cache ID of the job.
    `java.lang.String` | `getCompletionCode()` Gets the job completion code (CC)
    `java.lang.String` | `getCompletionInfo()` Gets the job completion info
    `java.io.InputStream` | `getContents(org.eclipse.core.runtime.IProgressMonitor pMon)` Deprecated.
    `java.util.Date` | `getCreationTimeStamp()` Gets the local (OS) time from when the job was created.
    `java.util.Date` | `getEndTime()` Gets the job's end time.
    `IExecutionContext` | `getExecutionContext()` Gets the execution context of the job.
    `java.util.Date` | `getExecutionTime()` Gets the job's execution time.
    `java.lang.String` | `getFullDsn()` Gets the job name and ID.
    `java.util.Date` | `getInputTime()` Gets the job's input time.
    `java.lang.String` | `getJobClass()` Gets the job class.
    `java.lang.String` | `getJobID()` Gets the job ID.
    `java.lang.String` | `getJobOutput(org.eclipse.core.runtime.IProgressMonitor pMon)` Gets the job output.
    `java.lang.String` | `getName()` Gets the job name.
    `java.lang.String` | `getOutParmDSN()` Gets the output parameter file name which the job will use to write down output parameters when finished.
    `java.lang.String` | `getOwner()` Gets the job owner user ID.
    `JobPhase` | `getPhase()` Gets the job phase.
    `int` | `getPosition()` Gets the job position.
    `int` | `getPriority()` Gets the job priority.
    `IResource` | `getResource()` Gets the resource where the job was executed from.
    `java.lang.String` | `getReturnCode()` Gets the return code of the finished job.
    `EJobState` | `getState()` Gets the job state.
    `ISystemImage` | `getSystemImage()` Gets the system image to which the job belongs.
    `ToolDescriptor` | `getToolDescr()` Gets the tool descriptor which caused the job execution.
    `java.lang.String` | `getType()` Gets the JES job type.
    `int` | `hashCode()`
    `boolean` | `isFinished()`
    `void` | `setActionLabel(java.lang.String pLabel)` Sets the action label of the job.
    `void` | `setCacheID(java.lang.String pID)` Deprecated.
    `void` | `setClass(java.lang.String pClass)` Sets the job class.
    `void` | `setCompletionCode(java.lang.String pCC)` Sets the completion code
    `void` | `setCompletionInfo(java.lang.String pCompletionInfo)` Sets the completion info (CC info)
    `void` | `setCreationTimeStamp(java.util.Date pTimeStamp)` Sets the creation time stamp.
    `void` | `setExecutionContext(IExecutionContext pContext)` Sets the execution context of the job.
    `void` | `setJobID(java.lang.String pJobID)` Sets the job ID.
    `void` | `setName(java.lang.String pName)` Sets the job name.
    `void` | `setOutParmDSN(java.lang.String pOutputParmDSN)` Sets the output parameter file name which the job will use to write down output parameters when finished.
    `void` | `setOwner(java.lang.String pOwner)` Sets the job owner user ID.
    `void` | `setPhase(JobPhase pPhase)` Sets the job phase.
    `void` | `setPos(int pPos)` Sets the job position.
    `void` | `setPriority(int pPriority)` Sets the job priority.
    `void` | `setResource(IResource pResource)` Sets the resource where the job was executed from.
    `void` | `setReturnCode(java.lang.String pCode)` Sets the return code of the job.
    `void` | `setState(EJobState pStatus)` Sets the job state.
    `void` | `setToolDescr(ToolDescriptor pDescr)` Sets the tool descriptor which caused the job execution.
    `void` | `setType(java.lang.String pType)` Sets the job type.
    `void` | `waitForJob()` Starts an eclipse background job waiting for the end of a TAURUS job executing on the corresponding remote system.

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

      `getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TaurusJob

          public TaurusJob(java.lang.String pJobID)

      Basic constructor.
      Parameters:
        `pJobID` - the ID of the actual job

    - #### TaurusJob

          public TaurusJob(java.lang.String pJobID,
                           java.lang.String pCacheID)

      Constructor for loading a job from cache.
      Parameters:
        `pJobID` - the ID of the actual job
        `pCacheID` - the cache ID

  - ### Method Detail

    - #### waitForJob

          public void waitForJob()
                          throws TaurusCoreException

      Description copied from interface: `ITaurusJob`
      Starts an eclipse background job waiting for the end of a TAURUS job executing on the corresponding remote system.
      Specified by:
        `waitForJob` in interface `ITaurusJob`
      Throws:
        `TaurusCoreException` - if an exception occurs while waiting for the job to finish

    - #### getJobID

          public java.lang.String getJobID()

      Description copied from interface: `IJob`
      Gets the job ID.
      Specified by:
        `getJobID` in interface `IJob`
      Returns:
        the job ID

    - #### getResource

          public IResource getResource()

      Description copied from interface: `ITaurusJob`
      Gets the resource where the job was executed from.
      Specified by:
        `getResource` in interface `ITaurusJob`
      Returns:
        the context resource or `null`

    - #### setResource

          public void setResource(IResource pResource)

      Description copied from interface: `ITaurusJob`
      Sets the resource where the job was executed from.
      Specified by:
        `setResource` in interface `ITaurusJob`
      Parameters:
        `pResource` - the new context resource

    - #### getToolDescr

          public ToolDescriptor getToolDescr()

      Description copied from interface: `ITaurusJob`
      Gets the tool descriptor which caused the job execution.
      Specified by:
        `getToolDescr` in interface `ITaurusJob`
      Returns:
        the tool descriptor

    - #### setToolDescr

          public void setToolDescr(ToolDescriptor pDescr)

      Description copied from interface: `ITaurusJob`
      Sets the tool descriptor which caused the job execution.
      Specified by:
        `setToolDescr` in interface `ITaurusJob`
      Parameters:
        `pDescr` - the new tool descriptor

    - #### setState

          public void setState(EJobState pStatus)

      Description copied from interface: `IJob`
      Sets the job state.
      Specified by:
        `setState` in interface `IJob`
      Parameters:
        `pStatus` - the job state to set

    - #### getReturnCode

          public java.lang.String getReturnCode()

      Description copied from interface: `ITaurusJob`
      Gets the return code of the finished job.
      Specified by:
        `getReturnCode` in interface `ITaurusJob`
      Returns:
        the jobs return code or `null` if the job has never finished properly or the return code has not been set

    - #### setReturnCode

          public void setReturnCode(java.lang.String pCode)

      Description copied from interface: `ITaurusJob`
      Sets the return code of the job.
      Specified by:
        `setReturnCode` in interface `ITaurusJob`
      Parameters:
        `pCode` - the new return code

    - #### getCacheID

          public java.lang.String getCacheID()

      Description copied from interface: `ITaurusJob`
      Gets the cache ID of the job.
      Specified by:
        `getCacheID` in interface `ITaurusJob`
      Returns:
        the cache ID

    - #### setCacheID

          @Deprecated
          public void setCacheID(java.lang.String pID)

      Deprecated.
      Description copied from interface: `ITaurusJob`
      Sets the cache ID of the job.
      Specified by:
        `setCacheID` in interface `ITaurusJob`
      Parameters:
        `pID` - the new cache ID

    - #### getActionLabel

          public java.lang.String getActionLabel()

      Description copied from interface: `ITaurusJob`
      Gets the label of the action which scheduled the job.
      Specified by:
        `getActionLabel` in interface `ITaurusJob`
      Returns:
        the action label

    - #### setActionLabel

          public void setActionLabel(java.lang.String pLabel)

      Description copied from interface: `ITaurusJob`
      Sets the action label of the job.
      Specified by:
        `setActionLabel` in interface `ITaurusJob`
      Parameters:
        `pLabel` - the new action label

    - #### hashCode

          public int hashCode()

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

    - #### equals

          public boolean equals(java.lang.Object obj)

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

    - #### getExecutionContext

          public IExecutionContext getExecutionContext()

      Description copied from interface: `ITaurusJob`
      Gets the execution context of the job.
      Specified by:
        `getExecutionContext` in interface `ITaurusJob`
      Returns:
        the execution context

    - #### setExecutionContext

          public void setExecutionContext(IExecutionContext pContext)

      Description copied from interface: `ITaurusJob`
      Sets the execution context of the job.
      Specified by:
        `setExecutionContext` in interface `ITaurusJob`
      Parameters:
        `pContext` - the new execution context

    - #### getOutParmDSN

          public java.lang.String getOutParmDSN()

      Description copied from interface: `ITaurusJob`
      Gets the output parameter file name which the job will use to write down output parameters when finished.
      Specified by:
        `getOutParmDSN` in interface `ITaurusJob`
      Returns:
        the output parameter file name

    - #### setOutParmDSN

          public void setOutParmDSN(java.lang.String pOutputParmDSN)

      Description copied from interface: `ITaurusJob`
      Sets the output parameter file name which the job will use to write down output parameters when finished.
      Specified by:
        `setOutParmDSN` in interface `ITaurusJob`
      Parameters:
        `pOutputParmDSN` - the new output parameter file name

    - #### getSystemImage

          public ISystemImage getSystemImage()

      Description copied from interface: `IJob`
      Gets the system image to which the job belongs.
      Specified by:
        `getSystemImage` in interface `IJob`
      Returns:
        the z/OS system image

    - #### getName

          public java.lang.String getName()

      Description copied from interface: `IJob`
      Gets the job name.
      Specified by:
        `getName` in interface `IJob`
      Returns:
        the job name

    - #### getFullDsn

          public java.lang.String getFullDsn()

      Description copied from interface: `IJob`
      Gets the job name and ID.
      Specified by:
        `getFullDsn` in interface `IJob`
      Returns:
        the job name and ID

    - #### getOwner

          public java.lang.String getOwner()

      Description copied from interface: `IJob`
      Gets the job owner user ID.
      Specified by:
        `getOwner` in interface `IJob`
      Returns:
        the job owner

    - #### getType

          public java.lang.String getType()

      Description copied from interface: `IJob`
      Gets the JES job type.
      Specified by:
        `getType` in interface `IJob`
      Returns:
        the job type

    - #### getJobClass

          public java.lang.String getJobClass()

      Description copied from interface: `IJob`
      Gets the job class.
      Specified by:
        `getJobClass` in interface `IJob`
      Returns:
        the job class

    - #### getCompletionCode

          public java.lang.String getCompletionCode()

      Description copied from interface: `IJob`
      Gets the job completion code (CC)
      Specified by:
        `getCompletionCode` in interface `IJob`
      Returns:
        the completion code

    - #### getCompletionInfo

          public java.lang.String getCompletionInfo()

      Description copied from interface: `IJob`
      Gets the job completion info
      Specified by:
        `getCompletionInfo` in interface `IJob`
      Returns:
        the completion info

    - #### getPriority

          public int getPriority()

      Description copied from interface: `IJob`
      Gets the job priority.
      Specified by:
        `getPriority` in interface `IJob`
      Returns:
        the priority

    - #### getPosition

          public int getPosition()

      Description copied from interface: `IJob`
      Gets the job position.
      Specified by:
        `getPosition` in interface `IJob`
      Returns:
        the job position

    - #### getPhase

          public JobPhase getPhase()

      Description copied from interface: `IJob`
      Gets the job phase.
      Specified by:
        `getPhase` in interface `IJob`
      Returns:
        the job phase

    - #### setOwner

          public void setOwner(java.lang.String pOwner)

      Description copied from interface: `IJob`
      Sets the job owner user ID.
      Specified by:
        `setOwner` in interface `IJob`
      Parameters:
        `pOwner` - the job owner to set

    - #### setType

          public void setType(java.lang.String pType)

      Description copied from interface: `IJob`
      Sets the job type.
      Specified by:
        `setType` in interface `IJob`
      Parameters:
        `pType` - the job type to set

    - #### setClass

          public void setClass(java.lang.String pClass)

      Description copied from interface: `IJob`
      Sets the job class.
      Specified by:
        `setClass` in interface `IJob`
      Parameters:
        `pClass` - the job class to set

    - #### setPriority

          public void setPriority(int pPriority)

      Description copied from interface: `IJob`
      Sets the job priority.
      Specified by:
        `setPriority` in interface `IJob`
      Parameters:
        `pPriority` - the priority to set

    - #### setPos

          public void setPos(int pPos)

      Description copied from interface: `IJob`
      Sets the job position.
      Specified by:
        `setPos` in interface `IJob`
      Parameters:
        `pPos` - the position to set

    - #### setPhase

          public void setPhase(JobPhase pPhase)

      Description copied from interface: `IJob`
      Sets the job phase.
      Specified by:
        `setPhase` in interface `IJob`
      Parameters:
        `pPhase` - the phase to set

    - #### getState

          public EJobState getState()

      Description copied from interface: `IJob`
      Gets the job state.
      Specified by:
        `getState` in interface `IJob`
      Returns:
        the job state

    - #### endedWithError

          public boolean endedWithError()

      Description copied from interface: `IJob`
      Gets whether the job has finished with errors.
      Specified by:
        `endedWithError` in interface `IJob`
      Returns:
        `true` if the job has finished with errors, `false` if it hasn't finished, or finished without errors

    - #### isFinished

          public boolean isFinished()

      Specified by:
        `isFinished` in interface `IJob`
      Returns:
        `true` if the job is finished (possibly with errors)

    - #### cancel

          public java.lang.String cancel(org.eclipse.core.runtime.IProgressMonitor pMon)
                                  throws java.lang.Exception

      Description copied from interface: `IJob`
      Cancels a running job.
      Specified by:
        `cancel` in interface `IJob`
      Parameters:
        `pMon` - progress monitor
      Returns:
        message returned by the cancel command. Can be `null`
      Throws:
        `java.lang.Exception` - if canceling the job failed

    - #### getContents

          @Deprecated
          public java.io.InputStream getContents(org.eclipse.core.runtime.IProgressMonitor pMon)
                                                       throws java.lang.Exception

      Deprecated.
      Description copied from interface: `IJob`
      Gets the job output.
      Specified by:
        `getContents` in interface `IJob`
      Parameters:
        `pMon` - progress monitor
      Returns:
        output of the job
      Throws:
        `java.lang.Exception` - if getting the job output failed

    - #### setCompletionCode

          public void setCompletionCode(java.lang.String pCC)

      Description copied from interface: `IJob`
      Sets the completion code
      Specified by:
        `setCompletionCode` in interface `IJob`
      Parameters:
        `pCC` - the completion code to set

    - #### setCompletionInfo

          public void setCompletionInfo(java.lang.String pCompletionInfo)

      Description copied from interface: `IJob`
      Sets the completion info (CC info)
      Specified by:
        `setCompletionInfo` in interface `IJob`
      Parameters:
        `pCompletionInfo` - the completion info to set

    - #### setName

          public void setName(java.lang.String pName)

      Description copied from interface: `IJob`
      Sets the job name.
      Specified by:
        `setName` in interface `IJob`
      Parameters:
        `pName` - the job name to set

    - #### setJobID

          public void setJobID(java.lang.String pJobID)

      Description copied from interface: `IJob`
      Sets the job ID.
      Specified by:
        `setJobID` in interface `ITaurusJob`
      Specified by:
        `setJobID` in interface `IJob`
      Parameters:
        `pJobID` - the job ID to set

    - #### setCreationTimeStamp

          public void setCreationTimeStamp(java.util.Date pTimeStamp)

      Description copied from interface: `ITaurusJob`
      Sets the creation time stamp.
      Specified by:
        `setCreationTimeStamp` in interface `ITaurusJob`
      Parameters:
        `pTimeStamp` - the new local time stamp
      See Also:
        `ITaurusJob.getCreationTimeStamp()`

    - #### getCreationTimeStamp

          public java.util.Date getCreationTimeStamp()

      Description copied from interface: `ITaurusJob`
      Gets the local (OS) time from when the job was created. This is usually near but not exactly equal to the actual submit time.
      Specified by:
        `getCreationTimeStamp` in interface `ITaurusJob`
      Returns:
        the local time stamp when the job was originally created

    - #### getJobOutput

          public java.lang.String getJobOutput(org.eclipse.core.runtime.IProgressMonitor pMon)
                                        throws java.io.IOException

      Description copied from interface: `IJob`
      Gets the job output.
      Specified by:
        `getJobOutput` in interface `IJob`
      Parameters:
        `pMon` - progress monitor
      Returns:
        output of the job
      Throws:
        `java.io.IOException` - if getting the job output failed

    - #### getInputTime

          public java.util.Date getInputTime()

      Description copied from interface: `IJob`
      Gets the job's input time.
      Specified by:
        `getInputTime` in interface `IJob`
      Returns:
        the input time or `null` if if wasn't set or returned by the server

    - #### getExecutionTime

          public java.util.Date getExecutionTime()

      Description copied from interface: `IJob`
      Gets the job's execution time.
      Specified by:
        `getExecutionTime` in interface `IJob`
      Returns:
        the execution time or `null` if if wasn't set or returned by the server

    - #### getEndTime

          public java.util.Date getEndTime()

      Description copied from interface: `IJob`
      Gets the job's end time.
      Specified by:
        `getEndTime` in interface `IJob`
      Returns:
        the end time or `null` if if wasn't set or returned by the server

Copyright © 2015 Micro Focus GmbH. All rights reserved.