01: package com.jeta.forms.store;
02:
03: import java.io.Externalizable;
04: import java.io.IOException;
05:
06: /**
07: * Defines an interface that all persitable objects in the forms designer must
08: * implement. It is similar to Exernalizable except that it adds read/write
09: * methods that take JETAObjectInput and JETAObjectOutput. This is needed so
10: * that our 'Serializable' objects can be stored using an arbitrary persistence
11: * scheme. Currently, we support standard Java Serialization and XML. Using this
12: * approach, it would be easy to added support for any other type of format.
13: *
14: * @author Jeff Tassin
15: */
16: public interface JETAPersistable extends Externalizable {
17:
18: /**
19: * Objects implement this method to restore their state. Primitives and
20: * objects can be read from the JETAObjectInput instance.
21: */
22: public void read(JETAObjectInput in) throws ClassNotFoundException,
23: IOException;
24:
25: /**
26: * Objects implement this method to store their state. Primitives and
27: * objects can be written using the JETAObjectOutput instance.
28: */
29: public void write(JETAObjectOutput out) throws IOException;
30:
31: }
|