/* * Created on April 21, 2006 * by mrsp */ package net.sourceforge.fenixedu.presentationTier.backBeans.scientificCouncil; import java.util.ArrayList; import java.util.Collections; import java.util.List; import net.sourceforge.fenixedu.domain.organizationalStructure.Unit; import net.sourceforge.fenixedu.presentationTier.backBeans.manager.personManagement.ManagerFunctionsManagementBackingBean; import org.joda.time.YearMonthDay; public class ScientificCouncilFunctionsManagementBackingBean extends ManagerFunctionsManagementBackingBean { protected void getUnitsList(Unit parentUnit, Unit parentUnitParent, StringBuilder buffer, YearMonthDay currentDate) { openLITag(buffer); List subUnits = new ArrayList(getSubUnits(parentUnit, currentDate)); Collections.sort(subUnits, Unit.COMPARATOR_BY_NAME_AND_ID); if (!subUnits.isEmpty()) { putImage(parentUnit, buffer, parentUnitParent); } buffer.append("").append(parentUnit.getPresentationName()).append("").append( ""); if (!subUnits.isEmpty()) { openULTag(parentUnit, buffer, parentUnitParent); } for (Unit subUnit : subUnits) { getUnitsList(subUnit, parentUnit, buffer, currentDate); } if (!subUnits.isEmpty()) { closeULTag(buffer); } } }