package net.sourceforge.fenixedu.presentationTier.renderers.providers; import java.util.ArrayList; import java.util.List; import pt.ist.fenixWebFramework.renderers.DataProvider; import pt.ist.fenixWebFramework.renderers.components.converters.Converter; import net.sourceforge.fenixedu.domain.organizationalStructure.PartyTypeEnum; import net.sourceforge.fenixedu.domain.organizationalStructure.Unit; import net.sourceforge.fenixedu.domain.organizationalStructure.UnitUtils; import net.sourceforge.fenixedu.presentationTier.renderers.converters.DomainObjectKeyConverter; public class ExternalInstitutionsProvider implements DataProvider { public Object provide(Object source, Object currentValue) { final List types = new ArrayList(); types.add(PartyTypeEnum.UNIVERSITY); types.add(PartyTypeEnum.SCHOOL); final List result = UnitUtils.readExternalUnitsByNameAndTypesStartingAtEarth("%", types); return result; } public Converter getConverter() { return new DomainObjectKeyConverter(); } }