|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.esdihumboldt.hale.common.core.report.impl.DefaultReporter<T>
T
- the message typepublic class DefaultReporter<T extends Message>
Default report implementation
Field Summary | |
---|---|
static de.cs3d.util.logging.ALogger |
log
The logger |
Constructor Summary | |
---|---|
DefaultReporter(String taskName,
Class<T> messageType,
boolean doLog)
Create an empty report. |
Method Summary | |
---|---|
void |
error(T message)
Adds an error to the report. |
Collection<T> |
getErrors()
Get the error messages |
protected String |
getFailSummary()
Get the default report summary if it was not successful. |
Collection<T> |
getInfos()
Get the info messages |
Class<T> |
getMessageType()
Get the message type (for determining the message type at runtime). |
Date |
getStartTime()
Get the start time of the report. |
protected String |
getSuccessSummary()
Get the default report summary if it was successful. |
String |
getSummary()
Get a short message stating a summary of the report |
String |
getTaskName()
Get the name of the task the report relates to |
Date |
getTimestamp()
Get the report time |
Collection<T> |
getWarnings()
Get the warning messages |
void |
info(T message)
Adds an info to the report. |
boolean |
isSuccess()
States if the report represents a successful task |
void |
setStartTime(Date starttime)
Set the start time of the report. |
void |
setSuccess(boolean success)
Set if the task was successful. |
void |
setSummary(String summary)
Set the summary message of the report. |
void |
setTimestamp(Date timestamp)
Set the report time |
String |
toString()
|
void |
warn(T message)
Adds a warning to the report. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final de.cs3d.util.logging.ALogger log
Constructor Detail |
---|
public DefaultReporter(String taskName, Class<T> messageType, boolean doLog)
setSuccess(boolean)
nonetheless to update the
timestamp after the task has finished.
taskName
- the name of the task the report is related tomessageType
- the message typedoLog
- if added messages shall also be logged using ALogger
Method Detail |
---|
public void warn(T message)
warn
in interface ReportLog<T extends Message>
message
- the warning messagepublic void error(T message)
error
in interface ReportLog<T extends Message>
message
- the error messagepublic void info(T message)
ReportLog
info
in interface ReportLog<T extends Message>
message
- the info messageReportLog.info(eu.esdihumboldt.hale.common.core.report.Message)
public void setSummary(String summary)
setSummary
in interface Reporter<T extends Message>
summary
- the summary to set, if null
the report will
revert to the default summary.public String getTaskName()
Report
getTaskName
in interface Report<T extends Message>
Report.getTaskName()
public Collection<T> getErrors()
Report
getErrors
in interface Report<T extends Message>
Report.getErrors()
public Class<T> getMessageType()
Report
getMessageType
in interface Report<T extends Message>
Report.getMessageType()
public String getSummary()
Report
getSummary
in interface Report<T extends Message>
Report.getSummary()
protected String getFailSummary()
protected String getSuccessSummary()
public Date getTimestamp()
Report
getTimestamp
in interface Report<T extends Message>
Report.getTimestamp()
public Collection<T> getWarnings()
Report
getWarnings
in interface Report<T extends Message>
Report.getWarnings()
public Collection<T> getInfos()
Report
getInfos
in interface Report<T extends Message>
Report.getInfos()
public void setSuccess(boolean success)
Reporter
setSuccess
in interface Reporter<T extends Message>
success
- if the task was successfulReporter.setSuccess(boolean)
public boolean isSuccess()
Report
isSuccess
in interface Report<T extends Message>
Report.isSuccess()
public Date getStartTime()
Report
Report.getTimestamp()
can be seen as an end time and used
to compute a duration.
getStartTime
in interface Report<T extends Message>
null
Report.getStartTime()
public String toString()
toString
in class Object
public void setTimestamp(Date timestamp)
Reporter
setTimestamp
in interface Reporter<T extends Message>
timestamp
- the timestampReporter.setTimestamp(java.util.Date)
public void setStartTime(Date starttime)
Reporter
Report.getTimestamp()
can be seen as an end time and used
to compute a duration.
setStartTime
in interface Reporter<T extends Message>
starttime
- the starttimeReporter.setStartTime(java.util.Date)
|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |