public class ReportDocumentCreatorService extends Object
ReportDocumentCreators.| Modifier and Type | Field and Description |
|---|---|
private static ReportDocumentCreatorService |
instance
Singleton.
|
private static org.slf4j.Logger |
logger |
private static String |
SOURCE_FILE_RELATIVE_PATH_PLACEHOLDER_PARAMETER |
| Constructor and Description |
|---|
ReportDocumentCreatorService() |
private static final org.slf4j.Logger logger
private static final String SOURCE_FILE_RELATIVE_PATH_PLACEHOLDER_PARAMETER
private static final ReportDocumentCreatorService instance
public ReportDocumentCreatorService()
public static ReportDocumentCreatorService getInstance()
ReportDocumentCreatorService singleton.public void addReportDocumentCreators(Collection<ReportDocumentCreator> reportDocumentCreators, ReportingContext reportingContext)
ReportDocumentCreatorRepository.getMap() entries.reportDocumentCreators - items for additionreportingContext - contains the ReportDocumentCreatorRepository data storepublic void createReportDocuments(CombinerContext combinerContext, ReportingContext reportingContext, SubstitutionContext substitutionContext, EnricherContext enricherContext, List<TemplateResource> templateResources)
Placeholders from template resources and for each Placeholder find the appropriate
ReportDocumentCreator from the ReportDocumentCreatorRepository.
Then create a ReportDocument for the Placeholder.combinerContext - the current statereportingContext - the current statesubstitutionContext - the current stateenricherContext - the current statetemplateResources - contains templates with placeholdersprivate void createReportDocumentForPlaceholder(Placeholder placeholder, ReportDocumentCreator reportDocumentCreator, CombinerContext combinerContext, SubstitutionContext substitutionContext, ReportingContext reportingContext, EnricherContext enricherContext)
Placeholders and ReportDocuments.
Create ReportDocument, see the ReportDocumentCreator.prepareReportDocument(EnricherContext) method.
Put the Placeholder and ReportDocument to the
PlaceholderToReportDocumentRepository.
Add the ReportDocument to the
ReportDocumentRepository.getReportDocuments() list.
Add the Placeholder to the PlaceholderRepository.getPlaceholders() list.
placeholder - for additionreportDocumentCreator - for additioncombinerContext - the current statesubstitutionContext - the current statereportingContext - the current stateenricherContext - the current stateprivate void prepareReport(FileWithSources fileWithSources, ReportDocument reportDocument, CombinerContext combinerContext, ReportingContext reportingContext)
ReportfileWithSources - a source filereportDocument - belonging to the ReportcombinerContext - the current statereportingContext - the current stateCopyright © 2023. All rights reserved.