if (null == this.getElaborationDate() || !this.getElaborationDate().equals(DateConverter.getFormattedDate(new Date(), "yyyyMMdd"))) {
this.release();
this.setElaborationDate(DateConverter.getFormattedDate(new Date(), "yyyyMMdd"));
}
try {
Category root = this.getCategoryManager().getCategory(this.getTagCloudCategoryRoot());
if (root == null || root.getChildren() == null || root.getChildren().length == 0) {
ApsSystemUtils.getLogger().error("Category Root '" + this.getTagCloudCategoryRoot() + "' null or dosn't has children");
return new HashMap<ITreeNode, Integer>();
}
Set<String> userGroupCodes = this.getGroupsForSearch(currentUser);
String key = this.createGroupMappingKey(userGroupCodes);
Map<String, Integer> cloudInfosSmall = this.getGlobalCloudInfos().get(key);
if (null == cloudInfosSmall) {
cloudInfosSmall = new HashMap<String, Integer>();
this.getGlobalCloudInfos().put(key, cloudInfosSmall);
EntitySearchFilter[] filters = (null != this.getDelayDays() && this.getDelayDays().intValue() > 0) ? new EntitySearchFilter[]{this.getStartDateFilter()} : null;
Category[] children = root.getChildren();
for (int i = 0; i < children.length; i++) {
Category child = children[i];
List<String> contentsId = this.getTagCloudDAO().loadPublicContentsId(new String[]{child.getCode()}, filters, userGroupCodes);
cloudInfosSmall.put(child.getCode(), new Integer(contentsId.size()));
}
}
cloudInfos = new HashMap<ITreeNode, Integer>(cloudInfosSmall.size());
Iterator<String> iterCodes = cloudInfosSmall.keySet().iterator();
while (iterCodes.hasNext()) {