View Javadoc

1   /*
2    * DynamicJasper: A library for creating reports dynamically by specifying
3    * columns, groups, styles, etc. at runtime. It also saves a lot of development
4    * time in many cases! (http://sourceforge.net/projects/dynamicjasper)
5    *
6    * Copyright (C) 2008  FDV Solutions (http://www.fdvsolutions.com)
7    *
8    * This library is free software; you can redistribute it and/or
9    * modify it under the terms of the GNU Lesser General Public
10   *
11   * License as published by the Free Software Foundation; either
12   *
13   * version 2.1 of the License, or (at your option) any later version.
14   *
15   * This library is distributed in the hope that it will be useful,
16   * but WITHOUT ANY WARRANTY; without even the implied warranty of
17   *
18   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19   *
20   * Lesser General Public License for more details.
21   *
22   * You should have received a copy of the GNU Lesser General Public
23   * License along with this library; if not, write to the Free Software
24   *
25   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
26   *
27   *
28   */
29  
30  /**
31   *
32   */
33  package ar.com.fdvs.dj.core.layout;
34  
35  import java.util.Map;
36  
37  import net.sf.jasperreports.engine.design.JasperDesign;
38  import ar.com.fdvs.dj.domain.DynamicReport;
39  
40  /**
41   * An interface that represents a a Manager to make elements respect a desired Layout.
42   * @author msimone
43   */
44  public interface LayoutManager {
45  
46  	/**
47  	 * Entry point for applying a given layout.
48  	 * @param design The deseign to be used
49  	 * @param report The report to show
50  	 * @throws LayoutException
51  	 */
52  	void applyLayout(JasperDesign design, DynamicReport report) throws LayoutException;
53  
54  	/**
55  	 * Useful as shared object between RegistrationManagers and the LayOutManager.
56  	 * An example of usage is the mapping between DJ objects and JR objects through its name, like
57  	 * a DJGroup and a JRDesignGroup 
58  	 * @return
59  	 */
60  	Map getReferencesMap();
61  
62  }