Debian Codegraph @

source/org/jfree/report/flow/FlowController.java

raw
1 /**
2 * ========================================
3 * JFreeReport : a free Java report library
4 * ========================================
5 *
6 * Project Info: http://reporting.pentaho.org/
7 *
8 * (C) Copyright 2000-2007, by Object Refinery Limited, Pentaho Corporation and Contributors.
9 *
10 * This library is free software; you can redistribute it and/or modify it under the terms
11 * of the GNU Lesser General Public License as published by the Free Software Foundation;
12 * either version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
15 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 * See the GNU Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public License along with this
19 * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20 * Boston, MA 02111-1307, USA.
21 *
22 * [Java is a trademark or registered trademark of Sun Microsystems, Inc.
23 * in the United States and other countries.]
24 *
25 * ------------
26 * $Id: FlowController.java 10756 2009-12-02 15:58:24Z tmorgner $
27 * ------------
28 * (C) Copyright 2000-2005, by Object Refinery Limited.
29 * (C) Copyright 2005-2007, by Pentaho Corporation.
30 */
31 package org.jfree.report.flow;
32
33 import org.jfree.report.DataSourceException;
34 import org.jfree.report.ReportDataFactoryException;
35 import org.jfree.report.data.ExpressionSlot;
36 import org.jfree.report.data.GlobalMasterRow;
37 import org.jfree.report.data.PrecomputedValueRegistry;
38
39 /**
40 * A flow-controller is an immutable object. Whenever an method, that may change
41 * the internal state of the controller, is invoked, a new instance of the
42 * controller is returned.
43 *
44 * @author Thomas Morgner
45 */
46 public interface FlowController
47 {
48 public FlowController performOperation(FlowControlOperation operation)
49 throws DataSourceException;
50
51 public GlobalMasterRow getMasterRow();
52
53 public ReportContext getReportContext();
54
55 public String getExportDescriptor();
56
57 public boolean isAdvanceRequested();
58
59 public FlowController performQuery(final String query)
60 throws ReportDataFactoryException, DataSourceException;
61
62 public FlowController performSubReportQuery(final String query,
63 final ParameterMapping[] inputParameters,
64 final ParameterMapping[] outputParameters)
65 throws ReportDataFactoryException, DataSourceException;
66
67 /**
68 * Activates expressions that compute running values. This does not activate
69 * precomputed expressions.
70 *
71 * @param expressions
72 * @return
73 * @throws DataSourceException
74 */
75 public FlowController activateExpressions(final ExpressionSlot[] expressions)
76 throws DataSourceException;
77
78 /**
79 * Returns the current expression slots of all currently active expressions.
80 * (Maybe we should limit the access to the name and value of the expression
81 * instead?)
82 *
83 * @return
84 * @throws DataSourceException
85 */
86 public ExpressionSlot[] getActiveExpressions () throws DataSourceException;
87
88 public FlowController deactivateExpressions() throws DataSourceException;
89
90 public ReportJob getReportJob();
91
92 public FlowController performReturnFromQuery() throws DataSourceException;
93
94 public FlowController createPrecomputeInstance () throws DataSourceException;
95
96 public PrecomputedValueRegistry getPrecomputedValueRegistry();
97 }