code: public CmsPublishJobBase getJobByPublishHistoryId(CmsUUID publishHistoryId) {
  
          // try current running job
          if ((m_currentPublishThread != null)
              && m_currentPublishThread.getPublishJob().getPublishHistoryId().equals(publishHistoryId)) {
              return new CmsPublishJobRunning(m_currentPublishThread.getPublishJob());
          }
          // try enqueued jobs
          Iterator<CmsPublishJobEnqueued> itEnqueuedJobs = getPublishQueue().asList().iterator();
          while (itEnqueuedJobs.hasNext()) {
              CmsPublishJobEnqueued enqueuedJob = itEnqueuedJobs.next();
              if (enqueuedJob.getPublishList().getPublishHistoryId().equals(publishHistoryId)) {
                  return enqueuedJob;
              }
          }
          // try finished jobs
          Iterator<CmsPublishJobFinished> itFinishedJobs = getPublishHistory().asList().iterator();
          while (itFinishedJobs.hasNext()) {
              CmsPublishJobFinished finishedJob = itFinishedJobs.next();
              if (finishedJob.getPublishHistoryId().equals(publishHistoryId)) {
                  return finishedJob;
              }
          }
          return null;
      }
docs: Returns a publish job based on its publish history id.<p>
  
  The returned publish job may be an enqueued, running or finished publish job.<p>
  
  @param publishHistoryId the publish history id to search for
  
  @return the publish job with the given publish history id, or <code>null</code>