Class JsonReportViewConverterStrategy

java.lang.Object
de.hybris.platform.auditreport.service.impl.JsonReportViewConverterStrategy
All Implemented Interfaces:
ReportViewConverterStrategy

public class JsonReportViewConverterStrategy extends Object implements ReportViewConverterStrategy
This implementation of ReportViewConverterStrategy generated JSON representation of the given collection of ReportViews.
  • Field Details

  • Constructor Details

    • JsonReportViewConverterStrategy

      public JsonReportViewConverterStrategy()
  • Method Details

    • convert

      public List<ReportConversionData> convert(List<ReportView> reports, Map<String,Object> context)
      Description copied from interface: ReportViewConverterStrategy
      Converts the given reports to list of generated binary representation of the reports.
      Specified by:
      convert in interface ReportViewConverterStrategy
      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

      public List<ReportConversionData> convert(Stream<ReportView> reports, Map<String,Object> context)
      Description copied from interface: ReportViewConverterStrategy
      Converts the given reports to list of generated binary representation of the reports.
      Specified by:
      convert in interface ReportViewConverterStrategy
      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 IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 1811
      Converts 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 IOException
      Converts 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

      public String getReportName()
    • setReportName

      public void setReportName(String reportName)
      Sets a name of the report. By default the strategy uses DEFAULT_FILE_NAME.
      Parameters:
      reportName - the report name.