return velocityPluginService;
}
@Override
public ContentEntity getPageContent(PageEntity page, String languageCode) {
ContentEntity content = getDao().getContentDao().getByLanguage(
PageEntity.class.getName(), page.getId(), languageCode);
if (content == null || content.getContent().isEmpty()) {
content = getDao().getContentDao().getByLanguage(
PageEntity.class.getName(), page.getId(),
getBusiness().getDefaultLanguage());
}
if (content == null) {
logger.error("No content found for page " + page.getTitle());
content = new ContentEntity();
content.setParentClass(PageEntity.class.getName());
content.setParentKey(page.getId());
content.setLanguageCode(languageCode);
}
return content;
}