KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > oddjob > persist > ComponentPersister


1 /*
2  * (c) Rob Gordon 2005
3  */

4 package org.oddjob.persist;
5
6 import org.oddjob.arooa.ComponentRestorer;
7 import org.oddjob.arooa.registry.ComponentRegistry;
8
9 /**
10  * The definition for an object that can save and restore
11  * a heierarchy of components starting from the root component.
12  *
13  * @author Rob Gordon.
14  */

15 public interface ComponentPersister extends ComponentRestorer {
16
17     /**
18      * The root component of the hierarchy being persisted.
19      *
20      * @param component The root component.
21      */

22     public void setRoot(Object JavaDoc component);
23     
24     /**
25      * Get the root component of the hierarchy being persisted.
26      *
27      * @return The root component.
28      */

29     public Object JavaDoc getRoot();
30     
31     /**
32      * Initialise this perister. An implementation can expect the
33      * root component to have been provided before this method
34      * is called.
35      *
36      * @param componentRegistry The component in which an implementation
37      * can expect to find ids for component in the hierarchy.
38      */

39     public void initialise(ComponentRegistry componentRegistry);
40     
41     /**
42      * Close the persister. Free any resources.
43      *
44      */

45     public void close();
46 }
47
Popular Tags