{
if (log.isDebugEnabled())
{
log.debug("Start reading control configuration");
}
ControlConfiguration controlConfiguration
= new ControlConfigurationXmlParser()
.readControllerConfiguration(
configurationProvider,
unitDescriptor.getProjectPaths(),
configurationHandlers);
if (unitDescriptor.getLoglevel() == null)
{
unitConfiguration.setLoglevel(controlConfiguration.getLoglevel());
controlConfiguration.getLoglevel().apply();
}
unitConfiguration.setOutputList(
controlConfiguration.getOutputFiles());
{
if (log.isDebugEnabled())
{
log.debug("Start reading options");
}
List<OptionsConfiguration> optionConfigurations
= new ArrayList<OptionsConfiguration>();
optionConfigurations.addAll(
controlConfiguration.getOptionsConfigurations());
if (unitDescriptor.getOverrideOptions() != null)
{
optionConfigurations.add(unitDescriptor.getOverrideOptions());
}
Options options = new Options();
for (OptionsConfiguration optionConfiguration
: optionConfigurations)
{
options.addGlobalOptions(
optionConfiguration.getOptions(
configurationProvider));
}
unitConfiguration.setOptions(options);
{
log.debug("End reading options");
}
}
unitConfiguration.setEntityReferences(
controlConfiguration.getEntityReferences());
unitConfiguration.setDefaultOutputEncoding(
unitDescriptor.getDefaultOutputEncoding());
if (log.isDebugEnabled())
{
log.debug("Control configuration successfully read.");