return null;
}
community = (Community) dso;
DSpaceValidity validity = new DSpaceValidity();
validity.add(community);
Community[] subCommunities = community.getSubcommunities();
Collection[] collections = community.getCollections();
// Sub communities
for (Community subCommunity : subCommunities)
{
validity.add(subCommunity);
// Include the item count in the validity, only if the value is shown.
boolean showCount = ConfigurationManager.getBooleanProperty("webui.strengths.show");
if (showCount)
{
try {
int size = new ItemCounter(context).getCount(subCommunity);
validity.add("size:"+size);
} catch(ItemCountException e) { /* ignore */ }
}
}
// Sub collections
for (Collection collection : collections)
{
validity.add(collection);
// Include the item count in the validity, only if the value is shown.
boolean showCount = ConfigurationManager.getBooleanProperty("webui.strengths.show");
if (showCount)
{
try {
int size = new ItemCounter(context).getCount(collection);
validity.add("size:"+size);
} catch(ItemCountException e) { /* ignore */ }
}
}
this.validity = validity.complete();
}
catch (Exception e)
{
// Ignore all errors and invalidate the cache.
}