1 package org.naftulin.configmgr;
2
3 /***
4 * Configuration Manager provides a convinient way to read configurations from configuration managment engine.
5 *
6 * @author Henry Naftulin
7 * @since 1.0
8 */
9 public interface ConfigurationManager {
10 /***
11 * Returns the configuration based on the key.
12 * If the configuration is not found or is in error state throws an exception.
13 * @param key configuration mapped under.
14 * @return the configuration based on the key.
15 * @throws ConfigurationManagerException if configuration is not found or in error state.
16 */
17 Object getConfiguration(String key) throws ConfigurationManagerException;
18
19 /***
20 * Returns the configuration based on the key if found and not in error state. Otherwise
21 * returns null.
22 * @param key configuration mapped under.
23 * @return conifguration if found and it does not countain errors, null otherwise
24 */
25 Object getConfigurationSilent(String key);
26
27 }