// Logger first
log = LoggerFactory.getLogger(ConfigurationManager.class);
IBindingFactory bfact = BindingDirectory.getFactory(WebuiConfiguration.class);
IUnmarshallingContext uctx = bfact.createUnmarshallingContext();
WebuiConfiguration config = (WebuiConfiguration) uctx.unmarshalDocument(inputStream, null);
ClassLoader cl = Thread.currentThread().getContextClassLoader();
if (config.getAnnotationClasses() != null) {
for (String annotationClass : config.getAnnotationClasses()) {
// process annotation and get the Component
Component[] components = annotationToComponents(cl, annotationClass);
setComponentConfigs(components);
}
}
if (config.getComponents() != null) {
for (ComponentMetaData componentMetaData : config.getComponents()) {
String key = componentMetaData.getType();
if (componentMetaData.getId() != null) {
key = key + ":" + componentMetaData.getId();
}
configs_.put(key, new Component(componentMetaData));
}
}
application_ = config.getApplication();
}