Interface RendererJob

    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      javax.activation.DataHandler executeJob​(java.lang.String documentId, java.lang.String documentPath, Comet renderer)
      Deprecated.
      Runs a job for the document described by documentId with the renderer instance provided.
      void executionFailed​(java.lang.String documentId, java.lang.Throwable cause)
      Deprecated.
      Called when job execution fails
      void finishingFailed​(java.lang.String documentId, java.lang.Throwable cause)
      Deprecated.
      Called when finishing the job fails
      void finishJob​(java.lang.String documentId, java.lang.String documentPath)
      Deprecated.
      Called after executing a job.
      java.lang.Object getJobExecutionFlag​(JobExecutionFlag flag)
      Deprecated.
      Gets execution flags for this job.
      java.lang.String getName()
      Deprecated.
      Gets the job name (e.g.
      void preconditionsFailed​(java.lang.String documentId, java.lang.Throwable cause)
      Deprecated.
      Called when checking preconditions fails
      void preparationFailed​(java.lang.String documentId, java.lang.Throwable cause)
      Deprecated.
      Called when preparing the job fails
      void prepareJob​(java.lang.String documentId, java.lang.String documentPath)
      Deprecated.
      Called before executing a job
    • Method Detail

      • getName

        java.lang.String getName()
        Deprecated.

        Gets the job name (e.g. for log output)

        Returns:
        the job name
      • getJobExecutionFlag

        java.lang.Object getJobExecutionFlag​(JobExecutionFlag flag)
        Deprecated.

        Gets execution flags for this job.

        See the JobExecutionFlag enumeration for a list of available flags supported for DocumentJobs and the default value for these flags.

        Parameters:
        flag - the flag
        Returns:
        value for this execution flag
      • prepareJob

        void prepareJob​(java.lang.String documentId,
                        java.lang.String documentPath)
                 throws PubServerException
        Deprecated.

        Called before executing a job

        This method is called after checking preconditions and before locking a renderer instance for this job.
        A typical prepareJob implementation could delete a previous version of the document and copy again from master document (such as in CScript jobs).

        Parameters:
        documentId - Id of the document, which will be processed in this job
        documentPath - real path of the document
        Throws:
        PubServerException - the pub server exception
      • executeJob

        javax.activation.DataHandler executeJob​(java.lang.String documentId,
                                                java.lang.String documentPath,
                                                Comet renderer)
                                         throws PubServerException
        Deprecated.

        Runs a job for the document described by documentId with the renderer instance provided.

        When this method is called,

        • all preconditions have been checked
        • job preparations implemented in prepareJob(String, String) have been executed
        • a renderer instance has been locked for this job
        It is guaranteed, that no other process will use this renderer instance, until the method has finished.

        Parameters:
        documentId - Id of the document, which should be processed.
        documentPath - real path of the document
        renderer - the renderer
        Returns:
        arbitrary String with job result or result description
        Throws:
        PubServerException - the pub server exception
      • finishJob

        void finishJob​(java.lang.String documentId,
                       java.lang.String documentPath)
                throws PubServerException
        Deprecated.

        Called after executing a job.

        Called after (successfully) running the executeJob(String, String, Comet) method.
        This method allows implementation of cleanup or update tasks (e.g. "register in DB"). The method will be called only, when no exception was raised during job execution.

        Parameters:
        documentId - Id of the document, which has been processed.
        documentPath - real path of the document
        Throws:
        PubServerException - the pub server exception
      • executionFailed

        void executionFailed​(java.lang.String documentId,
                             java.lang.Throwable cause)
        Deprecated.

        Called when job execution fails

        Called, when an exception was raised during the executeJob(String, String, Comet) call.

        Parameters:
        documentId - Id of the document, which should be processed.
        cause - exception caught during job execution
      • preconditionsFailed

        void preconditionsFailed​(java.lang.String documentId,
                                 java.lang.Throwable cause)
        Deprecated.

        Called when checking preconditions fails

        Called, when an exception was raised during checking job preconditions.

        Parameters:
        documentId - Id of the document, which should be processed.
        cause - exception caught during job execution
      • preparationFailed

        void preparationFailed​(java.lang.String documentId,
                               java.lang.Throwable cause)
        Deprecated.

        Called when preparing the job fails

        Called, when an exception was raised during the prepareJob(String, String) call.

        Parameters:
        documentId - Id of the document, which should be processed.
        cause - exception caught during job preparation
      • finishingFailed

        void finishingFailed​(java.lang.String documentId,
                             java.lang.Throwable cause)
        Deprecated.

        Called when finishing the job fails

        Called, when an exception was raised during the finishJob(String, String) call.

        Parameters:
        documentId - Id of the document, which should be processed.
        cause - exception caught during job finishing