use of org.olat.core.gui.ShortName in project openolat by klemens.
the class RepositorySearchController method updateFilters.
protected void updateFilters(List<RepositoryEntry> entries, Identity owner) {
List<ShortName> restrictedTypes = new ArrayList<ShortName>();
Set<String> uniqueTypes = new HashSet<String>();
for (RepositoryEntry entry : entries) {
// no red screen for that
if (entry.getOlatResource() == null)
continue;
String type = entry.getOlatResource().getResourceableTypeName();
if (type != null && !uniqueTypes.contains(type)) {
String label = translate(type);
restrictedTypes.add(new TypeFilter(type, label, owner));
uniqueTypes.add(type);
}
}
if (restrictedTypes.size() > 1) {
tableCtr.setFilters(restrictedTypes, null);
} else {
tableCtr.setFilters(null, null);
}
}
Aggregations