Package org.fenixedu.academic.dto.administrativeOffice.lists

Examples of org.fenixedu.academic.dto.administrativeOffice.lists.ExecutionDegreeListBean


public class DegreeCurricularPlanExecutionYearDispacthAction extends FenixDispatchAction {

    @EntryPoint
    public ActionForward prepare(final ActionMapping mapping, final ActionForm form, final HttpServletRequest request,
            final HttpServletResponse response) {
        request.setAttribute("executionDegreeBean", new ExecutionDegreeListBean());

        return mapping.findForward("chooseExecutionYear");
    }
View Full Code Here


        return mapping.findForward("chooseExecutionYear");
    }

    public ActionForward chooseDegree(final ActionMapping mapping, final ActionForm form, final HttpServletRequest request,
            final HttpServletResponse response) {
        final ExecutionDegreeListBean executionDegreeBean = getRenderedObject("academicInterval");
        executionDegreeBean.setDegreeCurricularPlan(null);
        executionDegreeBean.setAcademicInterval(null);
        RenderUtils.invalidateViewState();
        request.setAttribute("executionDegreeBean", executionDegreeBean);
        return mapping.findForward("chooseExecutionYear");
    }
View Full Code Here

        return mapping.findForward("chooseExecutionYear");
    }

    public ActionForward chooseDegreeCurricularPlan(final ActionMapping mapping, final ActionForm form,
            final HttpServletRequest request, final HttpServletResponse response) {
        final ExecutionDegreeListBean executionDegreeBean = getRenderedObject("academicInterval");
        executionDegreeBean.setAcademicInterval(null);
        RenderUtils.invalidateViewState();
        request.setAttribute("executionDegreeBean", executionDegreeBean);
        return mapping.findForward("chooseExecutionYear");
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    public ActionForward showActiveCurricularCourseScope(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws FenixActionException, FenixServiceException {

        final ExecutionDegreeListBean executionDegreeBean = getRenderedObject("academicInterval");
        try {
            final SortedSet<DegreeModuleScope> degreeModuleScopes =
                    ReadActiveCurricularCourseScopeByDegreeCurricularPlanAndExecutionYear.run(executionDegreeBean
                            .getDegreeCurricularPlan().getExternalId(), executionDegreeBean.getAcademicInterval());

            final ActionErrors errors = new ActionErrors();
            if (degreeModuleScopes.isEmpty()) {
                errors.add("noDegreeCurricularPlan", new ActionError("error.nonExisting.AssociatedCurricularCourses"));
                saveErrors(request, errors);
            } else {
                request.setAttribute("degreeModuleScopes", degreeModuleScopes);
            }
        } catch (NotAuthorizedException ex1) {
            addActionMessage(request, "message.not-authorized");
            return mapping.findForward("chooseExecutionYear");
        }

        request.setAttribute(PresentationConstants.ACADEMIC_INTERVAL, executionDegreeBean.getAcademicInterval());
        request.setAttribute("degreeCurricularPlan", executionDegreeBean.getDegreeCurricularPlan());

        return mapping.findForward("showActiveCurricularCourses");
    }
View Full Code Here

    @Override
    public Object provide(Object source, Object currentValue) {
        final SortedSet<AcademicInterval> academicIntervals =
                new TreeSet<AcademicInterval>(AcademicInterval.REVERSE_COMPARATOR_BY_BEGIN_DATE);

        final ExecutionDegreeListBean executionDegreeBean = (ExecutionDegreeListBean) source;
        if (executionDegreeBean.getDegreeCurricularPlan() != null) {

            for (ExecutionDegree exeDegree : executionDegreeBean.getDegreeCurricularPlan().getExecutionDegreesSet()) {
                academicIntervals.add(exeDegree.getAcademicInterval());
            }
        }

        return academicIntervals;
View Full Code Here

    @Override
    public Object provide(Object source, Object currentValue) {
        final SortedSet<ExecutionYear> executionYears = new TreeSet<ExecutionYear>(ExecutionYear.REVERSE_COMPARATOR_BY_YEAR);

        final ExecutionDegreeListBean executionDegreeBean = (ExecutionDegreeListBean) source;
        if (executionDegreeBean.getDegreeCurricularPlan() != null) {
            final SortedSet<ExecutionDegree> executionDegrees =
                    new TreeSet<ExecutionDegree>(ExecutionDegree.EXECUTION_DEGREE_COMPARATORY_BY_DEGREE_TYPE_AND_NAME);
            executionDegrees.addAll(executionDegreeBean.getDegreeCurricularPlan().getExecutionDegreesSet());

            for (ExecutionDegree exeDegree : executionDegrees) {
                executionYears.add(exeDegree.getExecutionYear());
            }
        } else if (executionDegreeBean.getDegreeCurricularPlan() == null) {
            executionYears.addAll(ExecutionYear.readNotClosedExecutionYears());
        }

        return executionYears;
    }
View Full Code Here

    public Object provide(Object source, Object currentValue) {
        final SortedSet<DegreeCurricularPlan> result =
                new TreeSet<DegreeCurricularPlan>(
                        DegreeCurricularPlan.DEGREE_CURRICULAR_PLAN_COMPARATOR_BY_DEGREE_TYPE_AND_EXECUTION_DEGREE_AND_DEGREE_CODE);

        ExecutionDegreeListBean executionDegreeListBean = (ExecutionDegreeListBean) source;
        if (executionDegreeListBean.getDegree() != null) {
            result.addAll(executionDegreeListBean.getDegree().getDegreeCurricularPlansSet());
        }

        return result;
    }
View Full Code Here

public class DegreeCurricularPlansForDegree implements DataProvider {

    @Override
    public Object provide(Object source, Object currentValue) {

        final ExecutionDegreeListBean executionDegreeBean = (ExecutionDegreeListBean) source;
        final List<DegreeCurricularPlan> result = new ArrayList<DegreeCurricularPlan>();
        if (executionDegreeBean.getDegree() != null) {
            result.addAll(executionDegreeBean.getDegree().getDegreeCurricularPlansSet());
            Collections.sort(result, new BeanComparator("name"));
        } else {
            executionDegreeBean.setDegreeCurricularPlan(null);
        }
        return result;
    }
View Full Code Here

public class CurricularCoursesForDegreeCurricularPlan implements DataProvider {

    @Override
    public Object provide(Object source, Object currentValue) {

        final ExecutionDegreeListBean executionDegreeListBean = (ExecutionDegreeListBean) source;
        final List<DegreeModule> result = new ArrayList<DegreeModule>();
        if (executionDegreeListBean.getDegree() != null && executionDegreeListBean.getDegreeCurricularPlan() != null) {

            if (executionDegreeListBean.getDegree().getDegreeCurricularPlansSet()
                    .contains(executionDegreeListBean.getDegreeCurricularPlan())) {
                if (executionDegreeListBean.getDegree().isBolonhaDegree()) {
                    result.addAll(executionDegreeListBean.getDegreeCurricularPlan().getDcpDegreeModules(CurricularCourse.class));
                } else {
                    result.addAll(executionDegreeListBean.getDegreeCurricularPlan().getCurricularCoursesSet());
                }
            } else {
                executionDegreeListBean.setDegreeCurricularPlan(null);
                executionDegreeListBean.setCurricularCourse(null);
            }
        }

        Collections.sort(result, DegreeModule.COMPARATOR_BY_NAME);
        Collections.reverseOrder();
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.dto.administrativeOffice.lists.ExecutionDegreeListBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.