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