|
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.AbstractReportDefinition<T,R>
T
- the report typeR
- the reporterpublic abstract class AbstractReportDefinition<T extends Report<?>,R extends T>
Abstract report definition.
Field Summary | |
---|---|
static String |
KEY_REPORT_ERRORS
Key for error messages |
static String |
KEY_REPORT_INFOS
Key for info messages |
static String |
KEY_REPORT_MESSAGE_TYPE
Key for messagetype |
static String |
KEY_REPORT_STARTTIME
Key for starttime |
static String |
KEY_REPORT_SUCCESS
Key for success |
static String |
KEY_REPORT_SUMMARY
Key for summary |
static String |
KEY_REPORT_TASKNAME
Key for taskname |
static String |
KEY_REPORT_TIME
Key for timestamp |
static String |
KEY_REPORT_WARNINGS
Key for warning messages |
Fields inherited from interface eu.esdihumboldt.hale.common.core.report.ReportDefinition |
---|
ID_PREFIX |
Constructor Summary | |
---|---|
AbstractReportDefinition(Class<T> reportClass,
String id)
Create report definition. |
Method Summary | |
---|---|
protected Properties |
asProperties(T report)
Get a Properties representation of the given report that can be
used to create a new report instance using
createReport(Properties) . |
String |
asString(T report)
Represent the given object as a definition string, so that it can be used to again create an object instance using ObjectDefinition.parse(String) . |
static void |
configureBasicReporter(Reporter<?> reporter,
Properties props)
Basic configuration that should be called from every child class! |
protected abstract T |
configureReport(R reporter,
Properties props)
Configure the report. |
protected abstract R |
createReport(Properties props)
Create a report from a set of properties. |
String |
getIdentifier()
Get the factory identifier. |
Class<T> |
getObjectClass()
Get the class of the supported object. |
T |
parse(String value)
Parse the given definition string and create an object instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String KEY_REPORT_TASKNAME
public static final String KEY_REPORT_SUCCESS
public static final String KEY_REPORT_SUMMARY
public static final String KEY_REPORT_STARTTIME
public static final String KEY_REPORT_TIME
public static final String KEY_REPORT_MESSAGE_TYPE
public static final String KEY_REPORT_INFOS
public static final String KEY_REPORT_ERRORS
public static final String KEY_REPORT_WARNINGS
Constructor Detail |
---|
public AbstractReportDefinition(Class<T> reportClass, String id)
reportClass
- the report classid
- the identifier for the definition (without prefix)Method Detail |
---|
public String getIdentifier()
ObjectDefinition
:
getIdentifier
in interface ObjectDefinition<T extends Report<?>>
ObjectDefinition.getIdentifier()
public Class<T> getObjectClass()
ObjectDefinition
getObjectClass
in interface ObjectDefinition<T extends Report<?>>
ObjectDefinition.getObjectClass()
public T parse(String value)
ObjectDefinition
parse
in interface ObjectDefinition<T extends Report<?>>
value
- the definition string to parse
null
ObjectDefinition.parse(java.lang.String)
protected abstract R createReport(Properties props)
props
- the properties
protected abstract T configureReport(R reporter, Properties props)
reporter
- report to configureprops
- properties to set
public static void configureBasicReporter(Reporter<?> reporter, Properties props) throws Exception
reporter
- reporterprops
- properties
Exception
- if parsing failspublic String asString(T report)
ObjectDefinition
ObjectDefinition.parse(String)
.
asString
in interface ObjectDefinition<T extends Report<?>>
report
- the object to create a string representation for
ObjectDefinition.asString(java.lang.Object)
protected Properties asProperties(T report)
Properties
representation of the given report that can be
used to create a new report instance using
createReport(Properties)
.
report
- the message
|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |