net.sf.jasperreports.engine.export

## Class JsonExporter

- java.lang.Object
- - net.sf.jasperreports.engine.JRAbstractExporter<JsonReportConfiguration,JsonExporterConfiguration,WriterExporterOutput,JsonExporterContext>
  - - net.sf.jasperreports.engine.export.JsonExporter

- All Implemented Interfaces:
    JRExporter<ExporterInput,JsonReportConfiguration,JsonExporterConfiguration,WriterExporterOutput>, Exporter<ExporterInput,JsonReportConfiguration,JsonExporterConfiguration,WriterExporterOutput>

      public class JsonExporter
      extends JRAbstractExporter<JsonReportConfiguration,JsonExporterConfiguration,WriterExporterOutput,JsonExporterContext>

  Version:
    $Id: JsonExporter.java 7092 2014-05-14 10:44:16Z narcism $
  Author:
    Lucian Chirita (lucianc@users.sourceforge.net)

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected class` | `JsonExporter.ExporterContext`

    - ### Nested classes/interfaces inherited from class net.sf.jasperreports.engine.JRAbstractExporter

      `JRAbstractExporter.BaseExporterContext, JRAbstractExporter.PageRange`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `JSON_EXPORTER_KEY`
    `protected static java.lang.String` | `JSON_EXPORTER_PROPERTIES_PREFIX`
    `protected int` | `pageIndex`
    `protected int` | `reportIndex`
    `protected java.io.Writer` | `writer`

    - ### Fields inherited from class net.sf.jasperreports.engine.JRAbstractExporter

      `allSelector, crtCompositeConfiguration, crtCompositeItemConfiguration, crtItem, dateFormatCache, EXCEPTION_MESSAGE_KEY_END_PAGE_INDEX_OUT_OF_RANGE, EXCEPTION_MESSAGE_KEY_PAGE_INDEX_OUT_OF_RANGE, EXCEPTION_MESSAGE_KEY_START_PAGE_INDEX_OUT_OF_RANGE, exporterConfiguration, exporterContext, exporterInput, exporterOutput, filter, itemConfiguration, jasperPrint, jasperReportsContext, noBackcolorSelector, noneSelector, numberFormatCache, parameters, propertiesUtil, PROPERTY_DEFAULT_FILTER_FACTORY, PROPERTY_SUFFIX_DEFAULT_FILTER_FACTORY, styledTextUtil`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JsonExporter()`
    `JsonExporter(JasperReportsContext jasperReportsContext)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addHyperlinkData(HyperlinkData hyperlinkData)`
    `protected void` | `ensureOutput()`
    `protected void` | `exportBookmarks()`
    `protected void` | `exportElements(java.util.Collection<JRPrintElement> elements)`
    `protected void` | `exportFrame(JRPrintFrame frame)`
    `protected void` | `exportGenericElement(JRGenericPrintElement element)`
    `protected void` | `exportHyperlinks()`
    `protected void` | `exportPage(JRPrintPage page)`
    `void` | `exportReport()` Performs the export.
    `protected void` | `exportReportToWriter()`
    `protected void` | `exportWebFonts()`
    `protected java.lang.Class<JsonExporterConfiguration>` | `getConfigurationInterface()`
    `java.lang.String` | `getExporterKey()`
    `java.lang.String` | `getExporterPropertiesPrefix()` Returns the properties prefix for the current exporter.
    `protected java.lang.Class<JsonReportConfiguration>` | `getItemConfigurationInterface()`
    `protected void` | `initExport()`
    `protected void` | `initReport()`
    `protected java.lang.String` | `resolveHyperlinkURL(int reportIndex, JRPrintHyperlink link)`

    - ### Methods inherited from class net.sf.jasperreports.engine.JRAbstractExporter

      `createFilter, defaultParseNumber, ensureInput, ensureJasperReportsContext, getBooleanCellValue, getCurrentConfiguration, getCurrentItemConfiguration, getCurrentJasperPrint, getCustomHandler, getDateCellValue, getDateFormat, getExporterContext, getExporterInput, getExporterOutput, getHyperlinkProducer, getJasperReportsContext, getLocale, getNumberCellValue, getNumberFormat, getOffsetX, getOffsetY, getPageRange, getParameter, getParameters, getPropertiesUtil, getReportContext, getStyledText, getStyledText, getTextFormatFactoryClass, getTextLocale, getTextTimeZone, getTextValue, getTextValueString, reset, resetClassLoader, resetExportContext, restoreElementOffsets, setClassLoader, setConfiguration, setConfiguration, setCurrentExporterInputItem, setExporterInput, setExporterOutput, setFrameElementsOffset, setJasperPrint, setJasperReportsContext, setOffset, setOffset, setParameter, setParameters, setReportContext`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### JSON_EXPORTER_KEY

          public static final java.lang.String JSON_EXPORTER_KEY

      See Also:
        Constant Field Values

    - #### JSON_EXPORTER_PROPERTIES_PREFIX

          protected static final java.lang.String JSON_EXPORTER_PROPERTIES_PREFIX

      See Also:
        Constant Field Values

    - #### writer

          protected java.io.Writer writer

    - #### reportIndex

          protected int reportIndex

    - #### pageIndex

          protected int pageIndex

  - ### Constructor Detail

    - #### JsonExporter

          public JsonExporter()

    - #### JsonExporter

          public JsonExporter(JasperReportsContext jasperReportsContext)

  - ### Method Detail

    - #### getConfigurationInterface

          protected java.lang.Class<JsonExporterConfiguration> getConfigurationInterface()

      Specified by:
        `getConfigurationInterface` in class `JRAbstractExporter<JsonReportConfiguration,JsonExporterConfiguration,WriterExporterOutput,JsonExporterContext>`

    - #### getItemConfigurationInterface

          protected java.lang.Class<JsonReportConfiguration> getItemConfigurationInterface()

      Specified by:
        `getItemConfigurationInterface` in class `JRAbstractExporter<JsonReportConfiguration,JsonExporterConfiguration,WriterExporterOutput,JsonExporterContext>`

    - #### ensureOutput

          protected void ensureOutput()

      Specified by:
        `ensureOutput` in class `JRAbstractExporter<JsonReportConfiguration,JsonExporterConfiguration,WriterExporterOutput,JsonExporterContext>`

    - #### getExporterKey

          public java.lang.String getExporterKey()

      Specified by:
        `getExporterKey` in class `JRAbstractExporter<JsonReportConfiguration,JsonExporterConfiguration,WriterExporterOutput,JsonExporterContext>`

    - #### getExporterPropertiesPrefix

          public java.lang.String getExporterPropertiesPrefix()

      Description copied from class: `JRAbstractExporter`
      Returns the properties prefix for the current exporter.
      Specified by:
        `getExporterPropertiesPrefix` in class `JRAbstractExporter<JsonReportConfiguration,JsonExporterConfiguration,WriterExporterOutput,JsonExporterContext>`
      Returns:
        the properties prefix for the current exporter

    - #### exportReport

          public void exportReport()
                            throws JRException

      Description copied from interface: `Exporter`
      Performs the export.
      Specified by:
        `exportReport` in interface `Exporter<ExporterInput,JsonReportConfiguration,JsonExporterConfiguration,WriterExporterOutput>`
      Specified by:
        `exportReport` in class `JRAbstractExporter<JsonReportConfiguration,JsonExporterConfiguration,WriterExporterOutput,JsonExporterContext>`
      Throws:
        `JRException`

    - #### initExport

          protected void initExport()

      Overrides:
        `initExport` in class `JRAbstractExporter<JsonReportConfiguration,JsonExporterConfiguration,WriterExporterOutput,JsonExporterContext>`

    - #### initReport

          protected void initReport()

      Overrides:
        `initReport` in class `JRAbstractExporter<JsonReportConfiguration,JsonExporterConfiguration,WriterExporterOutput,JsonExporterContext>`

    - #### exportReportToWriter

          protected void exportReportToWriter()
                                       throws JRException,
                                              java.io.IOException

      Throws:
        `JRException`
        `java.io.IOException`

    - #### exportPage

          protected void exportPage(JRPrintPage page)
                             throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### exportElements

          protected void exportElements(java.util.Collection<JRPrintElement> elements)
                                 throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### exportFrame

          protected void exportFrame(JRPrintFrame frame)
                              throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### exportBookmarks

          protected void exportBookmarks()
                                  throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### exportWebFonts

          protected void exportWebFonts()
                                 throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### exportHyperlinks

          protected void exportHyperlinks()
                                   throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### exportGenericElement

          protected void exportGenericElement(JRGenericPrintElement element)
                                       throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### resolveHyperlinkURL

          protected java.lang.String resolveHyperlinkURL(int reportIndex,
                                             JRPrintHyperlink link)

    - #### addHyperlinkData

          public void addHyperlinkData(HyperlinkData hyperlinkData)

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com