Package org.nuxeo.audit.api.job
Class JobHistoryHelper
java.lang.Object
org.nuxeo.audit.api.job.JobHistoryHelper
Simple helper class to trace job execution using the Audit Service.
- Author:
- Thierry Delprat
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AuditBackendGets the last date the Job was failed.protected DategetLastRunWithStatus(String status) Gets the last date the Job was started.Gets the last date the Job was successfully run.protected LogEntrygetNewLogEntry(String eventId) protected LogEntryBuildergetNewLogEntryBuilder(String eventId) voidLogs an event for a successful Job completion.voidlogJobFailed(String errMessage) Logs an event for a failed Job execution.voidLogs an event for Job startup.
-
Field Details
-
JOB_STARTED_SUFFIX
- See Also:
-
JOB_ENDED_SUFFIX
- See Also:
-
JOB_FAILED_SUFFIX
- See Also:
-
jobName
-
jobStartedEventId
-
jobEndedEventId
-
jobFailedEventId
-
-
Constructor Details
-
JobHistoryHelper
-
-
Method Details
-
getNewLogEntry
-
getNewLogEntryBuilder
-
getAuditBackend
-
logJobStarted
public void logJobStarted()Logs an event for Job startup. -
logJobEnded
public void logJobEnded()Logs an event for a successful Job completion. -
logJobFailed
Logs an event for a failed Job execution. -
getLastRunWithStatus
-
getLastSuccessfulRun
Gets the last date the Job was successfully run. -
getLastFailedRun
Gets the last date the Job was failed. -
getLastStarted
Gets the last date the Job was started.
-