public class JobHistoryHelper extends Object
Modifier and Type | Field and Description |
---|---|
static String |
JOB_ENDED_SUFFIX |
static String |
JOB_FAILED_SUFFIX |
static String |
JOB_STARTED_SUFFIX |
protected String |
jobEndedEventId |
protected String |
jobFailedEventId |
protected String |
jobName |
protected String |
jobStartedEventId |
protected AuditLogger |
logger |
Constructor and Description |
---|
JobHistoryHelper(String jobName) |
Modifier and Type | Method and Description |
---|---|
Date |
getLastFailedRun()
Gets the last date the Job was failed.
|
protected Date |
getLastRunWithStatus(String status) |
Date |
getLastStarted()
Gets the last date the Job was started.
|
Date |
getLastSuccessfulRun()
Gets the last date the Job was successfully run.
|
protected AuditLogger |
getLogger() |
protected LogEntry |
getNewLogEntry() |
void |
logJobEnded()
Logs an event for a successful Job completion.
|
void |
logJobFailed(String errMessage)
Logs an event for a failed Job execution.
|
void |
logJobStarted()
Logs an event for Job startup.
|
public static final String JOB_STARTED_SUFFIX
public static final String JOB_ENDED_SUFFIX
public static final String JOB_FAILED_SUFFIX
protected AuditLogger logger
protected final String jobStartedEventId
protected final String jobEndedEventId
protected final String jobFailedEventId
public JobHistoryHelper(String jobName)
protected LogEntry getNewLogEntry()
protected AuditLogger getLogger()
public void logJobStarted()
public void logJobEnded()
public void logJobFailed(String errMessage)
protected Date getLastRunWithStatus(String status)
public Date getLastSuccessfulRun()
public Date getLastFailedRun()
public Date getLastStarted()
Copyright © 2015 Nuxeo SA. All rights reserved.