String klass = (String) engineConfig.get("class");
Map<String, Object> options = (Map<String, Object>) engineConfig.get("options");
boolean isDefaultEngine = StringUtils.defaultString(engineConfig.get("default"),
"false").trim().equalsIgnoreCase("true");
ViewRenderer engine = null;
try {
engine = (ViewRenderer) ClassUtilities.loadClass(klass).newInstance();
engine.loadConfiguration(site, options);
engines.put(name, engine);
if (isDefaultEngine) {
defaultEngine = engine;
if (site.getRepositoryManager() != null) {