Class JobHistoryHelper

java.lang.Object
org.nuxeo.ecm.platform.audit.api.job.JobHistoryHelper

public class JobHistoryHelper extends Object
Simple helper class to trace job execution using the Audit Service.
Author:
Thierry Delprat
  • Field Details

  • Constructor Details

    • JobHistoryHelper

      public JobHistoryHelper(String jobName)
  • Method Details

    • getNewLogEntry

      protected LogEntry getNewLogEntry()
    • getLogger

      protected AuditLogger getLogger()
    • logJobStarted

      public void logJobStarted()
      Logs an event for Job startup.
    • logJobEnded

      public void logJobEnded()
      Logs an event for a successful Job completion.
    • logJobFailed

      public void logJobFailed(String errMessage)
      Logs an event for a failed Job execution.
    • getLastRunWithStatus

      protected Date getLastRunWithStatus(String status)
    • getLastSuccessfulRun

      public Date getLastSuccessfulRun()
      Gets the last date the Job was successfully run.
    • getLastFailedRun

      public Date getLastFailedRun()
      Gets the last date the Job was failed.
    • getLastStarted

      public Date getLastStarted()
      Gets the last date the Job was started.