net.sf.jasperreports.engine
Class JRAbstractScriptlet

java.lang.Object
  extended by net.sf.jasperreports.engine.JRAbstractScriptlet
Direct Known Subclasses:
JRDefaultScriptlet, JRFillDatasetScriptlet

public abstract class JRAbstractScriptlet
extends java.lang.Object

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.

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

Field Summary
protected  java.util.Map<java.lang.String,JRFillField> fieldsMap
           
protected  JRFillGroup[] groups
           
protected  java.util.Map<java.lang.String,JRFillParameter> parametersMap
           
protected  java.util.Map<java.lang.String,JRFillVariable> variablesMap
           
 
Constructor Summary
JRAbstractScriptlet()
           
 
Method Summary
abstract  void afterColumnInit()
          Called after each column is initialized.
abstract  void afterDetailEval()
          Called after evaluating each detail.
abstract  void afterGroupInit(java.lang.String groupName)
          Called after a group is initialized.
abstract  void afterPageInit()
          Called after each page is initialized.
abstract  void afterReportInit()
          Called after the report is initialized.
abstract  void beforeColumnInit()
          Called before each column is initialized.
abstract  void beforeDetailEval()
          Called before evaluating each detail.
abstract  void beforeGroupInit(java.lang.String groupName)
          Called before a group is initialized.
abstract  void beforePageInit()
          Called before each page is initialized.
abstract  void beforeReportInit()
          Called before the report is initialized.
 void callAfterColumnInit()
           
 void callAfterDetailEval()
           
 void callAfterGroupInit()
           
 void callAfterPageInit()
           
 void callAfterReportInit()
           
 void callBeforeColumnInit()
           
 void callBeforeDetailEval()
           
 void callBeforeGroupInit()
           
 void callBeforePageInit()
           
 void callBeforeReportInit()
           
 java.lang.Object getFieldValue(java.lang.String fieldName)
           
 java.lang.Object getParameterValue(java.lang.String parameterName)
           
 java.lang.Object getParameterValue(java.lang.String parameterName, boolean mustBeDeclared)
           
 java.lang.Object getVariableValue(java.lang.String variableName)
           
 void setData(java.util.Map<java.lang.String,JRFillParameter> parsm, java.util.Map<java.lang.String,JRFillField> fldsm, java.util.Map<java.lang.String,JRFillVariable> varsm, JRFillGroup[] grps)
           
 void setVariableValue(java.lang.String variableName, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parametersMap

protected java.util.Map<java.lang.String,JRFillParameter> parametersMap

fieldsMap

protected java.util.Map<java.lang.String,JRFillField> fieldsMap

variablesMap

protected java.util.Map<java.lang.String,JRFillVariable> variablesMap

groups

protected JRFillGroup[] groups
Constructor Detail

JRAbstractScriptlet

public JRAbstractScriptlet()
Method Detail

setData

public void setData(java.util.Map<java.lang.String,JRFillParameter> parsm,
                    java.util.Map<java.lang.String,JRFillField> fldsm,
                    java.util.Map<java.lang.String,JRFillVariable> varsm,
                    JRFillGroup[] grps)

getParameterValue

public java.lang.Object getParameterValue(java.lang.String parameterName)
                                   throws JRScriptletException
Throws:
JRScriptletException

getParameterValue

public java.lang.Object getParameterValue(java.lang.String parameterName,
                                          boolean mustBeDeclared)
                                   throws JRScriptletException
Throws:
JRScriptletException

getFieldValue

public java.lang.Object getFieldValue(java.lang.String fieldName)
                               throws JRScriptletException
Throws:
JRScriptletException

getVariableValue

public java.lang.Object getVariableValue(java.lang.String variableName)
                                  throws JRScriptletException
Throws:
JRScriptletException

setVariableValue

public void setVariableValue(java.lang.String variableName,
                             java.lang.Object value)
                      throws JRScriptletException
Throws:
JRScriptletException

callBeforeReportInit

public void callBeforeReportInit()
                          throws JRScriptletException
Throws:
JRScriptletException

callAfterReportInit

public void callAfterReportInit()
                         throws JRScriptletException
Throws:
JRScriptletException

callBeforePageInit

public void callBeforePageInit()
                        throws JRScriptletException
Throws:
JRScriptletException

callAfterPageInit

public void callAfterPageInit()
                       throws JRScriptletException
Throws:
JRScriptletException

callBeforeColumnInit

public void callBeforeColumnInit()
                          throws JRScriptletException
Throws:
JRScriptletException

callAfterColumnInit

public void callAfterColumnInit()
                         throws JRScriptletException
Throws:
JRScriptletException

callBeforeGroupInit

public void callBeforeGroupInit()
                         throws JRScriptletException
Throws:
JRScriptletException

callAfterGroupInit

public void callAfterGroupInit()
                        throws JRScriptletException
Throws:
JRScriptletException

callBeforeDetailEval

public void callBeforeDetailEval()
                          throws JRScriptletException
Throws:
JRScriptletException

callAfterDetailEval

public void callAfterDetailEval()
                         throws JRScriptletException
Throws:
JRScriptletException

beforeReportInit

public abstract void beforeReportInit()
                               throws JRScriptletException
Called before the report is initialized.

Throws:
JRScriptletException

afterReportInit

public abstract void afterReportInit()
                              throws JRScriptletException
Called after the report is initialized.

Throws:
JRScriptletException

beforePageInit

public abstract void beforePageInit()
                             throws JRScriptletException
Called before each page is initialized.

Throws:
JRScriptletException

afterPageInit

public abstract void afterPageInit()
                            throws JRScriptletException
Called after each page is initialized.

Throws:
JRScriptletException

beforeColumnInit

public abstract void beforeColumnInit()
                               throws JRScriptletException
Called before each column is initialized.

Throws:
JRScriptletException

afterColumnInit

public abstract void afterColumnInit()
                              throws JRScriptletException
Called after each column is initialized.

Throws:
JRScriptletException

beforeGroupInit

public abstract void beforeGroupInit(java.lang.String groupName)
                              throws JRScriptletException
Called before a group is initialized.

Parameters:
groupName - the group name
Throws:
JRScriptletException

afterGroupInit

public abstract void afterGroupInit(java.lang.String groupName)
                             throws JRScriptletException
Called after a group is initialized.

Parameters:
groupName - the group name
Throws:
JRScriptletException

beforeDetailEval

public abstract void beforeDetailEval()
                               throws JRScriptletException
Called before evaluating each detail.

Throws:
JRScriptletException

afterDetailEval

public abstract void afterDetailEval()
                              throws JRScriptletException
Called after evaluating each detail.

Throws:
JRScriptletException


© 2001-2010 Jaspersoft Corporation www.jaspersoft.com