Examples of AcademicCalendarEntry


Examples of org.fenixedu.academic.domain.time.calendarStructure.AcademicCalendarEntry

    }

    public ActionForward prepareEditEntry(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws Exception {

        AcademicCalendarEntry entry = getAcademicCalendarEntryFromParameter(request);
        AcademicCalendarRootEntry rootEntry = getAcademicCalendarRootEntryFromParameter(request);

        Partial beginPartial = getBeginFromParameter(request);
        Partial endPartial = getEndFromParameter(request);
View Full Code Here

Examples of org.fenixedu.academic.domain.time.calendarStructure.AcademicCalendarEntry

    public ActionForward editEntry(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws Exception {

        CalendarEntryBean bean = getRenderedObject("editedEntryBeanID");

        AcademicCalendarEntry entry = null;
        try {
            entry = CreateAcademicCalendarEntry.run(bean, false);

        } catch (DomainException e) {
            addActionMessage(request, e.getMessage(), e.getArgs());
            request.setAttribute("entryBean", bean);
            return mapping.findForward("prepareCreateCalendarEntry");
        }

        return generateGanttDiagram(mapping, request, CalendarEntryBean.createCalendarEntryBeanToCreateEntry(
                entry.getRootEntry(), entry, bean.getBeginDateToDisplay(), bean.getEndDateToDisplay()));
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.time.calendarStructure.AcademicCalendarEntry

    }

    public ActionForward deleteEntry(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws Exception {

        AcademicCalendarEntry entry = getAcademicCalendarEntryFromParameter(request);
        AcademicCalendarRootEntry rootEntry = getAcademicCalendarRootEntryFromParameter(request);

        AcademicCalendarRootEntry entryRootEntry = entry.getRootEntry();
        AcademicCalendarEntry entryParentEntry = entry.getParentEntry();

        boolean deletedRootEntry = entry.isRoot();

        Partial beginPartial = getBeginFromParameter(request);
        Partial endPartial = getEndFromParameter(request);
View Full Code Here

Examples of org.fenixedu.academic.domain.time.calendarStructure.AcademicCalendarEntry

        request.setAttribute("executionDegrees", executionDegrees);
        ExecutionSemester executionSemester =
                (ExecutionSemester) ExecutionInterval.getExecutionInterval(contextSelectionBean.getAcademicInterval());
        request.setAttribute("executionSemester", executionSemester);

        AcademicCalendarEntry academicCalendarEntry = contextSelectionBean.getAcademicInterval().getAcademicCalendarEntry();
        while (!(academicCalendarEntry instanceof AcademicCalendarRootEntry)) {
            if (academicCalendarEntry instanceof AcademicYearCE) {
                ExecutionYear year = ExecutionYear.getExecutionYear((AcademicYearCE) academicCalendarEntry);
                request.setAttribute("executionYear", year);
                break;
            } else {
                academicCalendarEntry = academicCalendarEntry.getParentEntry();
            }
        }

        if (!executionSemester.isCurrent()) {
            request.setAttribute("noEditionAllowed", true);
View Full Code Here

Examples of org.fenixedu.academic.domain.time.calendarStructure.AcademicCalendarEntry

    }

    public ActionForward prepareViewAcademicCalendar(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws Exception {

        AcademicCalendarEntry academicCalendar = getAcademicCalendarEntryFromParameter(request);
        ExecutionYear currentExecutionYear = ExecutionYear.readCurrentExecutionYear();

        Partial begin = CalendarEntryBean.getPartialFromYearMonthDay(currentExecutionYear.getBeginDateYearMonthDay());
        Partial end = CalendarEntryBean.getPartialFromYearMonthDay(currentExecutionYear.getEndDateYearMonthDay());
View Full Code Here

Examples of org.fenixedu.academic.domain.time.calendarStructure.AcademicCalendarEntry

    }

    public ActionForward viewAcademicCalendarEntry(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws Exception {

        AcademicCalendarEntry entry = getAcademicCalendarEntryFromParameter(request);
        AcademicCalendarRootEntry rootEntry = getAcademicCalendarRootEntryFromParameter(request);

        Partial beginPartial = getBeginFromParameter(request);
        Partial endPartial = getEndFromParameter(request);
View Full Code Here

Examples of org.fenixedu.academic.domain.time.calendarStructure.AcademicCalendarEntry

    }

    public ActionForward prepareCreateEntry(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws Exception {

        AcademicCalendarEntry parentEntry = getAcademicCalendarEntryFromParameter(request);
        AcademicCalendarRootEntry rootEntry = getAcademicCalendarRootEntryFromParameter(request);

        Partial beginPartial = getBeginFromParameter(request);
        Partial endPartial = getEndFromParameter(request);
View Full Code Here

Examples of org.fenixedu.academic.domain.time.calendarStructure.AcademicCalendarEntry

    public ActionForward createEntry(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
            HttpServletResponse response) throws Exception {

        CalendarEntryBean bean = getRenderedObject("createdEntryBeanID");

        AcademicCalendarEntry entry = null;
        try {
            entry = CreateAcademicCalendarEntry.run(bean, true);

        } catch (DomainException e) {
            addActionMessage(request, e.getMessage(), e.getArgs());
            request.setAttribute("parentEntryBean", bean);
            return mapping.findForward("prepareCreateCalendarEntry");
        }

        return generateGanttDiagram(mapping, request, CalendarEntryBean.createCalendarEntryBeanToCreateEntry(
                entry.getRootEntry(), entry, bean.getBeginDateToDisplay(), bean.getEndDateToDisplay()));
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.time.calendarStructure.AcademicCalendarEntry

        }
        return 0;
    }

    public int getDayOfAcademicSemester(long instant) {
        AcademicCalendarEntry entryByInstant =
                academicCalendar.getEntryByInstant(instant, AcademicSemesterCE.class, AcademicYearCE.class);
        if (entryByInstant != null) {
            DateTime instantDateTime = new DateTime(instant);
            Interval interval = new Interval(entryByInstant.getBegin(), instantDateTime);
            int days = interval.toPeriod().getDays();
            if (days > 0) {
                return days;
            }
        }
View Full Code Here

Examples of org.fenixedu.academic.domain.time.calendarStructure.AcademicCalendarEntry

        return null;
    }

    // FIXME: Optimization Required
    public ExecutionDegree getExecutionDegreeByAcademicInterval(AcademicInterval academicInterval) {
        AcademicCalendarEntry academicCalendarEntry = academicInterval.getAcademicCalendarEntry();
        while (!(academicCalendarEntry instanceof AcademicCalendarRootEntry)) {
            if (academicCalendarEntry instanceof AcademicYearCE) {
                ExecutionYear year = ExecutionYear.getExecutionYear((AcademicYearCE) academicCalendarEntry);
                for (ExecutionDegree executionDegree : getExecutionDegreesSet()) {
                    if (executionDegree.getExecutionYear().getAcademicInterval().equals(year.getAcademicInterval())) {
                        return executionDegree;
                    }
                }
            }

            academicCalendarEntry = academicCalendarEntry.getParentEntry();
        }

        return null;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.