@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 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 String |
SOURCE_CLASS_PROPERTY
The class name of the source object that a
ReportEntryPlugin can
extract. |
| Modifier and Type | Method and Description |
|---|---|
Object |
extract(T source,
Locale locale)
Extracts a piece of information from the source in arguments.
|
Map<String,String> |
getProperties() |
static final String ENTRY_NAME_PROPERTY
extract(Object, Locale) method is added to a
report.static final String SOURCE_CLASS_PROPERTY
ReportEntryPlugin can
extract.Object extract(T source, Locale locale) throws 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 availableExceptionCopyright © 2021. All rights reserved.