public abstract class JRAbstractExporter<RC extends ReportExportConfiguration,C extends ExporterConfiguration,O extends ExporterOutput,E extends JRExporterContext> extends Object implements JRExporter<ExporterInput,RC,C,O>
Modifier and Type | Class and Description |
---|---|
class |
JRAbstractExporter.BaseExporterContext |
protected class |
JRAbstractExporter.PageRange |
Modifier | Constructor and Description |
---|---|
protected |
JRAbstractExporter()
Deprecated.
Replaced by
JRAbstractExporter(JasperReportsContext) . |
protected |
JRAbstractExporter(JasperReportsContext jasperReportsContext) |
public static final String EXCEPTION_MESSAGE_KEY_START_PAGE_INDEX_OUT_OF_RANGE
public static final String EXCEPTION_MESSAGE_KEY_END_PAGE_INDEX_OUT_OF_RANGE
public static final String EXCEPTION_MESSAGE_KEY_PAGE_INDEX_OUT_OF_RANGE
public static final String PROPERTY_SUFFIX_DEFAULT_FILTER_FACTORY
net.sf.jasperreports.export.xls.default.filter.factory
.
If this property is not defined for a specific exporter, the generic
exporter factory given by PROPERTY_DEFAULT_FILTER_FACTORY
is used.public static final String PROPERTY_DEFAULT_FILTER_FACTORY
protected JasperReportsContext jasperReportsContext
protected JRPropertiesUtil propertiesUtil
protected JRStyledTextAttributeSelector allSelector
protected JRStyledTextAttributeSelector noBackcolorSelector
protected JRStyledTextAttributeSelector noneSelector
protected JRStyledTextUtil styledTextUtil
protected Map<JRExporterParameter,Object> parameters
protected ExporterInput exporterInput
protected RC extends ReportExportConfiguration itemConfiguration
protected C extends ExporterConfiguration exporterConfiguration
protected O extends ExporterOutput exporterOutput
protected ExporterInputItem crtItem
protected RC extends ReportExportConfiguration crtCompositeItemConfiguration
protected C extends ExporterConfiguration crtCompositeConfiguration
protected JasperPrint jasperPrint
protected ExporterFilter filter
protected Map<String,DateFormat> dateFormatCache
protected Map<String,NumberFormat> numberFormatCache
protected E extends JRExporterContext exporterContext
protected JRAbstractExporter()
JRAbstractExporter(JasperReportsContext)
.protected JRAbstractExporter(JasperReportsContext jasperReportsContext)
public void reset()
public void setParameter(JRExporterParameter parameter, Object value)
setExporterInput(ExporterInput)
, setConfiguration(ExporterConfiguration)
,
setConfiguration(ReportExportConfiguration)
and setExporterOutput(ExporterOutput)
JRExporter
setParameter
in interface JRExporter<ExporterInput,RC extends ReportExportConfiguration,C extends ExporterConfiguration,O extends ExporterOutput>
parameter
- the parameter, selected from the static parameters defined by JasperReportsvalue
- the parameter valueJRExporterParameter
public Object getParameter(JRExporterParameter parameter)
setExporterInput(ExporterInput)
, setConfiguration(ExporterConfiguration)
,
setConfiguration(ReportExportConfiguration)
and setExporterOutput(ExporterOutput)
.JRExporter
getParameter
in interface JRExporter<ExporterInput,RC extends ReportExportConfiguration,C extends ExporterConfiguration,O extends ExporterOutput>
public void setParameters(Map<JRExporterParameter,Object> parameters)
setExporterInput(ExporterInput)
, setConfiguration(ExporterConfiguration)
,
setConfiguration(ReportExportConfiguration)
and setExporterOutput(ExporterOutput)
JRExporter
setParameters
in interface JRExporter<ExporterInput,RC extends ReportExportConfiguration,C extends ExporterConfiguration,O extends ExporterOutput>
JRExporter.setParameter(JRExporterParameter, Object)
public Map<JRExporterParameter,Object> getParameters()
setExporterInput(ExporterInput)
, setConfiguration(ExporterConfiguration)
,
setConfiguration(ReportExportConfiguration)
and setExporterOutput(ExporterOutput)
JRExporter
getParameters
in interface JRExporter<ExporterInput,RC extends ReportExportConfiguration,C extends ExporterConfiguration,O extends ExporterOutput>
protected ExporterInput getExporterInput()
public void setExporterInput(ExporterInput exporterInput)
Exporter
setExporterInput
in interface Exporter<ExporterInput,RC extends ReportExportConfiguration,C extends ExporterConfiguration,O extends ExporterOutput>
protected O getExporterOutput()
public void setExporterOutput(O exporterOutput)
Exporter
setExporterOutput
in interface Exporter<ExporterInput,RC extends ReportExportConfiguration,C extends ExporterConfiguration,O extends ExporterOutput>
public void setConfiguration(RC configuration)
setConfiguration
in interface Exporter<ExporterInput,RC extends ReportExportConfiguration,C extends ExporterConfiguration,O extends ExporterOutput>
public void setConfiguration(C configuration)
setConfiguration
in interface Exporter<ExporterInput,RC extends ReportExportConfiguration,C extends ExporterConfiguration,O extends ExporterOutput>
public JasperReportsContext getJasperReportsContext()
protected void setJasperReportsContext(JasperReportsContext jasperReportsContext)
public void setReportContext(ReportContext reportContext)
setReportContext
in interface Exporter<ExporterInput,RC extends ReportExportConfiguration,C extends ExporterConfiguration,O extends ExporterOutput>
public ReportContext getReportContext()
getReportContext
in interface Exporter<ExporterInput,RC extends ReportExportConfiguration,C extends ExporterConfiguration,O extends ExporterOutput>
public JRPropertiesUtil getPropertiesUtil()
public abstract void exportReport() throws JRException
Exporter
exportReport
in interface Exporter<ExporterInput,RC extends ReportExportConfiguration,C extends ExporterConfiguration,O extends ExporterOutput>
JRException
protected void setOffset()
protected void setOffset(boolean setElementOffsets)
protected void ensureJasperReportsContext()
protected void resetExportContext()
protected void setClassLoader()
setExportContext
protected void resetClassLoader()
resetExportContext
protected void setCurrentExporterInputItem(ExporterInputItem crtItem)
protected RC getCurrentItemConfiguration()
protected C getCurrentConfiguration()
protected void setJasperPrint(JasperPrint jasperPrint)
setCurrentExporterInputItem(ExporterInputItem)
.protected void ensureInput()
protected abstract void ensureOutput()
protected void initExport()
protected void initReport()
protected JRAbstractExporter.PageRange getPageRange()
protected JRStyledText getStyledText(JRPrintText textElement, boolean setBackcolor)
protected JRStyledText getStyledText(JRPrintText textElement)
protected int getOffsetX()
protected int getOffsetY()
protected void setFrameElementsOffset(JRPrintFrame frame, boolean relative)
frame
.
After the frame elements are exported, a call to popElementOffsets
is required
so that the previous offsets are restored.
frame
- relative
- getOffsetX()
,
getOffsetY()
,
restoreElementOffsets()
protected void restoreElementOffsets()
setFrameElementsOffset
.protected String getTextFormatFactoryClass(JRPrintText text)
protected Locale getLocale()
protected Locale getTextLocale(JRPrintText text)
protected TimeZone getTextTimeZone(JRPrintText text)
protected TextValue getTextValue(JRPrintText text, String textStr)
protected TextValue getTextValueString(JRPrintText text, String textStr)
protected TextValue getDateCellValue(JRPrintText text, String textStr) throws ParseException
ParseException
protected TextValue getNumberCellValue(JRPrintText text, String textStr) throws ParseException, ClassNotFoundException
ParseException
ClassNotFoundException
protected TextValue getBooleanCellValue(JRPrintText text, String textStr)
protected DateFormat getDateFormat(String formatFactoryClass, String pattern, Locale lc, TimeZone tz)
protected NumberFormat getNumberFormat(String formatFactoryClass, String pattern, Locale lc)
protected ExporterFilter createFilter()
public JRHyperlinkProducer getHyperlinkProducer(JRPrintHyperlink link)
protected JRHyperlinkProducer getCustomHandler(JRPrintHyperlink link)
getHyperlinkProducer(JRPrintHyperlink)
.public abstract String getExporterKey()
public abstract String getExporterPropertiesPrefix()
public E getExporterContext()
public JasperPrint getCurrentJasperPrint()
Copyright © 2014. All rights reserved.