public PluginDescriptorBasedAugeasConfiguration(String path,Configuration pluginConfiguration) throws AugeasRhqException {
List<String> includes = determineGlobs(pluginConfiguration, INCLUDE_GLOBS_PROP);
List<String> excludes = determineGlobs(pluginConfiguration, EXCLUDE_GLOBS_PROP);
modules = new ArrayList<AugeasModuleConfig>();
if (includes.isEmpty())
throw new AugeasRhqException("At least one Include glob must be defined.");
try {
loadPath = pluginConfiguration.getSimpleValue(AUGEAS_LOAD_PATH, "");
if (loadPath.equals("")){
loadPath = path;
}
AugeasModuleConfig config = new AugeasModuleConfig();
config.setIncludedGlobs(includes);
config.setExcludedGlobs(excludes);
config.setLensPath(getAugeasModuleName(pluginConfiguration) + ".lns");
config.setModuletName(getAugeasModuleName(pluginConfiguration));
modules.add(config);
}catch(Exception e){
log.error("Creation of temporary Directory for augeas lens failed.");
throw new AugeasRhqException("Creation of temporary Directory for augeas lens failed.",e);
}
}