com.microfocus.awm.model.internal

## Class JobDirectory

- java.lang.Object
- - java.util.Observable
  - - com.microfocus.awm.model.internal.JobDirectory

- All Implemented Interfaces:
    IJobDirectory

      public class JobDirectory
      extends java.util.Observable
      implements IJobDirectory

  Main implementation of `IJobDirectory`.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addJob(ITaurusJob pJob, boolean pNotify)` Add the given TAURUS job to the job directory.
    `void` | `changeJobStatus(ITaurusJob pJob)` Deprecated.
    `static JobDirectory` | `getInstance()` Gets the singleton instance.
    `java.util.List<ITaurusJob>` | `getJobList()` Gets a list of all currently available `ITaurusJob`s.
    `void` | `jobStatusChanged(JobStateChangedEvent pEvent)` Notifies the directory that a job status has changed, causing all observers to be notified.
    `void` | `loadJobs()` Load the job directory from the jt_jobs.xml file in the workspace.
    `void` | `removeAllJobs()` Removes all cached jobs physically.
    `void` | `removeJob(ITaurusJob pJob)` Remove the given job from the job directory.
    `void` | `saveJobs()` Save the jobs of the job directory to the jt_jobs.xml file in the workspace.
    `void` | `synchronizeJobs(org.eclipse.core.runtime.IProgressMonitor pMon)` Synchronize the job directory with the existing jobs on the corresponding remote system.

    - ### Methods inherited from class java.util.Observable

      `addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers`

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

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

    - ### Methods inherited from interface com.microfocus.awm.model.IJobDirectory

      `addObserver, deleteObserver`

- - ### Method Detail

    - #### getInstance

          public static JobDirectory getInstance()

      Gets the singleton instance.
      Returns:
        the instance

    - #### addJob

          public void addJob(ITaurusJob pJob,
                             boolean pNotify)

      Description copied from interface: `IJobDirectory`
      Add the given TAURUS job to the job directory.
      Specified by:
        `addJob` in interface `IJobDirectory`
      Parameters:
        `pJob` - TAURUS job to be added
        `pNotify` - flag which determines whether the observers of the element list directory are notified

    - #### getJobList

          public java.util.List<ITaurusJob> getJobList()
                                                throws TaurusCoreException

      Description copied from interface: `IJobDirectory`
      Gets a list of all currently available `ITaurusJob`s.
      Specified by:
        `getJobList` in interface `IJobDirectory`
      Returns:
        a list of all jobs
      Throws:
        `TaurusCoreException` - if loading the job cache fails

    - #### synchronizeJobs

          public void synchronizeJobs(org.eclipse.core.runtime.IProgressMonitor pMon)
                               throws TaurusCoreException

      Description copied from interface: `IJobDirectory`
      Synchronize the job directory with the existing jobs on the corresponding remote system.
      Specified by:
        `synchronizeJobs` in interface `IJobDirectory`
      Parameters:
        `pMon` - progress monitor
      Throws:
        `TaurusCoreException` - if no `ITaurusJobUtilities` extension was found or the job cache could not be updated

    - #### changeJobStatus

          @Deprecated
          public void changeJobStatus(ITaurusJob pJob)

      Deprecated.
      Description copied from interface: `IJobDirectory`
      Notify the observers of the job directory of a status change of the given job.
      Specified by:
        `changeJobStatus` in interface `IJobDirectory`
      Parameters:
        `pJob` - TAURUS job which status has changed

    - #### loadJobs

          public void loadJobs()
                        throws TaurusCoreException

      Description copied from interface: `IJobDirectory`
      Load the job directory from the jt_jobs.xml file in the workspace.
      Specified by:
        `loadJobs` in interface `IJobDirectory`
      Throws:
        `TaurusCoreException` - if loading the job cache fails

    - #### removeJob

          public void removeJob(ITaurusJob pJob)

      Description copied from interface: `IJobDirectory`
      Remove the given job from the job directory.
      Specified by:
        `removeJob` in interface `IJobDirectory`
      Parameters:
        `pJob` - TAURUS job to be removed

    - #### removeAllJobs

          public void removeAllJobs()
                             throws TaurusCoreException

      Description copied from interface: `IJobDirectory`
      Removes all cached jobs physically.
      Specified by:
        `removeAllJobs` in interface `IJobDirectory`
      Throws:
        `TaurusCoreException` - if the job cache could not be updated

    - #### saveJobs

          public void saveJobs()
                        throws TaurusCoreException

      Description copied from interface: `IJobDirectory`
      Save the jobs of the job directory to the jt_jobs.xml file in the workspace.
      Specified by:
        `saveJobs` in interface `IJobDirectory`
      Throws:
        `TaurusCoreException` - if saving the job cache fails

    - #### jobStatusChanged

          public void jobStatusChanged(JobStateChangedEvent pEvent)

      Description copied from interface: `IJobDirectory`
      Notifies the directory that a job status has changed, causing all observers to be notified.
      Specified by:
        `jobStatusChanged` in interface `IJobDirectory`
      Parameters:
        `pEvent` - the event describing the change

Copyright © 2015 Micro Focus GmbH. All rights reserved.