Class JsonExporter
- java.lang.Object
-
- net.sf.jasperreports.engine.JRAbstractExporter<JsonReportConfiguration,JsonExporterConfiguration,JsonExporterOutput,JsonExporterContext>
-
- net.sf.jasperreports.engine.export.JsonExporter
-
- All Implemented Interfaces:
JRExporter<ExporterInput,JsonReportConfiguration,JsonExporterConfiguration,JsonExporterOutput>,Exporter<ExporterInput,JsonReportConfiguration,JsonExporterConfiguration,JsonExporterOutput>
public class JsonExporter extends JRAbstractExporter<JsonReportConfiguration,JsonExporterConfiguration,JsonExporterOutput,JsonExporterContext>
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classJsonExporter.ExporterContextprotected static interfaceJsonExporter.PrintBookmarkMixin-
Nested classes/interfaces inherited from class net.sf.jasperreports.engine.JRAbstractExporter
JRAbstractExporter.BaseExporterContext, JRAbstractExporter.PageRange
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_EXPORTER_KEYprotected static StringJSON_EXPORTER_PROPERTIES_PREFIXprotected intpageIndexstatic StringREPORT_CONTEXT_PARAMETER_WEB_FONTSprotected intreportIndexprotected Writerwriter-
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_INVALID_IMAGE_NAME, EXCEPTION_MESSAGE_KEY_INVALID_ZOOM_RATIO, EXCEPTION_MESSAGE_KEY_MIXED_CALLS_NOT_ALLOWED, EXCEPTION_MESSAGE_KEY_OUTPUT_WRITER_ERROR, EXCEPTION_MESSAGE_KEY_PAGE_INDEX_OUT_OF_RANGE, EXCEPTION_MESSAGE_KEY_START_PAGE_INDEX_OUT_OF_RANGE, exporterConfiguration, exporterContext, exporterInput, exporterOutput, filter, fontUtil, hyperlinkProducerFactory, itemConfiguration, jasperPrint, jasperReportsContext, noBackcolorSelector, noneSelector, numberFormatCache, parameters, propertiesUtil, PROPERTY_DEFAULT_FILTER_FACTORY, PROPERTY_SUFFIX_DEFAULT_FILTER_FACTORY, rendererUtil, styledTextUtil, textValueClasses
-
-
Constructor Summary
Constructors Constructor Description JsonExporter()JsonExporter(JasperReportsContext jasperReportsContext)
-
Method Summary
-
Methods inherited from class net.sf.jasperreports.engine.JRAbstractExporter
checkInterrupted, createFilter, defaultParseNumber, ensureInput, ensureJasperReportsContext, getBooleanCellValue, getCurrentConfiguration, getCurrentItemConfiguration, getCurrentJasperPrint, getDateCellValue, getDateFormat, getExporterContext, getExporterInput, getExporterOutput, getHyperlinkProducer, getJasperReportsContext, getLocale, getNumberCellValue, getNumberFormat, getOffsetX, getOffsetY, getPageRange, getParameter, getParameters, getPropertiesUtil, getRendererUtil, getReportContext, getRepository, getStyledText, getStyledText, getTextFormatFactoryClass, getTextLocale, getTextTimeZone, getTextValue, getTextValueString, insideFrame, reset, resetClassLoader, resetExportContext, restoreElementOffsets, setClassLoader, setConfiguration, setConfiguration, setCurrentExporterInputItem, setExporterInput, setExporterOutput, setFrameElementsOffset, setJasperReportsContext, setOffset, setOffset, setParameter, setParameters, setReportContext
-
-
-
-
Field Detail
-
REPORT_CONTEXT_PARAMETER_WEB_FONTS
public static final String REPORT_CONTEXT_PARAMETER_WEB_FONTS
- See Also:
- Constant Field Values
-
JSON_EXPORTER_KEY
public static final String JSON_EXPORTER_KEY
- See Also:
- Constant Field Values
-
JSON_EXPORTER_PROPERTIES_PREFIX
protected static final String JSON_EXPORTER_PROPERTIES_PREFIX
- See Also:
- Constant Field Values
-
writer
protected Writer writer
-
reportIndex
protected int reportIndex
-
pageIndex
protected int pageIndex
-
-
Constructor Detail
-
JsonExporter
public JsonExporter()
-
JsonExporter
public JsonExporter(JasperReportsContext jasperReportsContext)
-
-
Method Detail
-
getConfigurationInterface
protected Class<JsonExporterConfiguration> getConfigurationInterface()
- Specified by:
getConfigurationInterfacein classJRAbstractExporter<JsonReportConfiguration,JsonExporterConfiguration,JsonExporterOutput,JsonExporterContext>
-
getItemConfigurationInterface
protected Class<JsonReportConfiguration> getItemConfigurationInterface()
-
ensureOutput
protected void ensureOutput()
- Specified by:
ensureOutputin classJRAbstractExporter<JsonReportConfiguration,JsonExporterConfiguration,JsonExporterOutput,JsonExporterContext>
-
getExporterKey
public String getExporterKey()
- Specified by:
getExporterKeyin classJRAbstractExporter<JsonReportConfiguration,JsonExporterConfiguration,JsonExporterOutput,JsonExporterContext>
-
getExporterPropertiesPrefix
public String getExporterPropertiesPrefix()
Description copied from class:JRAbstractExporterReturns the properties prefix for the current exporter.- Specified by:
getExporterPropertiesPrefixin classJRAbstractExporter<JsonReportConfiguration,JsonExporterConfiguration,JsonExporterOutput,JsonExporterContext>- Returns:
- the properties prefix for the current exporter
-
exportReport
public void exportReport() throws JRExceptionDescription copied from interface:ExporterPerforms the export.- Specified by:
exportReportin interfaceExporter<ExporterInput,JsonReportConfiguration,JsonExporterConfiguration,JsonExporterOutput>- Specified by:
exportReportin classJRAbstractExporter<JsonReportConfiguration,JsonExporterConfiguration,JsonExporterOutput,JsonExporterContext>- Throws:
JRException
-
initExport
protected void initExport()
- Overrides:
initExportin classJRAbstractExporter<JsonReportConfiguration,JsonExporterConfiguration,JsonExporterOutput,JsonExporterContext>
-
initReport
protected void initReport()
- Overrides:
initReportin classJRAbstractExporter<JsonReportConfiguration,JsonExporterConfiguration,JsonExporterOutput,JsonExporterContext>
-
exportReportToWriter
protected void exportReportToWriter() throws JRException, IOException- Throws:
JRExceptionIOException
-
exportPage
protected void exportPage(JRPrintPage page) throws IOException, ExportInterruptedException
-
exportElements
protected void exportElements(Collection<JRPrintElement> elements) throws IOException, ExportInterruptedException
-
exportFrame
protected void exportFrame(JRPrintFrame frame) throws IOException, ExportInterruptedException
-
exportBookmarks
protected void exportBookmarks() throws IOException- Throws:
IOException
-
exportReportConfig
protected void exportReportConfig() throws IOException- Throws:
IOException
-
writeBookmarks
public static void writeBookmarks(List<PrintBookmark> bookmarks, Writer writer, JacksonUtil jacksonUtil) throws IOException
- Throws:
IOException
-
writeBookmarks
public static void writeBookmarks(List<PrintBookmark> bookmarks, Writer writer, JacksonUtil jacksonUtil) throws IOException
Deprecated.Replaced bywriteBookmarks(List, Writer, JacksonUtil).- Throws:
IOException
-
exportParts
protected void exportParts() throws IOException- Throws:
IOException
-
writeParts
public static void writeParts(JasperPrint jasperPrint, Writer writer) throws IOException
- Throws:
IOException
-
writeParts
public static void writeParts(JasperReportsContext jasperReportsContext, JasperPrint jasperPrint, Writer writer) throws IOException
- Throws:
IOException
-
writeParts
public static void writeParts(JasperPrint jasperPrint, PrintParts parts, Writer writer) throws IOException
- Throws:
IOException
-
exportWebFonts
protected void exportWebFonts() throws IOException- Throws:
IOException
-
exportHyperlinks
protected void exportHyperlinks() throws IOException- Throws:
IOException
-
exportClickableElements
protected void exportClickableElements() throws IOException- Throws:
IOException
-
exportGenericElement
protected void exportGenericElement(JRGenericPrintElement element) throws IOException
- Throws:
IOException
-
resolveHyperlinkURL
protected String resolveHyperlinkURL(int reportIndex, JRPrintHyperlink link)
-
addHyperlinkData
public void addHyperlinkData(HyperlinkData hyperlinkData)
-
addFontFamily
public void addFontFamily(HtmlFontFamily htmlFontFamily)
-
-