use of org.craftercms.commons.crypto.impl.NoOpTextEncryptor in project engine by craftercms.
the class SiteContextFactory method getConfig.
protected HierarchicalConfiguration getConfig(SiteContext siteContext, String[] configPaths, ResourceLoader resourceLoader) {
String siteName = siteContext.getSiteName();
try {
logger.info("--------------------------------------------------");
logger.info("<Loading configuration for site: " + siteName + ">");
logger.info("--------------------------------------------------");
ConfigurationBuilder<HierarchicalConfiguration> builder;
if (textEncryptor instanceof NoOpTextEncryptor) {
builder = new MultiResourceConfigurationBuilder(configPaths, resourceLoader);
} else {
builder = new MultiResourceConfigurationBuilder(configPaths, resourceLoader, textEncryptor);
}
HierarchicalConfiguration config = builder.getConfiguration();
logger.info("--------------------------------------------------");
logger.info("</Loading configuration for site: " + siteName + ">");
logger.info("--------------------------------------------------");
return config;
} catch (ConfigurationException e) {
throw new SiteContextCreationException("Unable to load configuration for site '" + siteContext.getSiteName() + "'", e);
}
}
Aggregations