/** * Sets if the publish queue is re-initialized on startup.<p> * * @param publishQueuePersistance the persistence flag, parsed as <code>boolean</code> */ public void setPublishQueuePersistance(String publishQueuePersistance) { if (m_frozen) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_FROZEN_0)); } m_publishQueuePersistance = Boolean.valueOf(publishQueuePersistance).booleanValue(); }
/** * Sets if the publish queue is re-initialized on startup.<p> * * @param publishQueuePersistance the persistence flag, parsed as <code>boolean</code> */ public void setPublishQueuePersistance(String publishQueuePersistance) { if (m_frozen) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_FROZEN_0)); } m_publishQueuePersistance = Boolean.valueOf(publishQueuePersistance).booleanValue(); }
/** * Sets the publish History Size.<p> * * @param publishHistorySize the publish History Size to set */ public void setPublishHistorySize(String publishHistorySize) { if (m_frozen) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_FROZEN_0)); } m_publishHistorySize = Integer.parseInt(publishHistorySize); }
/** * Sets the publish queue shutdown time. * * @param publishQueueShutdowntime the shutdown time to set, parsed as <code>int</code> */ public void setPublishQueueShutdowntime(String publishQueueShutdowntime) { if (m_frozen) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_FROZEN_0)); } m_publishQueueShutdowntime = Integer.parseInt(publishQueueShutdowntime); }
/** * Sets the publish queue shutdown time. * * @param publishQueueShutdowntime the shutdown time to set, parsed as <code>int</code> */ public void setPublishQueueShutdowntime(String publishQueueShutdowntime) { if (m_frozen) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_FROZEN_0)); } m_publishQueueShutdowntime = Integer.parseInt(publishQueueShutdowntime); }
/** * Sets the publish History Size.<p> * * @param publishHistorySize the publish History Size to set */ public void setPublishHistorySize(String publishHistorySize) { if (m_frozen) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_FROZEN_0)); } m_publishHistorySize = Integer.parseInt(publishHistorySize); }
/** * Sets the publish engine during initialization.<p> * * @param publishEngine the publish engine instance */ public void setPublishEngine(CmsPublishEngine publishEngine) { if (m_frozen) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_FROZEN_0)); } m_publishEngine = publishEngine; }
/** * Sets the security manager during initialization.<p> * * @param securityManager the security manager */ public void setSecurityManager(CmsSecurityManager securityManager) { if (m_frozen) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_FROZEN_0)); } m_securityManager = securityManager; }
/** * Sets the publish engine during initialization.<p> * * @param publishEngine the publish engine instance */ public void setPublishEngine(CmsPublishEngine publishEngine) { if (m_frozen) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_FROZEN_0)); } m_publishEngine = publishEngine; }
/** * Sets the security manager during initialization.<p> * * @param securityManager the security manager */ public void setSecurityManager(CmsSecurityManager securityManager) { if (m_frozen) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_FROZEN_0)); } m_securityManager = securityManager; }
/** * Sets the publish list remove mode.<p> * * @param publishListRemoveMode the publish list remove mode */ public void setPublishListRemoveMode(CmsPublishManager.PublishListRemoveMode publishListRemoveMode) { if (m_frozen) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_FROZEN_0)); } m_publishListRemoveMode = publishListRemoveMode; }
/** * Aborts the current job.<p> * * This can only be done until the publish job started event is fired.<p> * * @throws CmsPublishException if the current publish can not be aborted */ protected void abort() throws CmsPublishException { if (m_started) { throw new CmsPublishException(Messages.get().container(Messages.ERR_PUBLISH_ENGINE_MISSING_PUBLISH_JOB_0)); } m_abort = true; }
/** * Aborts the current job.<p> * * This can only be done until the publish job started event is fired.<p> * * @throws CmsPublishException if the current publish can not be aborted */ protected void abort() throws CmsPublishException { if (m_started) { throw new CmsPublishException(Messages.get().container(Messages.ERR_PUBLISH_ENGINE_MISSING_PUBLISH_JOB_0)); } m_abort = true; }
/** * 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); } } } }
/** * 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); } } } }
/** * 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); } } } }
/** * 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); } } } }
/** * Signalizes the start of the publish job.<p> * Actually sets the starting time, writes the report header and sets the running thread uuid.<p> * * @param threadUUID the running thread uuid */ protected void start(CmsUUID threadUUID) { if (m_startTime != 0) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_PUBLISH_JOB_ALREADY_STARTED_0)); } m_startTime = System.currentTimeMillis(); m_threadUUID = threadUUID; if (getPublishReport() instanceof CmsPublishReport) { ((CmsPublishReport)m_publishReport).start(); } } }
/** * Signalizes the start of the publish job.<p> * Actually sets the starting time, writes the report header and sets the running thread uuid.<p> * * @param threadUUID the running thread uuid */ protected void start(CmsUUID threadUUID) { if (m_startTime != 0) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_PUBLISH_JOB_ALREADY_STARTED_0)); } m_startTime = System.currentTimeMillis(); m_threadUUID = threadUUID; if (getPublishReport() instanceof CmsPublishReport) { ((CmsPublishReport)m_publishReport).start(); } } }
Messages.get().getBundle().key(Messages.INIT_PUBLISH_HISTORY_SIZE_SET_1, new Integer(size)));