public class CmsPublishQueue extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected CmsPublishEngine |
m_publishEngine
The publish engine.
|
Modifier | Constructor and Description |
---|---|
protected |
CmsPublishQueue(CmsPublishEngine publishEngine)
Default constructor, for an empty queue.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
abortPublishJob(CmsPublishJobInfoBean publishJob)
Aborts the given publish job.
|
protected void |
add(CmsPublishJobInfoBean publishJob)
Pushes a new publish job with the given information in publish queue.
|
protected java.util.List<CmsPublishJobEnqueued> |
asList()
Returns an unmodifiable list representation of this queue.
|
protected boolean |
contains(CmsPublishJobInfoBean publishJob)
Checks if the given job is already in the queue, this does only check for the identical job.
|
static org.apache.commons.collections.Buffer |
getQueue()
Creates the buffer used as publish queue.
|
protected void |
initialize(CmsObject adminCms,
boolean revive)
Initializes the internal FIFO queue with publish jobs from the database.
|
protected boolean |
isEmpty()
Checks if the queue is empty.
|
protected CmsPublishJobInfoBean |
next()
Returns the next publish job to be published, removing it
from the queue, or
null if the queue is empty. |
protected void |
remove(CmsPublishJobInfoBean publishJob)
Removes the given job from the list.
|
protected void |
update(CmsPublishJobInfoBean publishJob)
Updates the given job in the list.
|
protected final CmsPublishEngine m_publishEngine
protected CmsPublishQueue(CmsPublishEngine publishEngine)
publishEngine
- the publish engine instancepublic static org.apache.commons.collections.Buffer getQueue()
protected boolean abortPublishJob(CmsPublishJobInfoBean publishJob)
publishJob
- the publish job to aborttrue
if the publish job was foundprotected void add(CmsPublishJobInfoBean publishJob) throws CmsException
If possible, the publish job starts immediately.
publishJob
- the publish job to enqueueCmsException
- if something goes wrongprotected java.util.List<CmsPublishJobEnqueued> asList()
CmsPublishJobEnqueued
objectsprotected boolean contains(CmsPublishJobInfoBean publishJob)
publishJob
- the publish job to check forprotected void initialize(CmsObject adminCms, boolean revive)
adminCms
- an admin cms objectrevive
- true
if the publish queue should be revived from the databaseprotected boolean isEmpty()
true
if the queue is emptyprotected CmsPublishJobInfoBean next()
null
if the queue is empty.protected void remove(CmsPublishJobInfoBean publishJob) throws CmsException
publishJob
- the publish job to removeCmsException
- if something goes wrongprotected void update(CmsPublishJobInfoBean publishJob)
publishJob
- the publish job to