1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.services.registry;
18
19 import java.io.Reader;
20 import java.util.Map;
21
22 /***
23 * Interface for manipulating RegistryFragments in a fragment based
24 * registry implementation.
25 *
26 * @author <a href="mailto:raphael@apache.org">Raphaël Luta</a>
27 * @version $Id: FileRegistry.java,v 1.4 2004/02/23 03:31:50 jford Exp $
28 */
29 public interface FileRegistry {
30
31 public static final int DEFAULT_REFRESH = 300;
32
33 /*** Refresh the state of the registry implementation. Should be called
34 * whenever the underlying fragments are modified
35 */
36 public void refresh();
37
38 /***
39 * @return a Map of all fragments keyed by file names
40 */
41 public Map getFragmentMap();
42
43 /***
44 * Read and unmarshal a fragment in memory
45 * @param name the name of this fragment
46 * @param reader the reader to use for creating this fragment
47 * @param persistent whether this fragment should be persisted on disk in
48 * the registry
49 */
50 public void createFragment(String name, Reader reader, boolean persistent);
51
52 /***
53 * Load and unmarshal a RegistryFragment from the file
54 * @param file the absolute file path storing this fragment
55 */
56 public void loadFragment(String file);
57
58 /***
59 * Marshal and save a RegistryFragment to disk
60 * @param file the absolute file path storing this fragment
61 */
62 public void saveFragment(String file);
63
64 /***
65 * Remove a fragment from storage
66 * @param file the absolute file path storing this fragment
67 */
68 public void removeFragment(String file);
69 }