Examples of CalendarEntryBean


Examples of org.fenixedu.academic.dto.manager.academicCalendarManagement.CalendarEntryBean

        } else {
            begin = CalendarEntryBean.getPartialFromYearMonthDay(new YearMonthDay());
            end = CalendarEntryBean.getPartialFromYearMonthDay(new YearMonthDay().plusMonths(3));
        }

        CalendarEntryBean bean = CalendarEntryBean.createAcademicCalendarBean(begin, end);
        request.setAttribute("parentEntryBean", bean);

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

Examples of org.fenixedu.academic.dto.manager.academicCalendarManagement.CalendarEntryBean

        ExecutionYear currentExecutionYear = ExecutionYear.readCurrentExecutionYear();

        Partial begin = CalendarEntryBean.getPartialFromYearMonthDay(currentExecutionYear.getBeginDateYearMonthDay());
        Partial end = CalendarEntryBean.getPartialFromYearMonthDay(currentExecutionYear.getEndDateYearMonthDay());

        CalendarEntryBean bean =
                CalendarEntryBean.createCalendarEntryBeanToCreateEntry((AcademicCalendarRootEntry) academicCalendar,
                        academicCalendar, begin, end);

        return generateGanttDiagram(mapping, request, bean);
    }
View Full Code Here

Examples of org.fenixedu.academic.dto.manager.academicCalendarManagement.CalendarEntryBean

    }

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

        CalendarEntryBean bean = getRenderedObject("datesToDisplayID");

        YearMonthDay beginDate = bean.getBeginDateToDisplayInYearMonthDayFormat();
        YearMonthDay endDate = bean.getEndDateToDisplayInYearMonthDayFormat();

        if (beginDate.isAfter(endDate)) {
            addActionMessage(request, "error.begin.after.end");
            ExecutionYear currentExecutionYear = ExecutionYear.readCurrentExecutionYear();
            Partial begin = CalendarEntryBean.getPartialFromYearMonthDay(currentExecutionYear.getBeginDateYearMonthDay());
            Partial end = CalendarEntryBean.getPartialFromYearMonthDay(currentExecutionYear.getEndDateYearMonthDay());
            bean = CalendarEntryBean.createCalendarEntryBeanToCreateEntry(bean.getRootEntry(), bean.getRootEntry(), begin, end);
            RenderUtils.invalidateViewState("datesToDisplayID");
            return generateGanttDiagram(mapping, request, bean);
        }

        return generateGanttDiagram(mapping, request, bean);
View Full Code Here

Examples of org.fenixedu.academic.dto.manager.academicCalendarManagement.CalendarEntryBean

    }

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

        CalendarEntryBean bean = getRenderedObject();
        return generateGanttDiagram(mapping, request, bean);
    }
View Full Code Here

Examples of org.fenixedu.academic.dto.manager.academicCalendarManagement.CalendarEntryBean

        AcademicCalendarRootEntry rootEntry = getAcademicCalendarRootEntryFromParameter(request);

        Partial beginPartial = getBeginFromParameter(request);
        Partial endPartial = getEndFromParameter(request);

        CalendarEntryBean bean =
                CalendarEntryBean.createCalendarEntryBeanToCreateEntry(rootEntry, entry, beginPartial, endPartial);

        return generateGanttDiagram(mapping, request, bean);
    }
View Full Code Here

Examples of org.fenixedu.academic.dto.manager.academicCalendarManagement.CalendarEntryBean

    }

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

        CalendarEntryBean bean = getRenderedObject("calendarEntryBeanWithType");
        if (bean == null) {
            bean = getRenderedObject("createdEntryBeanID");
        }

        request.setAttribute("parentEntryBean", bean);
View Full Code Here

Examples of org.fenixedu.academic.dto.manager.academicCalendarManagement.CalendarEntryBean

    }

    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.dto.manager.academicCalendarManagement.CalendarEntryBean

    }

    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.dto.manager.academicCalendarManagement.CalendarEntryBean

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

        List<Class<? extends AcademicCalendarEntry>> result = new ArrayList<Class<? extends AcademicCalendarEntry>>();
        CalendarEntryBean bean = (CalendarEntryBean) source;

        if (bean.getEntry() != null && bean.getEntry().isRoot()) {

            result.add(AcademicYearCE.class);
            result.add(AcademicSemesterCE.class);
            result.add(AcademicTrimesterCE.class);

        } else if (bean.getEntry() != null) {

            result.add(AcademicSemesterCE.class);
            result.add(AcademicTrimesterCE.class);
            result.add(LessonsPeriodCE.class);
            result.add(EnrolmentsPeriodCE.class);
View Full Code Here

Examples of org.fenixedu.academic.dto.manager.academicCalendarManagement.CalendarEntryBean

public class TemplateAcademicCalendarProvider implements DataProvider {

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

        CalendarEntryBean rootEntry = (CalendarEntryBean) source;
        Set<AcademicCalendarRootEntry> academicCalendars = Bennu.getInstance().getAcademicCalendarsSet();
        List<AcademicCalendarRootEntry> result = new ArrayList<AcademicCalendarRootEntry>();
        result.addAll(academicCalendars);

        if (rootEntry.getEntry() != null) {
            result.remove(rootEntry.getEntry());
        }

        return result;
    }
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.