CmsPublishEngine
Code IndexAdd Codota to your IDE (free)

Best Java code snippets using org.opencms.publish.CmsPublishEngine (Showing top 20 results out of 315)

origin: org.opencms/opencms-solr

/**
 * Adds a publish listener to listen on publish events.<p>
 * 
 * @param listener the publish listener to add
 */
public void addPublishListener(I_CmsPublishEventListener listener) {
  m_publishEngine.addPublishListener(listener);
}
origin: org.opencms/opencms-core

/**
 * Disables the publishing of resources.<p>
 */
public void disablePublishing() {
  m_publishEngine.disableEngine();
}
origin: org.opencms/opencms-core

/**
 * Enables the enqeueing of resources for publishing.<p>
 */
public void enablePublishing() {
  m_publishEngine.enableEngine();
}
origin: org.opencms/opencms-solr

CmsDriverManager driverManager = m_publishEngine.getDriverManager();
  if (revive) {
    CmsDbContext dbc = m_publishEngine.getDbContextFactory().getDbContext();
    List publishJobs;
    try {
      dbc = m_publishEngine.getDbContextFactory().getDbContext();
      if (!job.isStarted()) {
          m_publishEngine.lockPublishList(job);
          OpenCms.getMemoryMonitor().cachePublishJob(job);
        } catch (CmsException exc) {
              job.getPublishHistoryId()), exc);
          m_publishEngine.getDriverManager().deletePublishJob(dbc, job.getPublishHistoryId());
        } finally {
          dbc.clear();
          m_publishEngine.unlockPublishList(job);
          new CmsPublishJobEnqueued(job).m_publishJob.finish();
          m_publishEngine.getPublishHistory().add(job);
        } catch (CmsException exc) {
          LOG.error(exc.getLocalizedMessage(), exc);
origin: org.opencms/opencms-core

CmsDriverManager driverManager = m_publishEngine.getDriverManager();
  if (revive) {
    CmsDbContext dbc = m_publishEngine.getDbContext(null);
    List<CmsPublishJobInfoBean> publishJobs = null;
    try {
      for (Iterator<CmsPublishJobInfoBean> i = publishJobs.iterator(); i.hasNext();) {
        CmsPublishJobInfoBean job = i.next();
        dbc = m_publishEngine.getDbContext(null);
        if (!job.isStarted()) {
            m_publishEngine.lockPublishList(job);
            OpenCms.getMemoryMonitor().cachePublishJob(job);
          } catch (CmsException exc) {
                exc);
            m_publishEngine.getDriverManager().deletePublishJob(dbc, job.getPublishHistoryId());
          } finally {
            dbc.clear();
            m_publishEngine.unlockPublishList(job);
            new CmsPublishJobEnqueued(job).m_publishJob.finish();
            m_publishEngine.getPublishHistory().add(job);
          } catch (CmsException exc) {
            dbc.rollback();
origin: org.opencms/opencms-core

m_publishEngine.publishJobStarted(m_publishJob);
m_started = true;
if (isAborted()) {
  CmsDbContext dbc = m_publishEngine.getDbContext(getCms().getRequestContext());
  try {
    m_publishEngine.getDriverManager().publishJob(getCms(), dbc, m_publishJob.getPublishList(), m_report);
  } catch (Throwable e) {
    m_publishEngine.publishJobFinished(getPublishJob());
  } catch (Throwable e) {
    LOG.error(e.getMessage(), e);
origin: org.opencms/opencms-core

  unlockPublishList(publishJob.m_publishJob);
  getPublishHistory().add(publishJob.m_publishJob);
} else {
  getPublishQueue().remove(publishJob.m_publishJob);
origin: org.opencms/opencms-solr

m_publishEngine.publishJobStarted(m_publishJob);
m_started = true;
if (isAborted()) {
  CmsDbContext dbc = m_publishEngine.getDbContextFactory().getDbContext(getCms().getRequestContext());
  try {
  CmsDbContext dbc = m_publishEngine.getDbContextFactory().getDbContext(getCms().getRequestContext());
  try {
    m_publishEngine.getDriverManager().publishJob(getCms(), dbc, m_publishJob.getPublishList(), m_report);
    m_publishEngine.publishJobFinished(getPublishJob());
  } catch (CmsException exc) {
    LOG.error(exc.getLocalizedMessage(), exc);
origin: org.opencms/opencms-solr

/**
 * Removes the given job from the list.<p>
 * 
 * @param publishJob the publish job to remove
 * 
 * @throws CmsException if something goes wrong
 */
protected void remove(CmsPublishJobInfoBean publishJob) throws CmsException {
  try {
    // signalizes that job will be removed
    m_publishEngine.publishJobRemoved(publishJob);
  } finally {
    // remove publish job from cache
    OpenCms.getMemoryMonitor().uncachePublishJob(publishJob);
  }
  // remove job from database if necessary
  if (OpenCms.getMemoryMonitor().requiresPersistency()) {
    CmsDbContext dbc = m_publishEngine.getDbContextFactory().getDbContext();
    try {
      m_publishEngine.getDriverManager().deletePublishJob(dbc, publishJob.getPublishHistoryId());
    } finally {
      dbc.clear();
    }
  }
}
origin: org.opencms/opencms-core

/**
 * Removes the given job from the list.<p>
 *
 * @param publishJob the publish job to remove
 *
 * @throws CmsException if something goes wrong
 */
protected void remove(CmsPublishJobInfoBean publishJob) throws CmsException {
  try {
    // signalizes that job will be removed
    m_publishEngine.publishJobRemoved(publishJob);
  } finally {
    // remove publish job from cache
    OpenCms.getMemoryMonitor().uncachePublishJob(publishJob);
  }
  // remove job from database if necessary
  if (OpenCms.getMemoryMonitor().requiresPersistency()) {
    CmsDbContext dbc = m_publishEngine.getDbContext(null);
    try {
      m_publishEngine.getDriverManager().deletePublishJob(dbc, publishJob.getPublishHistoryId());
    } catch (CmsException e) {
      dbc.rollback();
      LOG.error(e.getLocalizedMessage(), e);
      throw e;
    } finally {
      dbc.clear();
    }
  }
}
origin: org.opencms/opencms-solr

  /**
   * Updates the given job in the list.<p>
   * 
   * @param publishJob the publish job to 
   */
  protected void update(CmsPublishJobInfoBean publishJob) {

    if (OpenCms.getMemoryMonitor().requiresPersistency()) {
      CmsDbContext dbc = m_publishEngine.getDbContextFactory().getDbContext();
      try {
        m_publishEngine.getDriverManager().writePublishJob(dbc, publishJob);
      } catch (CmsException e) {
        if (LOG.isErrorEnabled()) {
          LOG.error(e.getLocalizedMessage(), e);
        }
      } finally {
        dbc.clear();
      }
    }
  }
}
origin: org.opencms/opencms-core

  /**
   * Updates the given job in the list.<p>
   *
   * @param publishJob the publish job to
   */
  protected void update(CmsPublishJobInfoBean publishJob) {

    if (OpenCms.getMemoryMonitor().requiresPersistency()) {
      CmsDbContext dbc = m_publishEngine.getDbContext(null);
      try {
        m_publishEngine.getDriverManager().writePublishJob(dbc, publishJob);
      } catch (CmsException e) {
        dbc.rollback();
        if (LOG.isErrorEnabled()) {
          LOG.error(e.getLocalizedMessage(), e);
        }
      } finally {
        dbc.clear();
      }
    }
  }
}
origin: org.opencms/opencms-core

Iterator<CmsPublishJobEnqueued> itEnqueuedJobs = getPublishQueue().asList().iterator();
while (itEnqueuedJobs.hasNext()) {
  CmsPublishJobEnqueued enqueuedJob = itEnqueuedJobs.next();
Iterator<CmsPublishJobFinished> itFinishedJobs = getPublishHistory().asList().iterator();
while (itFinishedJobs.hasNext()) {
  CmsPublishJobFinished finishedJob = itFinishedJobs.next();
origin: org.opencms/opencms-core

    CmsPublishJobInfoBean publishJob = m_currentPublishThread.getPublishJob();
    try {
      abortPublishJob(m_adminUserId, new CmsPublishJobEnqueued(publishJob), false);
    } catch (CmsException e) {
      if (LOG.isErrorEnabled()) {
CmsDbContext dbc = getDbContext(null);
try {
  m_driverManager.updateLog(dbc);
origin: org.opencms/opencms-core

/**
 * 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();
}
origin: org.opencms/opencms-solr

CmsPublishJobInfoBean publishJob = m_currentPublishThread.getPublishJob();
try {
  abortPublishJob(m_adminUserId, new CmsPublishJobEnqueued(publishJob), false);
} catch (CmsException e) {
  if (LOG.isErrorEnabled()) {
origin: org.opencms/opencms-core

/**
 * 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);
}
origin: org.opencms/opencms-core

/**
 * 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());
}
origin: org.opencms/opencms-core

  m_publishEngine.enqueuePublishJob(cms, publishList, report);
} catch (CmsException exc) {
  enqueueException = exc;
origin: org.opencms/opencms-solr

m_publishEngine = new CmsPublishEngine(systemConfiguration.getRuntimeInfoFactory());
org.opencms.publishCmsPublishEngine

Javadoc

This class is responsible for the publish process.

Most used methods

  • <init>
    Default constructor.
  • abortPublishJob
    Aborts the given publish job.
  • addPublishListener
    Adds a publish listener to listen on publish events.
  • disableEngine
    Disables the publish engine, i.e. publish jobs are not accepted.
  • enableEngine
    Enables the publish engine, i.e. publish jobs are accepted.
  • enqueuePublishJob
    Enqueues a new publish job with the given information in publish queue. All resources should already
  • getCurrentPublishJob
    Returns the current running publish job.
  • getDriverManager
    Returns the driver manager instance.
  • getJobByPublishHistoryId
    Returns a publish job based on its publish history id. The returned publish job may be an enqueued,
  • getPublishHistory
    Returns the publish history list with already publish job.
  • getPublishQueue
    Returns the queue with still waiting publish job.
  • getReportContents
    Returns the content of the publish report assigned to the given publish job.
  • getPublishQueue,
  • getReportContents,
  • getUser,
  • initialize,
  • isEnabled,
  • isRunning,
  • lockPublishList,
  • publishJobFinished,
  • publishJobRemoved,
  • publishJobStarted

Popular in Java

  • Running tasks concurrently on multiple threads
  • setRequestProperty (URLConnection)
  • setContentView (Activity)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • JTextField (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t

For IntelliJ IDEA,
Android Studio or Eclipse

  • Search for JavaScript code betaCodota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutBlogContact Us
  • Plugin user guideTerms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)