package net.sourceforge.fenixedu.presentationTier.Action.manager; import java.util.SortedSet; import java.util.TreeSet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import net.sourceforge.fenixedu.applicationTier.Filtro.exception.FenixFilterException; import net.sourceforge.fenixedu.domain.Degree; import net.sourceforge.fenixedu.domain.degree.DegreeType; import net.sourceforge.fenixedu.presentationTier.Action.base.FenixAction; import net.sourceforge.fenixedu.presentationTier.Action.exceptions.FenixActionException; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; /** * @author lmac1 */ public class ReadDegreesAction extends FenixAction { public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws FenixActionException, FenixFilterException { final SortedSet degrees = new TreeSet(Degree.COMPARATOR_BY_DEGREE_TYPE_AND_NAME_AND_ID); degrees.addAll(Degree.readAllByDegreeType(DegreeType.MASTER_DEGREE)); request.setAttribute("degreesList", degrees); return mapping.findForward("readDegrees"); } }