Package net.sf.jasperreports.engine
Class JRAbstractScriptlet
java.lang.Object
net.sf.jasperreports.engine.JRAbstractScriptlet
- Direct Known Subclasses:
JRDefaultScriptlet
,JRFillDatasetScriptlet
Defines an abstract representation of a report scriptlet. Scriptlets are useful when a specific behavior is needed
in certain moments of the report filling process, such as report, column or group initialization. Scriptlets must implement
the abstract methods that define the behavior at the specified moments.
- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JRFillDataset
static final String
static final String
static final String
static final String
protected Map
<String, JRFillField> protected JRFillGroup[]
protected Map
<String, JRFillParameter> protected JRScriptlet
protected Map
<String, JRFillVariable> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void
Called after each column is initialized.abstract void
Called after evaluating each detail.abstract void
afterGroupInit
(String groupName) Called after a group is initialized.abstract void
Called after each page is initialized.abstract void
Called after the report is initialized.abstract void
Called before each column is initialized.abstract void
Called before evaluating each detail.abstract void
beforeGroupInit
(String groupName) Called before a group is initialized.abstract void
Called before each page is initialized.abstract void
Called before the report is initialized.void
void
void
void
void
void
void
void
void
void
evaluateProperties
(byte evaluation) getFieldValue
(String fieldName) getParameterValue
(String parameterName) getParameterValue
(String parameterName, boolean mustBeDeclared) getVariableValue
(String variableName) void
setData
(JRFillDataset dataset) void
setScriptletDefinition
(JRScriptlet scriptletDefinition) void
setVariableValue
(String variableName, Object value)
-
Field Details
-
EXCEPTION_MESSAGE_KEY_FIELD_NOT_FOUND
- See Also:
-
EXCEPTION_MESSAGE_KEY_PARAMETER_NOT_FOUND
- See Also:
-
EXCEPTION_MESSAGE_KEY_VARIABLE_NOT_FOUND
- See Also:
-
EXCEPTION_MESSAGE_KEY_VARIABLE_VALUE_INCOMPATIBLE
- See Also:
-
scriptletDefinition
-
dataset
-
parametersMap
-
fieldsMap
-
variablesMap
-
groups
-
-
Constructor Details
-
JRAbstractScriptlet
public JRAbstractScriptlet()
-
-
Method Details
-
setScriptletDefinition
-
setData
-
getParameterValue
- Throws:
JRScriptletException
-
getParameterValue
public Object getParameterValue(String parameterName, boolean mustBeDeclared) throws JRScriptletException - Throws:
JRScriptletException
-
getFieldValue
- Throws:
JRScriptletException
-
getVariableValue
- Throws:
JRScriptletException
-
setVariableValue
- Throws:
JRScriptletException
-
evaluateProperties
- Throws:
JRException
-
callBeforeReportInit
- Throws:
JRScriptletException
-
callAfterReportInit
- Throws:
JRScriptletException
-
callBeforePageInit
- Throws:
JRScriptletException
-
callAfterPageInit
- Throws:
JRScriptletException
-
callBeforeColumnInit
- Throws:
JRScriptletException
-
callAfterColumnInit
- Throws:
JRScriptletException
-
callBeforeGroupInit
- Throws:
JRScriptletException
-
callAfterGroupInit
- Throws:
JRScriptletException
-
callBeforeDetailEval
- Throws:
JRScriptletException
-
callAfterDetailEval
- Throws:
JRScriptletException
-
beforeReportInit
Called before the report is initialized.- Throws:
JRScriptletException
-
afterReportInit
Called after the report is initialized.- Throws:
JRScriptletException
-
beforePageInit
Called before each page is initialized.- Throws:
JRScriptletException
-
afterPageInit
Called after each page is initialized.- Throws:
JRScriptletException
-
beforeColumnInit
Called before each column is initialized.- Throws:
JRScriptletException
-
afterColumnInit
Called after each column is initialized.- Throws:
JRScriptletException
-
beforeGroupInit
Called before a group is initialized.- Parameters:
groupName
- the group name- Throws:
JRScriptletException
-
afterGroupInit
Called after a group is initialized.- Parameters:
groupName
- the group name- Throws:
JRScriptletException
-
beforeDetailEval
Called before evaluating each detail.- Throws:
JRScriptletException
-
afterDetailEval
Called after evaluating each detail.- Throws:
JRScriptletException
-