net.sf.jasperreports.engine.design
Interface JRCompiler

All Known Implementing Classes:
JavaScriptCompiler, JRAbstractClassCompiler, JRAbstractCompiler, JRAbstractJavaCompiler, JRAbstractMultiClassCompiler, JRAbstractSingleClassCompiler, JRBshCompiler, JRGroovyCompiler, JRJavacCompiler, JRJdk13Compiler, JRJdtCompiler, JRJikesCompiler

public interface JRCompiler

Version:
$Id: JRCompiler.java 5180 2012-03-29 13:23:12Z teodord $
Author:
Teodor Danciu (teodord@users.sourceforge.net)

Field Summary
static java.lang.String COMPILER_CLASS
          Deprecated. Replaced by COMPILER_PREFIX.
static java.lang.String COMPILER_CLASSPATH
          The classpath used by the report compiler.
static java.lang.String COMPILER_KEEP_JAVA_FILE
          Whether to keep the java file generated when the report is compiled.
static java.lang.String COMPILER_PREFIX
          Prefix for properties that map report compilers to expression languages.
static java.lang.String COMPILER_TEMP_DIR
          The temporary directory used by the report compiler.
 
Method Summary
 JasperReport compileReport(JasperDesign jasperDesign)
          Compiles a report design.
 JREvaluator loadEvaluator(JasperReport jasperReport)
          Loads the evaluator for a report's main dataset.
 JREvaluator loadEvaluator(JasperReport jasperReport, JRCrosstab crosstab)
          Loads a expression evaluator class for a crosstab of a report.
 JREvaluator loadEvaluator(JasperReport jasperReport, JRDataset dataset)
          Loads a expression evaluator class for a dataset of a report.
 

Field Detail

COMPILER_CLASS

static final java.lang.String COMPILER_CLASS
Deprecated. Replaced by COMPILER_PREFIX.
The name of the class to be used for report compilation.

No default value.

See Also:
Constant Field Values

COMPILER_PREFIX

static final java.lang.String COMPILER_PREFIX
Prefix for properties that map report compilers to expression languages.

Properties having this prefix are used to indicate the JRCompiler implementation to be used when compiling report designs that rely on the expression language specified as property suffix.

See Also:
Constant Field Values

COMPILER_KEEP_JAVA_FILE

static final java.lang.String COMPILER_KEEP_JAVA_FILE
Whether to keep the java file generated when the report is compiled.

Defaults to false.

See Also:
Constant Field Values

COMPILER_TEMP_DIR

static final java.lang.String COMPILER_TEMP_DIR
The temporary directory used by the report compiler.

Defaults to System.getProperty("user.dir").

See Also:
Constant Field Values

COMPILER_CLASSPATH

static final java.lang.String COMPILER_CLASSPATH
The classpath used by the report compiler.

Defaults to System.getProperty("java.class.path").

See Also:
Constant Field Values
Method Detail

compileReport

JasperReport compileReport(JasperDesign jasperDesign)
                           throws JRException
Compiles a report design.

The compilation consists of verification of the design, generation of expression evaluators and construction of a serializable read-only version of the report.

A report compiler should usually extend JRAbstractCompiler.

Parameters:
jasperDesign - the report design
Returns:
the compiled report
Throws:
JRException

loadEvaluator

JREvaluator loadEvaluator(JasperReport jasperReport)
                          throws JRException
Loads the evaluator for a report's main dataset.

Parameters:
jasperReport - the report
Returns:
the evaluator for the report's main dataset
Throws:
JRException

loadEvaluator

JREvaluator loadEvaluator(JasperReport jasperReport,
                          JRDataset dataset)
                          throws JRException
Loads a expression evaluator class for a dataset of a report.

Parameters:
jasperReport - the report
dataset - the dataset
Returns:
an instance of the dataset evaluator class
Throws:
JRException

loadEvaluator

JREvaluator loadEvaluator(JasperReport jasperReport,
                          JRCrosstab crosstab)
                          throws JRException
Loads a expression evaluator class for a crosstab of a report.

Parameters:
jasperReport - the report
crosstab - the crosstab
Returns:
an instance of the dataset evaluator class
Throws:
JRException


© 2001-2010 Jaspersoft Corporation www.jaspersoft.com