Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.ShiftType


    public Grouping createOrEditGrouping(ProjectGroupBean bean, ExecutionCourse executionCourse) {
        EnrolmentGroupPolicyType enrolmentPolicyType =
                bean.getAtomicEnrolmentPolicy() != null && bean.getAtomicEnrolmentPolicy() ? new EnrolmentGroupPolicyType(1) : new EnrolmentGroupPolicyType(
                        2);
        Grouping grouping;
        ShiftType shiftType =
                bean.getShiftType() == null || bean.getShiftType().isEmpty() ? null : ShiftType.valueOf(bean.getShiftType());
        if (executionCourse.getGroupingByName(bean.getName()) == null) {
            grouping =
                    Grouping.create(bean.getName(), bean.getEnrolmentBeginDay().toDate(), bean.getEnrolmentEndDay().toDate(),
                            enrolmentPolicyType, bean.getMaxGroupNumber(), bean.getIdealGroupCapacity(),
View Full Code Here


        if (projectGroup.getName().isEmpty()) {
            errors.add("error.groupProperties.missingName");
        }

        ShiftType shiftType =
                projectGroup.getShiftType() == null || projectGroup.getShiftType().isEmpty() ? null : ShiftType
                        .valueOf(projectGroup.getShiftType());

        if (projectGroup.getDifferentiatedCapacity()
                && projectGroup.getMaximumGroupCapacity() != null
View Full Code Here

                    row.setCell(executionSemester.getSemester());
                    row.setCell(executionCourse.getExternalId());
                    row.setCell(executionCourse.getName());
                    final LessonInstance lessonInstance = summary.getLessonInstance();
                    final CourseLoad courseLoad = lessonInstance == null ? null : lessonInstance.getCourseLoad();
                    final ShiftType shiftType = courseLoad == null ? null : courseLoad.getType();
                    row.setCell(shiftType == null ? "" : shiftType.getName());
                    final Shift shift = summary.getShift();
                    row.setCell(shift == null ? "" : shift.getNome());
                    row.setCell(getTeacherId(summary));
                    row.setCell(getTeacherName(summary));
                    row.setCell(getSchedule(summary));
View Full Code Here

    private double getCompetenceCourseLoad(final CourseLoad courseLoad) {
        return getCurricularCourseLoad(courseLoad);
    }

    private String getCurricularCourseLoadString(final CourseLoad courseLoad) {
        final ShiftType shiftType = courseLoad.getType();
        final Set<Double> ds = new HashSet<Double>();
        for (final CurricularCourse curricularCourse : courseLoad.getExecutionCourse().getAssociatedCurricularCoursesSet()) {
            final double curricularCourseLoad = getCurricularCourseLoad(curricularCourse, shiftType);
            ds.add(new Double(curricularCourseLoad * 14));
        }
View Full Code Here

        }
        return builder.toString();
    }

    private double getCurricularCourseLoad(final CourseLoad courseLoad) {
        final ShiftType shiftType = courseLoad.getType();
        double result = -1d;
        for (final CurricularCourse curricularCourse : courseLoad.getExecutionCourse().getAssociatedCurricularCoursesSet()) {
            final double curricularCourseLoad = getCurricularCourseLoad(curricularCourse, shiftType);
            if (result == -1d || result == curricularCourseLoad) {
                result = curricularCourseLoad;
View Full Code Here

    public ActionForward preparePostBack(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws Exception {

        CourseLoadBean bean = getRenderedObject("courseLoadBeanID");
        ShiftType type = bean.getType();
        if (type != null) {
            CourseLoad courseLoad = bean.getExecutionCourse().getCourseLoadByShiftType(type);
            if (courseLoad != null) {
                bean.setUnitQuantity(courseLoad.getUnitQuantity());
                bean.setTotalQuantity(courseLoad.getTotalQuantity());
View Full Code Here

    }

    public ActionForward deleteLessonPlannings(ActionMapping mapping, ActionForm form, HttpServletRequest request,
            HttpServletResponse response) throws FenixServiceException {

        ShiftType lessonType = ShiftType.valueOf(request.getParameter("shiftType"));
        final ExecutionCourse executionCourse = (ExecutionCourse) request.getAttribute("executionCourse");

        if (lessonType != null && executionCourse != null) {
            try {
                DeleteLessonPlanning.runDeleteLessonPlanning(executionCourse.getExternalId(), null, executionCourse, lessonType);
View Full Code Here

        final IViewState viewState = RenderUtils.getViewState();
        ShowSummariesBean bean = (ShowSummariesBean) viewState.getMetaObject().getObject();

        ExecutionCourse executionCourse = bean.getExecutionCourse();
        ShiftType shiftType = bean.getShiftType();
        Shift shift = bean.getShift();

        SummaryTeacherBean summaryTeacher = bean.getSummaryTeacher();
        Professorship teacher = (summaryTeacher != null) ? summaryTeacher.getProfessorship() : null;
        Boolean otherTeachers = (summaryTeacher != null) ? summaryTeacher.getOthers() : null;
View Full Code Here

        if (selectedLessons == null || selectedLessons.length == 0) {
            return goToInsertComplexSummaryAgain(request, mapping, response, form);
        } else if (selectedLessons != null && selectedLessons.length != 0) {

            boolean uniqueType = true;
            ShiftType shiftType = null;
            List<NextPossibleSummaryLessonsAndDatesBean> nextPossibleLessonsDates =
                    new ArrayList<NextPossibleSummaryLessonsAndDatesBean>();

            for (String lessonRepresentation : selectedLessons) {

                NextPossibleSummaryLessonsAndDatesBean nextLesson =
                        NextPossibleSummaryLessonsAndDatesBean.getNewInstance(lessonRepresentation);
                if (nextLesson.getLesson().getShift().getCourseLoadsSet().size() == 1) {
                    nextLesson.setLessonType(nextLesson.getLesson().getShift().getCourseLoadsSet().iterator().next().getType());
                }

                nextPossibleLessonsDates.add(nextLesson);

                ShiftType lessonType = null;
                if (nextLesson.getLesson().getShift().getCourseLoadsSet().size() == 1) {
                    lessonType = nextLesson.getLesson().getShift().getCourseLoadsSet().iterator().next().getType();
                    if (shiftType == null) {
                        shiftType = lessonType;
                    } else if (!shiftType.equals(lessonType)) {
View Full Code Here

        final IViewState viewState = RenderUtils.getViewState();
        SummariesCalendarBean bean = (SummariesCalendarBean) viewState.getMetaObject().getObject();

        ExecutionCourse executionCourse = bean.getExecutionCourse();
        Shift shift = bean.getShift();
        ShiftType shiftType = bean.getShiftType();
        LessonCalendarViewType calendarViewType = bean.getCalendarViewType();

        Set<NextPossibleSummaryLessonsAndDatesBean> summariesCalendar =
                new TreeSet<NextPossibleSummaryLessonsAndDatesBean>(
                        NextPossibleSummaryLessonsAndDatesBean.COMPARATOR_BY_DATE_AND_HOUR);
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.domain.ShiftType

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.