01: /* ComponentSerializationListener.java
02:
03: {{IS_NOTE
04: Purpose:
05:
06: Description:
07:
08: History:
09: Thu Jun 7 13:36:59 2007, Created by tomyeh
10: }}IS_NOTE
11:
12: Copyright (C) 2007 Potix Corporation. All Rights Reserved.
13:
14: {{IS_RIGHT
15: This program is distributed under GPL Version 2.0 in the hope that
16: it will be useful, but WITHOUT ANY WARRANTY.
17: }}IS_RIGHT
18: */
19: package org.zkoss.zk.ui.util;
20:
21: import org.zkoss.zk.ui.Component;
22:
23: /**
24: * Used to notify an object stored in a component, when the component
25: * is going to be serialized or has been deserialized.
26: *
27: * <p>When a component is going to be serialized, it checks every
28: * attribute ({@link Component#setAttribute})
29: * and listener ({@link Component#addEventListener})
30: * to see whether this interface is implemented.
31: * If implemented, {@link #willSerialize} will be called.
32: * Similarly, {@link #didDeserialize} is called if the component has
33: * been deserialized.
34: *
35: * @author tomyeh
36: * @since 2.4.0
37: */
38: public interface ComponentSerializationListener {
39: /** Called when a component is going to serialize this object.
40: */
41: public void willSerialize(Component comp);
42:
43: /** Called when a component has de-serialized this object back.
44: */
45: public void didDeserialize(Component comp);
46: }
|