@ProviderType
public interface ReportEntryPlugin<T>
The ReportGeneratorService will select a collection of those plugins
and apply them on a source object. Each result will be put into a Map
under the corresponding ENTRY_NAME_PROPERTY
property value. This final Map will constitute a report of the source
object. Plugins will be selected thanks to their
SOURCE_CLASS_PROPERTY and optionally by any
provided properties.
Implementers: Implementers must define the
ENTRY_NAME_PROPERTY and the
SOURCE_CLASS_PROPERTY
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ENTRY_NAME_PROPERTY
The entry name property under which the DTO value extracted by the
extract(Object, Locale) method is added to a
report. |
static java.lang.String |
SOURCE_CLASS_PROPERTY
The class name of the source object that a
ReportEntryPlugin can
extract. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
extract(T source,
java.util.Locale locale)
Extracts a piece of information from the source in arguments.
|
java.util.Map<java.lang.String,java.lang.String> |
getProperties() |
static final java.lang.String ENTRY_NAME_PROPERTY
extract(Object, Locale) method is added to a
report.static final java.lang.String SOURCE_CLASS_PROPERTY
ReportEntryPlugin can
extract.java.lang.Object extract(T source, java.util.Locale locale) throws java.lang.Exception
If the source contains localized data, it will be extracted for the specified locale or a less specific if not found.
source - the source to inspect, must not be nulllocale - the String representation of a Locale, must
not be nullnull if no data is availablejava.lang.Exceptionjava.util.Map<java.lang.String,java.lang.String> getProperties()
null