Package net.sf.jasperreports.json.export
Class JsonExporter
- java.lang.Object
-
- net.sf.jasperreports.engine.JRAbstractExporter<JsonReportConfiguration,JsonExporterConfiguration,JsonExporterOutput,JsonExporterContext>
-
- net.sf.jasperreports.json.export.JsonExporter
-
- All Implemented Interfaces:
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_EMPTY_INPUT_SOURCE_IN_BATCH_MODE, EXCEPTION_MESSAGE_KEY_END_PAGE_INDEX_OUT_OF_RANGE, EXCEPTION_MESSAGE_KEY_INVALID_IMAGE_NAME, EXCEPTION_MESSAGE_KEY_INVALID_ZOOM_RATIO, EXCEPTION_MESSAGE_KEY_NO_INPUT_SOURCE, EXCEPTION_MESSAGE_KEY_NO_OUTPUT_SPECIFIED, 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, 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, ensureOutput, getBooleanCellValue, getCurrentConfiguration, getCurrentItemConfiguration, getCurrentJasperPrint, getDateCellValue, getDateFormat, getExporterConfiguration, getExporterContext, getExporterInput, getExporterOutput, getHyperlinkProducer, getJasperReportsContext, getLocale, getNumberCellValue, getNumberFormat, getOffsetX, getOffsetY, getPageRange, getPropertiesUtil, getRendererUtil, getReportContext, getReportExportConfiguration, getRepository, getStyledText, getStyledText, getTextFormatFactoryClass, getTextLocale, getTextTimeZone, getTextValue, getTextValueString, insideFrame, reset, resetExportContext, restoreElementOffsets, setConfiguration, setConfiguration, setCurrentExporterInputItem, setExporterInput, setExporterOutput, setFrameElementsOffset, setJasperReportsContext, setOffset, setOffset, 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()
-
getExporterKey
public String getExporterKey()
- Specified by:
getExporterKeyin classJRAbstractExporter<JsonReportConfiguration,JsonExporterConfiguration,JsonExporterOutput,JsonExporterContext>
-
getExporterPropertiesPrefix
public String getExporterPropertiesPrefix()
-
exportReport
public void exportReport() throws JRException- 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
-
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)
-
-