Package org.fenixedu.academic.dto

Examples of org.fenixedu.academic.dto.InfoExecutionYear


                Collections.sort(executionDegrees, new ComparatorByNameForInfoExecutionDegree());
            }

            Iterator iter = executionYears.iterator();
            while (iter.hasNext()) {
                InfoExecutionYear year = (InfoExecutionYear) iter.next();
                if (year.getExternalId().equals(executionYearId)) {
                    request.setAttribute("searchDetails", makeBodyHeader(year.getYear(), semester, teacherType));
                    break;
                }
            }

            if (semester != null) {
View Full Code Here


        return infoExecutionCourse;
    }

    public static final InfoExecutionYear getExecutionYearFromRequest(HttpServletRequest request) throws FenixActionException,
            FenixServiceException {
        InfoExecutionYear infoExecutionYear = null;
        String year = (String) request.getAttribute("eYName");
        if (year == null) {
            year = request.getParameter("eYName");
        }
View Full Code Here

        return infoExecutionYear;
    }

    public static final InfoExecutionPeriod getExecutionPeriodFromRequest(HttpServletRequest request) throws FenixActionException {
        InfoExecutionPeriod infoExecutionPeriod = null;
        InfoExecutionYear infoExecutionYear;
        try {
            infoExecutionYear = getExecutionYearFromRequest(request);
        } catch (FenixServiceException e) {
            throw new FenixActionException(e);
        }
View Full Code Here

        prepareConstants(userView, infoPerson, request);
        prepareForm(dynaForm, request);
    }

    private void prepareForm(DynaActionForm dynaForm, HttpServletRequest request) {
        InfoExecutionYear infoExecutionYear = (InfoExecutionYear) request.getAttribute("executionYear");
        InfoPerson infoPerson = (InfoPerson) request.getAttribute("infoPerson");
        dynaForm.set("externalId", infoPerson.getExternalId());
        dynaForm.set("teacherId", infoPerson.getUsername());
        dynaForm.set("teacherName", infoPerson.getNome());
        if (dynaForm.get("executionYearId") == null || dynaForm.getString("executionYearId").isEmpty()) {
            dynaForm.set("executionYearId", infoExecutionYear.getExternalId());
        }

        List detailedProfessorshipList = (List) request.getAttribute("detailedProfessorshipList");

        List executionCourseIds = new ArrayList();
View Full Code Here

    private void prepareConstants(User userView, InfoPerson infoPerson, HttpServletRequest request) throws FenixServiceException {

        List executionYears = ReadNotClosedExecutionYears.run();

        InfoExecutionYear infoExecutionYear = (InfoExecutionYear) CollectionUtils.find(executionYears, new Predicate() {
            @Override
            public boolean evaluate(Object arg0) {
                InfoExecutionYear infoExecutionYearElem = (InfoExecutionYear) arg0;
                if (infoExecutionYearElem.getState().equals(PeriodState.CURRENT)) {
                    return true;
                }
                return false;
            }
        });
View Full Code Here

        return result;
    }

    public String getChoosenExecutionYear() throws FenixServiceException {

        InfoExecutionYear executionYear = ReadExecutionYearByID.run(getChoosenExecutionYearID());

        return executionYear.getYear();
    }
View Full Code Here

    }

    public List<SelectItem> getExecutionYearItems() throws FenixServiceException {
        final List<SelectItem> result = new ArrayList<SelectItem>();

        final InfoExecutionYear currentInfoExecutionYear = ReadCurrentExecutionYear.run();
        final List<InfoExecutionYear> notClosedInfoExecutionYears = ReadNotClosedExecutionYears.run();

        for (final InfoExecutionYear notClosedInfoExecutionYear : notClosedInfoExecutionYears) {
            Person loggedPerson = AccessControl.getPerson();
            if (loggedPerson.hasRole(RoleType.MANAGER) || notClosedInfoExecutionYear.after(currentInfoExecutionYear)) {
                result.add(new SelectItem(notClosedInfoExecutionYear.getExternalId(), notClosedInfoExecutionYear.getYear()));
            }
        }

        result.add(0, new SelectItem(currentInfoExecutionYear.getExternalId(), currentInfoExecutionYear.getYear()));

        setDefaultExecutionYearIDIfExisting();

        return result;
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.dto.InfoExecutionYear

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.