|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.reporting.engine.classic.core.Element
org.pentaho.reporting.engine.classic.core.Section
org.pentaho.reporting.engine.classic.core.AbstractReportDefinition
public abstract class AbstractReportDefinition
The AbstractReportDefinition serves as base-implementation for both the SubReport and the global JFreeReport instance. There's no point to subclass this class any further.
ReportDefinitions define the query string to "default" by default, change this to reflect the accepted queries in your data-source.
Field Summary |
---|
Fields inherited from class org.pentaho.reporting.engine.classic.core.Element |
---|
ANONYMOUS_ELEMENT_PREFIX |
Method Summary | |
---|---|
void |
addExpression(Expression function)
Adds a function to the report's collection of expressions. |
void |
addGroup(CrosstabGroup group)
Adds a crosstab group. |
void |
addGroup(RelationalGroup group)
Adds a group to the report. |
void |
addPreProcessor(ReportPreProcessor preProcessor)
|
void |
addReportModelListener(ReportModelListener listener)
|
void |
addStructureFunction(StructureFunction function)
Adds a structural function to the report. |
Object |
clone()
Clones the report. |
Element |
derive(boolean preserveElementInstanceIds)
Creates a deep copy of this element and regenerates all instance-ids. |
void |
fireModelLayoutChanged(ReportElement node,
int type,
Object parameter)
|
org.pentaho.reporting.libraries.resourceloader.ResourceKey |
getContentBase()
Returns the content base of this report. |
abstract DataFactory |
getDataFactory()
Returns the data factory that has been assigned to this report. |
DataRow |
getDataRow()
Returns the current datarow assigned to this report definition. |
DataSchemaDefinition |
getDataSchemaDefinition()
|
long |
getDatasourceChangeTracker()
|
org.pentaho.reporting.libraries.resourceloader.ResourceKey |
getDefinitionSource()
Returns the resource-key of the file that defined this element. |
DetailsFooter |
getDetailsFooter()
Returns the details header band. |
DetailsHeader |
getDetailsHeader()
Returns the details header band. |
ReportElement |
getElement(int index)
Returns the element stored add the given index. |
int |
getElementCount()
Returns the number of elements in this section. |
ExpressionCollection |
getExpressions()
Returns the expressions for the report. |
Group |
getGroup(int groupIndex)
Returns the group at the specified index or null, if there is no such group. |
RelationalGroup |
getGroupByName(String name)
Searches a group by its defined name. |
int |
getGroupCount()
Returns the number of groups in this report. |
ItemBand |
getItemBand()
Returns the report's item band. |
NoDataBand |
getNoDataBand()
Returns the report's watermark band. |
long |
getNonVisualsChangeTracker()
|
PageFooter |
getPageFooter()
Returns the page footer. |
PageHeader |
getPageHeader()
Returns the page header. |
ReportPreProcessor |
getPreProcessor(int index)
|
int |
getPreProcessorCount()
|
ReportPreProcessor[] |
getPreProcessors()
|
ReportProperties |
getProperties()
Deprecated. Report-Properties should not be used anymore. |
Object |
getProperty(String key)
Deprecated. Do not use this method anymore. Use the master report's parameters instead. |
String |
getQuery()
Returns a new query or query-name that is used when retrieving the data from the data-factory. |
int |
getQueryLimit()
|
int |
getQueryTimeout()
|
ReportDefinition |
getReportDefinition()
Returns the currently assigned report definition. |
ReportFooter |
getReportFooter()
Returns the page footer. |
ReportHeader |
getReportHeader()
Returns the report header. |
ResourceBundleFactory |
getResourceBundleFactory()
Returns the resource bundle factory for this report definition. |
abstract org.pentaho.reporting.libraries.resourceloader.ResourceManager |
getResourceManager()
|
Group |
getRootGroup()
Returns the list of groups for the report. |
StructureFunction |
getStructureFunction(int index)
Returns the structure function at the given position. |
int |
getStructureFunctionCount()
Returns the number of structural functions added to the report. |
StructureFunction[] |
getStructureFunctions()
Returns a copy of all structure functions contained in the report. |
StyleSheetCollection |
getStyleSheetCollection()
Returns the stylesheet collection of this report. |
Watermark |
getWatermark()
Returns the report's watermark band. |
void |
removeExpression(Expression expression)
|
void |
removeGroup(CrosstabGroup group)
|
void |
removeGroup(RelationalGroup deleteGroup)
|
void |
removePreProcessor(ReportPreProcessor preProcessor)
|
void |
removeReportModelListener(ReportModelListener listener)
|
void |
removeStructureFunction(StructureFunction f)
Removes the given function from the collection of structure functions. |
void |
setContentBase(org.pentaho.reporting.libraries.resourceloader.ResourceKey key)
Defines the content base for the report. |
abstract void |
setDataFactory(DataFactory dataFactory)
Sets the data factory for the report. |
void |
setDataSchemaDefinition(DataSchemaDefinition dataSchemaDefinition)
|
void |
setDefinitionSource(org.pentaho.reporting.libraries.resourceloader.ResourceKey key)
|
void |
setDetailsFooter(DetailsFooter band)
Sets the item band for the report. |
void |
setDetailsHeader(DetailsHeader band)
Sets the item band for the report. |
void |
setElementAt(int position,
Element element)
|
void |
setExpressions(ExpressionCollection expressions)
Sets the expressions for the report. |
void |
setGroups(GroupList groupList)
Sets the groups for this report. |
void |
setItemBand(ItemBand band)
Sets the item band for the report. |
void |
setNoDataBand(NoDataBand band)
Sets the watermark band for the report. |
void |
setPageFooter(PageFooter footer)
Sets the page footer. |
void |
setPageHeader(PageHeader header)
Sets the page header. |
void |
setProperty(String key,
Object value)
Deprecated. Properties should not be used. Use the master-report's parameters instead. |
void |
setQuery(String query)
Defines a new query or query-name that is used when retrieving the data from the data-factory. |
void |
setQueryLimit(int queryLimit)
|
void |
setQueryTimeout(int queryTimeout)
|
void |
setReportFooter(ReportFooter footer)
Sets the report footer. |
void |
setReportHeader(ReportHeader header)
Sets the report header. |
void |
setResourceBundleFactory(ResourceBundleFactory resourceBundleFactory)
Redefines the resource bundle factory for the report. |
void |
setRootGroup(Group rootGroup)
|
void |
setWatermark(Watermark band)
Sets the watermark band for the report. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.pentaho.reporting.engine.classic.core.ReportDefinition |
---|
getPageDefinition |
Methods inherited from interface org.pentaho.reporting.engine.classic.core.ReportElement |
---|
getAttribute, getAttributeExpression, getAttributeExpressionNames, getAttributeExpressionNamespaces, getAttributeNames, getAttributeNamespaces, getAttributes, getId, getMetaData, getName, getObjectID, getParentSection, getStyle, getStyleExpression, getStyleExpressions, getTreeLock, setAttribute, setAttributeExpression, setStyleExpression |
Method Detail |
---|
public ResourceBundleFactory getResourceBundleFactory()
ResourceBundleFactory
is used in
internationalized reports to create the resourcebundles holding the localized resources.
public void setResourceBundleFactory(ResourceBundleFactory resourceBundleFactory)
resourceBundleFactory
- the new resource bundle factory, never null.
NullPointerException
- if the given ResourceBundleFactory is null.public int getPreProcessorCount()
public ReportPreProcessor[] getPreProcessors()
public ReportPreProcessor getPreProcessor(int index)
public void addPreProcessor(ReportPreProcessor preProcessor)
public void removePreProcessor(ReportPreProcessor preProcessor)
public Group getRootGroup()
ReportDefinition
getRootGroup
in interface ReportDefinition
public void setRootGroup(Group rootGroup)
public void setProperty(String key, Object value)
null
, the property will be removed.
Developers are free to add any properties they want to a report, and then display those properties in the report.
For example, you might add a 'user.name' property, so that you can display the username in the header of a report.
key
- the key.value
- the value.public ReportProperties getProperties()
getProperties
in interface ReportDefinition
public Object getProperty(String key)
key
- the key.
public void setReportHeader(ReportHeader header)
header
- the report header (null
not permitted).public ReportHeader getReportHeader()
getReportHeader
in interface ReportDefinition
null
).public void setReportFooter(ReportFooter footer)
footer
- the report footer (null
not permitted).public ReportFooter getReportFooter()
getReportFooter
in interface ReportDefinition
null
).public void setPageHeader(PageHeader header)
header
- the page header (null
not permitted).public PageHeader getPageHeader()
getPageHeader
in interface ReportDefinition
null
).public void setPageFooter(PageFooter footer)
footer
- the page footer (null
not permitted).public PageFooter getPageFooter()
getPageFooter
in interface ReportDefinition
null
).public void setWatermark(Watermark band)
band
- the new watermark band (null
not permitted).public NoDataBand getNoDataBand()
getNoDataBand
in interface ReportDefinition
null
).public void setNoDataBand(NoDataBand band)
band
- the new watermark band (null
not permitted).public Watermark getWatermark()
getWatermark
in interface ReportDefinition
null
).public void setItemBand(ItemBand band)
band
- the new item band (null
not permitted).public ItemBand getItemBand()
getItemBand
in interface ReportDefinition
null
).public void setDetailsHeader(DetailsHeader band)
band
- the new item band (null
not permitted).public DetailsHeader getDetailsHeader()
getDetailsHeader
in interface ReportDefinition
public void setDetailsFooter(DetailsFooter band)
band
- the new item band (null
not permitted).public DetailsFooter getDetailsFooter()
getDetailsFooter
in interface ReportDefinition
public void addGroup(RelationalGroup group)
group
- the group.public void addGroup(CrosstabGroup group)
group
- public void removeGroup(CrosstabGroup group)
public void removeGroup(RelationalGroup deleteGroup)
public void setGroups(GroupList groupList)
groupList
- the list of groups.public int getGroupCount()
Every report has at least one group defined.
getGroupCount
in interface ReportDefinition
public Group getGroup(int groupIndex)
getGroup
in interface ReportDefinition
groupIndex
- the group index.
IllegalArgumentException
- if the count is negative.
IndexOutOfBoundsException
- if the count is greater than the number of defined groups.public RelationalGroup getGroupByName(String name)
name
- the name of the group.
public void addExpression(Expression function)
function
- the function.public int getQueryTimeout()
getQueryTimeout
in interface ReportDefinition
public void setQueryTimeout(int queryTimeout)
public int getQueryLimit()
getQueryLimit
in interface ReportDefinition
public void setQueryLimit(int queryLimit)
public String getQuery()
getQuery
in interface ReportDefinition
public void setQuery(String query)
query
- the query-string.DataFactory.queryData(String,DataRow)
public StyleSheetCollection getStyleSheetCollection()
getStyleSheetCollection
in interface ReportDefinition
public DataRow getDataRow()
public ExpressionCollection getExpressions()
public void setExpressions(ExpressionCollection expressions)
expressions
- the expressions (null
not permitted).public Object clone() throws CloneNotSupportedException
clone
in interface DataTarget
clone
in class Element
CloneNotSupportedException
- this should never happen.public Element derive(boolean preserveElementInstanceIds) throws CloneNotSupportedException
Element
derive
in class Element
preserveElementInstanceIds
- defines whether this call generates new instance-ids for the derived elements.
Instance-IDs are used by the report processor to recognize reoccurring elements
and must not changed within the report run. Outside of the report processors
new instance ids should be generated at all times to separate
instances and to make them uniquely identifiable.
CloneNotSupportedException
public void setElementAt(int position, Element element)
setElementAt
in class Section
public int getElementCount()
Section
getElementCount
in class Section
public ReportElement getElement(int index)
Section
getElement
in class Section
index
- the element position within this section
public void setContentBase(org.pentaho.reporting.libraries.resourceloader.ResourceKey key)
key
- the content base or null.public org.pentaho.reporting.libraries.resourceloader.ResourceKey getContentBase()
getContentBase
in class Element
public void setDefinitionSource(org.pentaho.reporting.libraries.resourceloader.ResourceKey key)
public org.pentaho.reporting.libraries.resourceloader.ResourceKey getDefinitionSource()
Element
getDefinitionSource
in class Element
public ReportDefinition getReportDefinition()
getReportDefinition
in interface ReportElement
getReportDefinition
in class Element
public abstract DataFactory getDataFactory()
public abstract void setDataFactory(DataFactory dataFactory)
dataFactory
- the data factory for the report, never null.public void addReportModelListener(ReportModelListener listener)
public void removeReportModelListener(ReportModelListener listener)
public void fireModelLayoutChanged(ReportElement node, int type, Object parameter)
public long getDatasourceChangeTracker()
public long getNonVisualsChangeTracker()
public void removeExpression(Expression expression)
public DataSchemaDefinition getDataSchemaDefinition()
public void setDataSchemaDefinition(DataSchemaDefinition dataSchemaDefinition)
public abstract org.pentaho.reporting.libraries.resourceloader.ResourceManager getResourceManager()
public void addStructureFunction(StructureFunction function)
function
- the structure function.public int getStructureFunctionCount()
public StructureFunction getStructureFunction(int index)
index
- the position of the function in the list.
IndexOutOfBoundsException
- if the index is invalid.public void removeStructureFunction(StructureFunction f)
f
- the function to be removed.public StructureFunction[] getStructureFunctions()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |