001: /**
002: * ===========================================
003: * JFreeReport : a free Java reporting library
004: * ===========================================
005: *
006: * Project Info: http://reporting.pentaho.org/
007: *
008: * (C) Copyright 2001-2007, by Object Refinery Ltd, Pentaho Corporation and Contributors.
009: *
010: * This library is free software; you can redistribute it and/or modify it under the terms
011: * of the GNU Lesser General Public License as published by the Free Software Foundation;
012: * either version 2.1 of the License, or (at your option) any later version.
013: *
014: * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
015: * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
016: * See the GNU Lesser General Public License for more details.
017: *
018: * You should have received a copy of the GNU Lesser General Public License along with this
019: * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
020: * Boston, MA 02111-1307, USA.
021: *
022: * [Java is a trademark or registered trademark of Sun Microsystems, Inc.
023: * in the United States and other countries.]
024: *
025: * ------------
026: * ReportDefinition.java
027: * ------------
028: * (C) Copyright 2001-2007, by Object Refinery Ltd, Pentaho Corporation and Contributors.
029: */package org.jfree.report;
030:
031: import org.jfree.report.style.StyleSheetCollection;
032: import org.jfree.report.util.ReportProperties;
033:
034: /**
035: * A report definition. This the working copy of the JFreeReport object. During the report processing not all properties
036: * of the original JFreeReport object will be availble.
037: *
038: * @author Thomas Morgner.
039: */
040: public interface ReportDefinition extends Cloneable {
041:
042: /**
043: * Returns the query name that should be used when processing the report.
044: *
045: * @return the query string.
046: */
047: public String getQuery();
048:
049: /**
050: * Returns the list of groups for the report.
051: *
052: * @return The list of groups.
053: */
054: public GroupList getGroups();
055:
056: /**
057: * Returns the report header.
058: *
059: * @return The report header.
060: */
061: public ReportHeader getReportHeader();
062:
063: /**
064: * Returns the report footer.
065: *
066: * @return The report footer.
067: */
068: public ReportFooter getReportFooter();
069:
070: /**
071: * Returns the page header.
072: *
073: * @return The page header.
074: */
075: public PageHeader getPageHeader();
076:
077: /**
078: * Returns the page footer.
079: *
080: * @return The page footer.
081: */
082: public PageFooter getPageFooter();
083:
084: /**
085: * Returns the item band.
086: *
087: * @return The item band.
088: */
089: public ItemBand getItemBand();
090:
091: /**
092: * Returns the watermark band.
093: *
094: * @return The watermark band.
095: */
096: public Watermark getWatermark();
097:
098: /**
099: * Returns the "no-data" band, which is displayed if there is no data available.
100: *
101: * @return The no-data band.
102: */
103: public NoDataBand getNoDataBand();
104:
105: /**
106: * Returns the report properties.
107: *
108: * @return The report properties.
109: */
110: public ReportProperties getProperties();
111:
112: /**
113: * Returns the number of groups in this report. <P> Every report has at least one group
114: * defined.
115: *
116: * @return the group count.
117: */
118: public int getGroupCount();
119:
120: /**
121: * Returns the group at the specified index or null, if there is no such group.
122: *
123: * @param count the group index.
124: * @return the requested group.
125: *
126: * @throws IllegalArgumentException if the count is negative.
127: * @throws IndexOutOfBoundsException if the count is greater than the number of defined
128: * groups.
129: */
130: public Group getGroup(int count);
131:
132: /**
133: * Returns the stylesheet collection of this report definition. The stylesheet
134: * collection is fixed for the report definition and all elements of the report. When a
135: * band or group is added to the report it will get registered with this stylesheet
136: * collection and cannot be used in an different report.
137: *
138: * @return the stylesheet collection of the report, never null.
139: */
140: public StyleSheetCollection getStyleSheetCollection();
141:
142: /**
143: * Returns the datarow assigned to this report definition. For report instances
144: * not yet started, this returns a dummy instance.
145: *
146: * @return the datarow assigned to the report, never null.
147: */
148: public DataRow getDataRow();
149:
150: /**
151: * Returns the page definition assigned to the report definition. The page
152: * definition defines the report area and how the report is subdivided by
153: * the child pages.
154: *
155: * @return the page definition.
156: */
157: public PageDefinition getPageDefinition();
158: }
|