Package org.opencms.publish
Class CmsPublishJobInfoBean
java.lang.Object
org.opencms.publish.CmsPublishJobInfoBean
Publish job information bean.
- Since:
- 6.5.5
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The flag used to indicate a direct publish job. -
Constructor Summary
ModifierConstructorDescriptionprotected
CmsPublishJobInfoBean
(CmsObject cms, CmsPublishList publishList, I_CmsReport report) The Default constructor.CmsPublishJobInfoBean
(CmsUUID historyId, CmsUUID projectId, String projectName, CmsUUID userId, String localeName, int flags, int resourceCount, long enqueueTime, long startTime, long finishTime) Constructor used to initialize a job info bean from the database. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
enqueue()
Signalizes that the publish job has been enqueued.protected void
finish()
Signalizes the end of the publish job.protected CmsObject
Returns the cms object, will be set tonull
after publishing.long
Returns the time this object has been created.long
Returns the time the publish job ends.int
getFlags()
Returns the flags of this publish job.Returns the locale for this publish job.Gets the original publish list (not nulled after publish job is executed).Returns the project id for this publish job.Returns the originally stored project name.Returns the publish history id.Returns the list of resources to publish.Returns the report for this publish job.Returns the report for this publish job.int
getSize()
Returns the number of resources in the publish list.long
Returns the time the publish job did actually start.Returns the UUID of the running publish thread.Returns the user for this publish job.protected boolean
Returnstrue
if this is a "direct publish" operation.protected boolean
Returns if the publish job is already finished.protected boolean
Returns if the publish job is already started.Removes the assigned publish report.void
revive
(CmsObject adminCms, CmsPublishList publishList) Revives this publish job.protected void
Signalizes the start of the publish job.toString()
-
Field Details
-
C_PUBLISH_FLAG
The flag used to indicate a direct publish job.- See Also:
-
-
Constructor Details
-
CmsPublishJobInfoBean
public CmsPublishJobInfoBean(CmsUUID historyId, CmsUUID projectId, String projectName, CmsUUID userId, String localeName, int flags, int resourceCount, long enqueueTime, long startTime, long finishTime) Constructor used to initialize a job info bean from the database.- Parameters:
historyId
- publish history idprojectId
- the id of the projectprojectName
- the name of the projectuserId
- the id of the userlocaleName
- the string representation of a localeflags
- flags of the publish jobresourceCount
- number of published resourcesenqueueTime
- time when the job was enqueuedstartTime
- time when the job was startedfinishTime
- time when the job was finished
-
CmsPublishJobInfoBean
protected CmsPublishJobInfoBean(CmsObject cms, CmsPublishList publishList, I_CmsReport report) throws CmsException The Default constructor.- Parameters:
cms
- the cms context to use for publishingpublishList
- the list of resources to publishreport
- the report to write to- Throws:
CmsException
- if something goes wrong
-
-
Method Details
-
getEnqueueTime
Returns the time this object has been created.- Returns:
- the time this object has been created
-
getFinishTime
Returns the time the publish job ends.- Returns:
- the time the publish job ends
-
getFlags
Returns the flags of this publish job.- Returns:
- the flags of this publish job
-
getLocale
Returns the locale for this publish job.- Returns:
- the locale for this publish job
-
getOriginalPublishList
Gets the original publish list (not nulled after publish job is executed).- Returns:
- the original publish list
-
getProjectId
Returns the project id for this publish job.- Returns:
- the project id for this publish job
-
getProjectName
Returns the originally stored project name.- Returns:
- the originally stored project name
-
getPublishHistoryId
Returns the publish history id.- Returns:
- the publish history id
-
getPublishList
Returns the list of resources to publish.- Returns:
- the list of resources to publish
-
getPublishReport
Returns the report for this publish job.This is not the original report, it is wrapper that also writes to a temporary file.
It will be
null
before starting and after finishing.- Returns:
- the report for this publish job
- See Also:
-
getReport
Returns the report for this publish job.- Returns:
- the report for this publish job
-
getSize
Returns the number of resources in the publish list.- Returns:
- the number of resources in the publish list
-
getStartTime
Returns the time the publish job did actually start.- Returns:
- the time the publish job did actually start
-
getThreadUUID
Returns the UUID of the running publish thread.- Returns:
- the UUID of the running publish thread
-
getUserId
Returns the user for this publish job.- Returns:
- the user for this publish job
-
removePublishReport
Removes the assigned publish report.- Returns:
- the removed report
-
revive
Revives this publish job.- Parameters:
adminCms
- an admin cms objectpublishList
- a publish list- Throws:
CmsException
- if something goes wrong
-
toString
-
enqueue
Signalizes that the publish job has been enqueued.Actually sets the enqueue time only if it is not set already (re-enqueue during startup).
-
finish
Signalizes the end of the publish job.Actually only sets the finish time and closes the publish report stream.
-
getCmsObject
Returns the cms object, will be set tonull
after publishing.- Returns:
- the cms object
-
isDirectPublish
Returnstrue
if this is a "direct publish" operation.- Returns:
true
if this is a "direct publish" operation
-
isFinished
Returns if the publish job is already finished.- Returns:
true
if the publish job is already finished
-
isStarted
Returns if the publish job is already started.- Returns:
true
if the publish job is already started
-
start
Signalizes the start of the publish job.Actually sets the starting time, writes the report header and sets the running thread uuid.
- Parameters:
threadUUID
- the running thread uuid
-