01: package org.objectweb.celtix.configuration;
02:
03: public interface ConfigurationBuilder {
04: String CONFIGURATION_BUILDER_CLASS_PROPERTY = "org.objectweb.celtix.ConfigurationBuilderClass";
05:
06: /**
07: * Returns the top level <code>Configuration</code> object with the specified namespace and
08: * identifer or null if such a configuration does not exist.
09: * @throws ConfigurationException if no configuration metadata for the specified namespace is
10: * available.
11: * @param namespaceUri the configuration namespace.
12: * @param id the configuration identifier.
13: * @return the configuration.
14: */
15: Configuration getConfiguration(String namespaceUri, String id);
16:
17: /**
18: * Returns the <code>Configuration</code> object with the specified namespace and
19: * identifer that is a child of the specified parent configuration, or null if such a
20: * configuration does not exist.
21: * @throws ConfigurationException if no configuration metadata for the specified namespace is
22: * available.
23: * @param namespaceURI the configuration namespace.
24: * @param id the configuration identifier.
25: * @param parent the parent configuration.
26: * @return the configuration.
27: */
28: Configuration getConfiguration(String namespaceURI, String id,
29: Configuration parent);
30:
31: /**
32: * Creates a new top level <code>Configuration</code> object for the given namepace
33: * with the specified identifier.
34: * @param namespaceUri the configuration namespace.
35: * @param id the configuration identifier.
36: * @return the newly created configuration.
37: */
38: Configuration buildConfiguration(String namespaceUri, String id);
39:
40: /**
41: * Creates a new <code>Configuration</code> object for the given namepace as a child
42: * of the specified parent configuration and with the specified identifier.
43: * @paam namespaceUri the configuration namespace.
44: * @param id the configuration identifier.
45: * @param parent the parent configuration.
46: * @return the newly created configuration.
47: */
48: Configuration buildConfiguration(String namespaceUri, String id,
49: Configuration parent);
50:
51: /**
52: * Stores the specified configuration model with the builder.
53: * @param model the configuration metadata model.
54: */
55: void addModel(ConfigurationMetadata model);
56:
57: /**
58: * Stores the specified configuration model with the builder.
59: * @param resource url to the configuration metadata model.
60: */
61: void addModel(String resource);
62:
63: /**
64: * Returns the configuration metadata model for the given namespace or null if no such
65: * model is stored in this builder.
66: * @param namespaceURI the configuration namespace.
67: * @return the configuration metadata model.
68: */
69: ConfigurationMetadata getModel(String namespaceURI);
70:
71: }
|