use of com.celements.blog.article.IArticleEngineRole in project celements-blog by celements.
the class BlogService method getArticleEngine.
private IArticleEngineRole getArticleEngine() throws ArticleLoadException {
IArticleEngineRole engine = null;
String engineHint = getContext().getWiki().getXWikiPreference("blog_article_engine", "blog.article.engine", null, getContext());
try {
Map<String, IArticleEngineRole> engineMap = componentManager.lookupMap(IArticleEngineRole.class);
engine = engineMap.get(engineHint);
if (engine == null) {
engine = engineMap.get("default");
}
} catch (ComponentLookupException exc) {
LOGGER.error("Error looking up engine components", exc);
}
if (engine != null) {
LOGGER.info("getArticleEngine: got engine '" + engine + "' for hint '" + engineHint + "'");
return engine;
} else {
throw new ArticleLoadException("Unable to load engine for hint");
}
}
Aggregations