/* * Created on 29/Jul/2003 */ package net.sourceforge.fenixedu.applicationTier.Servico.manager; import java.util.ArrayList; import java.util.List; import net.sourceforge.fenixedu.applicationTier.FenixService; import net.sourceforge.fenixedu.applicationTier.Servico.exceptions.FenixServiceException; import net.sourceforge.fenixedu.dataTransferObject.InfoDegreeCurricularPlan; import net.sourceforge.fenixedu.domain.Degree; import net.sourceforge.fenixedu.domain.DegreeCurricularPlan; import pt.ist.fenixWebFramework.services.Service; /** * @author lmac1 */ public class ReadDegreeCurricularPlansByDegree extends FenixService { @Service public static List run(Integer idDegree) throws FenixServiceException { final Degree degree = rootDomainObject.readDegreeByOID(idDegree); List result = new ArrayList(); for (DegreeCurricularPlan dcp : degree.getDegreeCurricularPlans()) { result.add(InfoDegreeCurricularPlan.newInfoFromDomain(dcp)); } return result; } }