01: /*
02: * Copyright 2004 Outerthought bvba and Schaubroeck nv
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
05: * use this file except in compliance with the License. You may obtain a copy of
06: * the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13: * License for the specific language governing permissions and limitations under
14: * the License.
15: */
16: package org.outerj.daisy.configuration;
17:
18: import org.apache.avalon.framework.configuration.Configuration;
19: import org.apache.avalon.framework.configuration.ConfigurationException;
20: import org.w3c.dom.Element;
21:
22: /**
23: * ConfigurationManager manages configuration for components.
24: *
25: * <p>Currently this is an Avalon/Merlin compatibility oriented.
26: *
27: * <p>This is a temporary solution until there's time to develop new.</p>
28: */
29: public interface ConfigurationManager {
30: /**
31: * Get configuration.
32: *
33: * @param group group to which the configuration belongs (for organisational & namespacing purposes)
34: * @param name name of the configuration
35: */
36: Configuration getConfiguration(String group, String name)
37: throws ConfigurationException;
38:
39: /**
40: * Gets configuration, using the specified defaultConfig as default configuration
41: * (todo mention something about the cascading config).
42: */
43: Configuration getConfiguration(String group, String name,
44: Configuration defaultConfig) throws ConfigurationException;
45:
46: /**
47: * Converts a DOM-tree to a configuration structure.
48: */
49: Configuration toConfiguration(Element element,
50: String locationDescription);
51: }
|