this.checkCategoryRoot();
ApsSystemUtils.getLogger().debug(this.getClass().getName() + ": initialized");
}
private void checkCategoryRoot() {
Category tagCloudRoot = this.getCategoryManager().getCategory(this.getTagCloudCategoryRoot());
if (null != tagCloudRoot) {
return;
}
try {
tagCloudRoot = new Category();
tagCloudRoot.setCode(this.getTagCloudCategoryRoot());
Category root = this.getCategoryManager().getRoot();
ApsProperties titles = new ApsProperties();
Set<Object> langCodes = root.getTitles().keySet();
Iterator<Object> iter = langCodes.iterator();
while (iter.hasNext()) {
Object langCode = (Object) iter.next();
titles.put(langCode, "Tag Cloud Root");
}
tagCloudRoot.setTitles(titles);
tagCloudRoot.setParent(root);
tagCloudRoot.setParentCode(root.getCode());
this.getCategoryManager().addCategory(tagCloudRoot);
ApsSystemUtils.getLogger().debug(this.getClass().getName() + ": TagCloud category root Created ");
} catch (Throwable t) {
ApsSystemUtils.logThrowable(t, this, "checkCategoryRoot");
throw new RuntimeException("Error on adding tag cloud category root", t);