Class JsonReportViewConverterStrategy

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DEFAULT_FILE_NAME  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      java.util.List<ReportConversionData> convert​(java.util.List<ReportView> reports, java.util.Map<java.lang.String,​java.lang.Object> context)
      Converts the given reports to list of generated binary representation of the reports.
      java.util.List<ReportConversionData> convert​(java.util.stream.Stream<ReportView> reports, java.util.Map<java.lang.String,​java.lang.Object> context)
      Converts the given reports to list of generated binary representation of the reports.
      protected byte[] convertToJson​(java.util.List<ReportView> reports, java.util.Map<java.lang.String,​java.lang.Object> context)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 1811
      protected java.io.InputStream convertToJson​(java.util.stream.Stream<ReportView> reports, java.util.Map<java.lang.String,​java.lang.Object> context)
      Converts the given reports to list of generated binary representation of the reports.
      java.lang.String getReportName()  
      void setReportName​(java.lang.String reportName)
      Sets a name of the report.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT_FILE_NAME

        public static final java.lang.String DEFAULT_FILE_NAME
        See Also:
        Constant Field Values
    • Constructor Detail

      • JsonReportViewConverterStrategy

        public JsonReportViewConverterStrategy()
    • Method Detail

      • convert

        public java.util.List<ReportConversionData> convert​(java.util.List<ReportView> reports,
                                                            java.util.Map<java.lang.String,​java.lang.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 java.util.List<ReportConversionData> convert​(java.util.stream.Stream<ReportView> reports,
                                                            java.util.Map<java.lang.String,​java.lang.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​(java.util.List<ReportView> reports,
                                       java.util.Map<java.lang.String,​java.lang.Object> context)
                                throws java.io.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:
        java.io.IOException - if any I/O errors occurred.
      • convertToJson

        protected java.io.InputStream convertToJson​(java.util.stream.Stream<ReportView> reports,
                                                    java.util.Map<java.lang.String,​java.lang.Object> context)
                                             throws java.io.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:
        java.io.IOException - if any I/O errors occurred.
      • getReportName

        public java.lang.String getReportName()
      • setReportName

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