/** * Returns the current running publish job.<p> * * @return the current running publish job */ public CmsPublishJobRunning getCurrentPublishJob() { if (m_publishEngine.getCurrentPublishJob() == null) { return null; } return new CmsPublishJobRunning(m_publishEngine.getCurrentPublishJob().getPublishJob()); }
/** * Signalizes that the publish thread starts.<p> * * @param publishJob the started publish job */ protected void publishJobStarted(CmsPublishJobInfoBean publishJob) { // update the job m_publishQueue.update(publishJob); // fire the publish start event m_listeners.fireStart(new CmsPublishJobEnqueued(publishJob)); }
/** * Enables the publish engine, i.e. publish jobs are accepted.<p> */ protected void enableEngine() { m_engineState = CmsPublishEngineState.ENGINE_STARTED; // start publish job if jobs waiting if ((m_currentPublishThread == null) && !m_publishQueue.isEmpty()) { checkCurrentPublishJobThread(); } }
/** * A publish job has been permanently removed from the history.<p> * * @param publishJob the removed publish job */ protected void publishJobRemoved(CmsPublishJobInfoBean publishJob) { // a publish job has been removed m_listeners.fireRemove(new CmsPublishJobFinished(publishJob)); }
/** * Returns the queue with still waiting publish jobs.<p> * * @return a list of {@link CmsPublishJobEnqueued} objects */ public List<CmsPublishJobEnqueued> getPublishQueue() { return m_publishEngine.getPublishQueue().asList(); }
/** * Returns the publish history list with already publish jobs.<p> * * @return a list of {@link CmsPublishJobFinished} objects */ public List<CmsPublishJobFinished> getPublishHistory() { return m_publishEngine.getPublishHistory().asList(); }
/** * Starts the publish engine, i.e. publish jobs are accepted and processed.<p> */ protected void startEngine() { if (m_engineState != CmsPublishEngineState.ENGINE_STARTED) { m_engineState = CmsPublishEngineState.ENGINE_STARTED; // start publish job if jobs waiting if ((m_currentPublishThread == null) && !m_publishQueue.isEmpty()) { run(); } } }
/** * Returns the report for this publish job.<p> * * This is not the original report, it is wrapper that * also writes to a temporary file.<p> * * @return the report for this publish job */ public I_CmsReport getReport() { return m_publishJob.getPublishReport(); } }
/** * Returns the number of resources in the publish list.<p> * * @return the number of resources in the publish list */ public int getSize() { return m_publishJob.getSize(); }
/** * 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> */ public CmsPublishJobBase getJobByPublishHistoryId(CmsUUID publishHistoryId) { return m_publishEngine.getJobByPublishHistoryId(publishHistoryId); }
/** * Returns the time the publish job did actually start.<p> * * @return the time the publish job did actually start */ public long getStartTime() { return m_publishJob.getStartTime(); }
/** * Returns the time this object has been created.<p> * * @return the time this object has been created */ public long getEnqueueTime() { return m_publishJob.getEnqueueTime(); }
/** * Returns the publish history id.<p> * * @return the publish history id */ public CmsUUID getPublishHistoryId() { return m_publishJob.getPublishHistoryId(); }
/** * Returns the current running publish job.<p> * * @return the current running publish job */ public CmsPublishJobRunning getCurrentPublishJob() { if (m_publishEngine.getCurrentPublishJob() == null) { return null; } return new CmsPublishJobRunning(m_publishEngine.getCurrentPublishJob().getPublishJob()); }
/** * Signalizes that the publish thread starts.<p> * * @param publishJob the started publish job */ protected void publishJobStarted(CmsPublishJobInfoBean publishJob) { // update the job m_publishQueue.update(publishJob); // fire the publish start event m_listeners.fireStart(new CmsPublishJobEnqueued(publishJob)); }
/** * A publish job has been permanently removed from the history.<p> * * @param publishJob the removed publish job */ protected void publishJobRemoved(CmsPublishJobInfoBean publishJob) { // a publish job has been removed m_listeners.fireRemove(new CmsPublishJobFinished(publishJob)); }
/** * Returns the queue with still waiting publish jobs.<p> * * @return a list of {@link CmsPublishJobEnqueued} objects */ public List getPublishQueue() { return m_publishEngine.getPublishQueue().asList(); }
/** * Returns the publish history list with already publish jobs.<p> * * @return a list of {@link CmsPublishJobFinished} objects */ public List getPublishHistory() { return m_publishEngine.getPublishHistory().asList(); }
/** * Starts the publish engine, i.e. publish jobs are accepted and processed.<p> */ protected void startEngine() { if (m_engineState != CmsPublishEngineState.ENGINE_STARTED) { m_engineState = CmsPublishEngineState.ENGINE_STARTED; // start publish job if jobs waiting if ((m_currentPublishThread == null) && !m_publishQueue.isEmpty()) { checkCurrentPublishJobThread(); } } }