01: /*
02: * ============================================================================
03: * GNU Lesser General Public License
04: * ============================================================================
05: *
06: * JasperReports - Free Java report-generating library.
07: * Copyright (C) 2005 Works, Inc. http://www.works.com/
08: *
09: * This library is free software; you can redistribute it and/or
10: * modify it under the terms of the GNU Lesser General Public
11: * License as published by the Free Software Foundation; either
12: * 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,
15: * but WITHOUT ANY WARRANTY; without even the implied warranty of
16: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17: * Lesser General Public License for more details.
18: *
19: * You should have received a copy of the GNU Lesser General Public
20: * License along with this library; if not, write to the Free Software
21: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
22: *
23: * Works, Inc.
24: * 6034 West Courtyard Drive
25: * Suite 210
26: * Austin, TX 78730-5032
27: * USA
28: * http://www.works.com/
29: */
30:
31: /*
32: * Licensed to JasperSoft Corporation under a Contributer Agreement
33: */
34: package net.sf.jasperreports.engine;
35:
36: import net.sf.jasperreports.engine.fill.JRVirtualizationContext;
37:
38: /**
39: * @author John Bindel
40: * @version $Id: JRVirtualizable.java 1333 2006-07-11 11:31:34Z lucianc $
41: */
42: public interface JRVirtualizable {
43: /**
44: * Used by the virtualizer to identify the data for this object.
45: */
46: String getUID();
47:
48: /**
49: * Used by the virtualizer to set data.
50: */
51: void setVirtualData(Object o);
52:
53: /**
54: * Used by the virtualizer to get data.
55: */
56: Object getVirtualData();
57:
58: /**
59: * Used by the virtualizer to remove the data from the object in memory so
60: * that it may be garbage collected.
61: */
62: void removeVirtualData();
63:
64: /**
65: * Used by the virtualizer to set identity data.
66: */
67: void setIdentityData(Object id);
68:
69: /**
70: * Used by the virtualizer to get identity data.
71: */
72: Object getIdentityData();
73:
74: /**
75: * Called by the virtualizer before the object's data is externalized.
76: */
77: void beforeExternalization();
78:
79: /**
80: * Called by the virtualizer after the object's data is externalized, but before
81: * the virtual data is {@link #removeVirtualData() removed}.
82: */
83: void afterExternalization();
84:
85: /**
86: * Called by the virtualizer after the object's data was made available to the object.
87: */
88: void afterInternalization();
89:
90: /**
91: * Returns the virtualization context this object belongs to.
92: *
93: * @return the virtualization context this object belongs to
94: */
95: //FIXME use a more generic context type, JRVirtualizationContext has print page-specific methods
96: //issue: changing JRVirtualizationContext hierarchy would impact serialization
97: JRVirtualizationContext getContext();
98: }
|