01: package org.objectweb.celtix.configuration;
02:
03: public interface ConfigurationProvider {
04:
05: void init(Configuration configuration);
06:
07: /**
08: * Lookup the value for the configuration item with the given name in the
09: * underlying store.
10: *
11: * @param name the name of the configuration item.
12: * @return the value of the configuration item.
13: */
14: Object getObject(String name);
15:
16: /**
17: * Change the value of the configuration item with the given name.
18: * Return true if the change was accepted and the value changed.
19: * It is the providers responsibility to persiste the change in its underlying store
20: * if it accepts the change.
21: *
22: * @param name the name of the configuration item.
23: * @param value the new value for the configuration item.
24: * @return true if the change was accepted.
25: */
26: boolean setObject(String name, Object value);
27:
28: /**
29: * Save the changes
30: *
31: * @return true if the save was successful.
32: */
33: boolean save();
34: }
|