01: package org.columba.core.config;
02:
03: import java.io.File;
04:
05: import org.columba.core.xml.XmlElement;
06: import org.columba.core.xml.XmlIO;
07:
08: /**
09: * Main entrypoint for configuration management.
10: * <p>
11: * Stores a list of all xml files in a hashtable. Hashtable key is the name of
12: * the xml file. Value is {@link XmlIO} object.
13: * <p>
14: * Mail and Addressbook components are just wrappers, encapsulating this class.
15: * Using these wrapper classes, you don't need to specify the module name (for
16: * example: mail, or addressbook) manually.
17: * <p>
18: * Note that all configuration file have default templates in the /res directory
19: * in package org.columba.core.config. These default configuration files are
20: * copied into the users's configuration directory the first time Columba is
21: * started.
22: * <p>
23: * Config creates the top-level directory for Columba's configuration in
24: * ".columba", which usually resides in the user's home directory or on older
25: * Windows versions in Columba's program folder.
26: * <p>
27: * Saving and loading of all configuration files is handled here, too.
28: *
29: * @author Frederik Dietz
30: *
31: */
32: public interface IConfig {
33:
34: /**
35: * Returns the directory the configuration is located in.
36: */
37: public abstract File getConfigDirectory();
38:
39: /**
40: * Get root xml element of configuration file.
41: *
42: * @param name
43: * name of configuration file
44: *
45: * @return root xml element
46: */
47: public abstract XmlElement get(String name);
48:
49: }
|