Class JsonReportViewConverterStrategy
java.lang.Object
de.hybris.platform.auditreport.service.impl.JsonReportViewConverterStrategy
- All Implemented Interfaces:
ReportViewConverterStrategy
This implementation of
ReportViewConverterStrategy generated JSON representation of the given collection of
ReportViews.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConverts the given reports to list of generated binary representation of the reports.Converts the given reports to list of generated binary representation of the reports.protected byte[]convertToJson(List<ReportView> reports, Map<String, Object> context) Deprecated, for removal: This API element is subject to removal in a future version.since 1811protected InputStreamconvertToJson(Stream<ReportView> reports, Map<String, Object> context) Converts the given reports to list of generated binary representation of the reports.voidsetReportName(String reportName) Sets a name of the report.
-
Field Details
-
DEFAULT_FILE_NAME
- See Also:
-
-
Constructor Details
-
JsonReportViewConverterStrategy
public JsonReportViewConverterStrategy()
-
-
Method Details
-
convert
Description copied from interface:ReportViewConverterStrategyConverts the given reports to list of generated binary representation of the reports.- Specified by:
convertin interfaceReportViewConverterStrategy- Parameters:
reports- the list with reports to convert.context- a map used to pass in additional data needed by the strategy.- Returns:
- a list of objects representing the generated files.
-
convert
Description copied from interface:ReportViewConverterStrategyConverts the given reports to list of generated binary representation of the reports.- Specified by:
convertin interfaceReportViewConverterStrategy- Parameters:
reports- the list with reports to convert.context- a map used to pass in additional data needed by the strategy.- Returns:
- a list of objects representing the generated files.
-
convertToJson
@Deprecated(since="1811", forRemoval=true) protected byte[] convertToJson(List<ReportView> reports, Map<String, Object> context) throws IOExceptionDeprecated, for removal: This API element is subject to removal in a future version.since 1811Converts the given reports to list of generated binary representation of the reports.- Parameters:
reports- the list with reports to convert.context- a map used to pass in additional data needed by the strategy.- Returns:
- an byte[] representing a collection of generated files.
- Throws:
IOException- if any I/O errors occurred.
-
convertToJson
protected InputStream convertToJson(Stream<ReportView> reports, Map<String, Object> context) throws IOExceptionConverts the given reports to list of generated binary representation of the reports.- Parameters:
reports- the list with reports to convert.context- a map used to pass in additional data needed by the strategy.- Returns:
- an byte[] representing a collection of generated files.
- Throws:
IOException- if any I/O errors occurred.
-
getReportName
-
setReportName
Sets a name of the report. By default the strategy usesDEFAULT_FILE_NAME.- Parameters:
reportName- the report name.
-