/** * Adds a publish listener to listen on publish events.<p> * * @param listener the publish listener to add */ protected void addPublishListener(I_CmsPublishEventListener listener) { m_listeners.add(listener); }
/** * 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)); }
/** * 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)); }
/** * Fires a remove event to all listeners.<p> * * @param publishJob the publish job that is going to be removed. */ protected void fireRemove(CmsPublishJobFinished publishJob) { if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_PUBLISH_JOB_REMOVE_0)); } for (Iterator<I_CmsPublishEventListener> it = iterator(); it.hasNext();) { I_CmsPublishEventListener listener = it.next(); try { listener.onRemove(publishJob); } catch (Throwable t) { // catch every thing including runtime exceptions if (LOG.isErrorEnabled()) { LOG.error( Messages.get().getBundle().key( Messages.ERR_PUBLISH_JOB_REMOVE_ERROR_1, listener.getClass().getName()), t); } if (publishJob.m_publishJob.getPublishReport() != null) { publishJob.m_publishJob.getPublishReport().println(t); } } } }
/** * Removes the given publish listener.<p> * * @param listener the publish listener to remove */ protected void removePublishListener(I_CmsPublishEventListener listener) { m_listeners.remove(listener); }
m_listeners = new CmsPublishListenerCollection(this);
m_listeners.fireEnqueued(new CmsPublishJobBase(publishJob)); } catch (Throwable t) {
m_listeners.fireAbort(userId, publishJob);
m_listeners.fireFinish(new CmsPublishJobRunning(publishJob)); } catch (Throwable t) {
/** * Fires a remove event to all listeners.<p> * * @param publishJob the publish job that is going to be removed. */ protected void fireRemove(CmsPublishJobFinished publishJob) { if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_PUBLISH_JOB_REMOVE_0)); } for (Iterator it = iterator(); it.hasNext();) { I_CmsPublishEventListener listener = (I_CmsPublishEventListener)it.next(); try { listener.onRemove(publishJob); } catch (Throwable t) { // catch every thing including runtime exceptions if (LOG.isErrorEnabled()) { LOG.error(Messages.get().getBundle().key( Messages.ERR_PUBLISH_JOB_REMOVE_ERROR_1, listener.getClass().getName()), t); } if (publishJob.m_publishJob.getPublishReport() != null) { publishJob.m_publishJob.getPublishReport().println(t); } } } }
/** * Removes the given publish listener.<p> * * @param listener the publish listener to remove */ protected void removePublishListener(I_CmsPublishEventListener listener) { m_listeners.remove(listener); }
m_listeners = new CmsPublishListenerCollection(this);
m_listeners.fireEnqueued(new CmsPublishJobBase(publishJob)); } catch (Throwable t) {
m_listeners.fireAbort(userId, publishJob);
m_listeners.fireFinish(new CmsPublishJobRunning(publishJob));
/** * Fires an enqueue event to all listeners.<p> * * @param publishJob the publish job that is going to be enqueued. */ protected void fireEnqueued(CmsPublishJobBase publishJob) { if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_PUBLISH_JOB_ENQUEUE_0)); } for (Iterator<I_CmsPublishEventListener> it = iterator(); it.hasNext();) { I_CmsPublishEventListener listener = it.next(); try { listener.onEnqueue(publishJob); } catch (Throwable t) { // catch every thing including runtime exceptions if (LOG.isErrorEnabled()) { LOG.error( Messages.get().getBundle().key( Messages.ERR_PUBLISH_JOB_ENQUEUE_ERROR_1, listener.getClass().getName()), t); } if (publishJob.m_publishJob.getPublishReport() != null) { publishJob.m_publishJob.getPublishReport().println(t); } } } }
/** * 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)); }
/** * 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)); }
/** * Adds a publish listener to listen on publish events.<p> * * @param listener the publish listener to add */ protected void addPublishListener(I_CmsPublishEventListener listener) { m_listeners.add(listener); }
/** * Fires an enqueue event to all listeners.<p> * * @param publishJob the publish job that is going to be enqueued. */ protected void fireEnqueued(CmsPublishJobBase publishJob) { if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_PUBLISH_JOB_ENQUEUE_0)); } for (Iterator it = iterator(); it.hasNext();) { I_CmsPublishEventListener listener = (I_CmsPublishEventListener)it.next(); try { listener.onEnqueue(publishJob); } catch (Throwable t) { // catch every thing including runtime exceptions if (LOG.isErrorEnabled()) { LOG.error(Messages.get().getBundle().key( Messages.ERR_PUBLISH_JOB_ENQUEUE_ERROR_1, listener.getClass().getName()), t); } if (publishJob.m_publishJob.getPublishReport() != null) { publishJob.m_publishJob.getPublishReport().println(t); } } } }