001: /*
002: * ============================================================================
003: * GNU Lesser General Public License
004: * ============================================================================
005: *
006: * JasperReports - Free Java report-generating library.
007: * Copyright (C) 2001-2006 JasperSoft Corporation http://www.jaspersoft.com
008: *
009: * This library is free software; you can redistribute it and/or
010: * modify it under the terms of the GNU Lesser General Public
011: * License as published by the Free Software Foundation; either
012: * 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,
015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
017: * Lesser General Public License for more details.
018: *
019: * You should have received a copy of the GNU Lesser General Public
020: * License along with this library; if not, write to the Free Software
021: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
022: *
023: * JasperSoft Corporation
024: * 303 Second Street, Suite 450 North
025: * San Francisco, CA 94107
026: * http://www.jaspersoft.com
027: */
028: package net.sf.jasperreports.engine;
029:
030: /**
031: * @author Teodor Danciu (teodord@users.sourceforge.net)
032: * @version $Id: JRSubreport.java 1229 2006-04-19 10:27:35Z teodord $
033: */
034: public interface JRSubreport extends JRElement {
035:
036: /**
037: * Indicates if the engine is loading the current subreport from cache.
038: * Implementations of this method rely on default values that depend on the type of the subreport expression
039: * if a value was not explicitly set of this flag.
040: * @return true if the subreport should be loaded from cache, false otherwise
041: */
042: public boolean isUsingCache();
043:
044: /**
045: * Specifies if the engine should be loading the current subreport from cache. If set to true, the reporting engine
046: * will try to recognize previously loaded subreports using their specified source. For example, it will recognize
047: * a subreport if the subreport source is a file name that it has already loaded, or if it is the same URL.
048: * <p>
049: * For subreports that have expressions returning <tt>java.lang.String</tt> objects as the subreport source,
050: * representing file names, URLs or classpath resources, the default value for this flag is true.
051: *
052: * @deprecated use {@link #setUsingCache(Boolean) setUsingCache(Boolean)} instead.
053: */
054: public void setUsingCache(boolean isUsingCache);
055:
056: /**
057: *
058: */
059: public JRExpression getParametersMapExpression();
060:
061: /**
062: *
063: */
064: public JRSubreportParameter[] getParameters();
065:
066: /**
067: *
068: */
069: public JRExpression getConnectionExpression();
070:
071: /**
072: *
073: */
074: public JRExpression getDataSourceExpression();
075:
076: /**
077: *
078: */
079: public JRExpression getExpression();
080:
081: /**
082: * Returns the list of subreport copied values.
083: *
084: * @return the list of subreport copied values.
085: */
086: public JRSubreportReturnValue[] getReturnValues();
087:
088: /**
089: * Indicates if the engine is loading the current subreport from cache.
090: * Implementations of this method return the actual value for the internal flag that was explicitly
091: * set on this subreport.
092: * @return Boolean.TRUE if the subreport should be loaded from cache, Boolean.FALSE otherwise
093: * or null in case the flag was never explicitly set on this subreport element
094: */
095: public Boolean isOwnUsingCache();
096:
097: /**
098: * Specifies if the engine should be loading the current subreport from cache. If set to Boolean.TRUE, the reporting engine
099: * will try to recognize previously loaded subreports using their specified source. For example, it will recognize
100: * an subreport if the subreport source is a file name that it has already loaded, or if it is the same URL.
101: * <p>
102: * If set to null, the engine will rely on some default value which depends on the type of the subreport expression.
103: * The cache is turned on by default only for subreports that have <tt>java.lang.String</tt> objects in their expressions.
104: */
105: public void setUsingCache(Boolean isUsingCache);
106: }
|