Class CmsPublishJobInfoBean


  • public final class CmsPublishJobInfoBean
    extends java.lang.Object
    Publish job information bean.

    Since:
    6.5.5
    • Constructor Detail

      • CmsPublishJobInfoBean

        public CmsPublishJobInfoBean​(CmsUUID historyId,
                                     CmsUUID projectId,
                                     java.lang.String projectName,
                                     CmsUUID userId,
                                     java.lang.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 id
        projectId - the id of the project
        projectName - the name of the project
        userId - the id of the user
        localeName - the string representation of a locale
        flags - flags of the publish job
        resourceCount - number of published resources
        enqueueTime - time when the job was enqueued
        startTime - time when the job was started
        finishTime - time when the job was finished
    • Method Detail

      • getEnqueueTime

        public long getEnqueueTime()
        Returns the time this object has been created.

        Returns:
        the time this object has been created
      • getFinishTime

        public long getFinishTime()
        Returns the time the publish job ends.

        Returns:
        the time the publish job ends
      • getFlags

        public int getFlags()
        Returns the flags of this publish job.

        Returns:
        the flags of this publish job
      • getLocale

        public java.util.Locale getLocale()
        Returns the locale for this publish job.

        Returns:
        the locale for this publish job
      • getOriginalPublishList

        public CmsPublishList getOriginalPublishList()
        Gets the original publish list (not nulled after publish job is executed).
        Returns:
        the original publish list
      • getProjectId

        public CmsUUID getProjectId()
        Returns the project id for this publish job.

        Returns:
        the project id for this publish job
      • getProjectName

        public java.lang.String getProjectName()
        Returns the originally stored project name.

        Returns:
        the originally stored project name
      • getPublishList

        public CmsPublishList getPublishList()
        Returns the list of resources to publish.

        Returns:
        the list of resources to publish
      • getPublishReport

        public I_CmsReport 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:
        CmsPublishJobEnqueued.getReport()
      • getReport

        public I_CmsReport getReport()
        Returns the report for this publish job.

        Returns:
        the report for this publish job
      • getSize

        public int getSize()
        Returns the number of resources in the publish list.

        Returns:
        the number of resources in the publish list
      • getStartTime

        public long getStartTime()
        Returns the time the publish job did actually start.

        Returns:
        the time the publish job did actually start
      • getThreadUUID

        public CmsUUID getThreadUUID()
        Returns the UUID of the running publish thread.

        Returns:
        the UUID of the running publish thread
      • getUserId

        public CmsUUID getUserId()
        Returns the user for this publish job.

        Returns:
        the user for this publish job
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()
      • enqueue

        protected void 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

        protected void finish()
        Signalizes the end of the publish job.

        Actually only sets the finish time and closes the publish report stream.

      • getCmsObject

        protected CmsObject getCmsObject()
        Returns the cms object, will be set to null after publishing.

        Returns:
        the cms object
      • isDirectPublish

        protected boolean isDirectPublish()
        Returns true if this is a "direct publish" operation.

        Returns:
        true if this is a "direct publish" operation
      • isFinished

        protected boolean isFinished()
        Returns if the publish job is already finished.

        Returns:
        true if the publish job is already finished
      • isStarted

        protected boolean isStarted()
        Returns if the publish job is already started.

        Returns:
        true if the publish job is already started
      • start

        protected void start​(CmsUUID threadUUID)
        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