Package org.fenixedu.academic.domain

Examples of org.fenixedu.academic.domain.Shift


            }

        } else if (showOccupation instanceof InfoLessonInstanceAggregation) {
            final InfoLessonInstanceAggregation aggregation = (InfoLessonInstanceAggregation) showOccupation;

            final Shift shift = aggregation.getShift();
            final ExecutionCourse executionCourse = shift.getExecutionCourse();
            strBuffer.append(executionCourse.getSigla());

            strBuffer.append(" (");
            strBuffer.append("<a href='");
            strBuffer.append(context).append("/resourceAllocationManager/")
                    .append("manageShift.do?method=prepareEditShift&amp;page=0").append("&amp;shift_oid=")
                    .append(shift.getExternalId()).append("&amp;execution_course_oid=").append(executionCourse.getExternalId())
                    .append("&amp;" + PresentationConstants.ACADEMIC_INTERVAL + "=")
                    .append(executionCourse.getAcademicInterval().getResumedRepresentationInStringFormat())
                    .append("&amp;curricular_year_oid=").append(infoCurricularYear.getExternalId())
                    .append("&amp;execution_degree_oid=").append(infoExecutionDegree.getExternalId()).append("'>")
                    .append(shift.getShiftTypesCodePrettyPrint()).append("</a>").append(")&nbsp;");

            final Space allocatableSpace = aggregation.getAllocatableSpace();
            if (allocatableSpace != null) {
//                strBuffer.append(" <a href='");
//                strBuffer.append(context).append("/resourceAllocationManager/");
View Full Code Here


            }

        } else if (showOccupation instanceof InfoLessonInstanceAggregation) {

            final InfoLessonInstanceAggregation aggregation = (InfoLessonInstanceAggregation) showOccupation;
            final Shift shift = aggregation.getShift();
            final ExecutionCourse executionCourse = shift.getExecutionCourse();
            final ExecutionSemester executionSemester = executionCourse.getExecutionPeriod();

            strBuffer.append(shift.getShiftTypesCodePrettyPrint()).append("&nbsp;");
            final Space allocatableSpace = aggregation.getAllocatableSpace();
            if (allocatableSpace != null) {
                strBuffer.append("<a href='").append(context).append("/publico/");
                strBuffer.append("siteViewer.do?method=roomViewer&amp;roomName=");
                strBuffer.append(allocatableSpace.getName()).append("&amp;objectCode=");
View Full Code Here

        ExecutionSemester executionSemester = domainClass.getExecutionPeriod();
        InfoExecutionPeriod infoExecutionPeriod = InfoExecutionPeriod.newInfoFromDomain(executionSemester);

        for (Object element : shiftList) {
            Shift shift = (Shift) element;
            infoLessonList.addAll(InfoLessonInstanceAggregation.getAggregations(shift));
        }
        component.setInfoExecutionPeriod(infoExecutionPeriod);

        component.setLessons(infoLessonList);
View Full Code Here

            final String email = attends.getRegistration().getStudent().getPerson().getEmail();
            fileContents += (email != null ? email : "") + SEPARATOR;

            for (final ShiftType shiftType : shiftTypes) {
                final Shift shift =
                        attends.getRegistration().getShiftFor(executionCourseAttendsBean.getExecutionCourse(), shiftType);
                if (shift == null) {
                    fileContents += NOT_AVAILABLE + SEPARATOR;
                } else {
                    fileContents += shift.getNome() + SEPARATOR;
                }
            }
            fileContents += NEWLINE;
        }
View Full Code Here

                    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));
                    final Space room = summary.getRoom();
                    row.setCell(room == null ? "" : room.getName());
View Full Code Here

        }
        return name + " [" + curricularCourse.getDegree().getSigla() + "]";
    }

    private String shiftToString(String id) {
        Shift shift = FenixFramework.getDomainObject(id);
        return shift.getPresentationName();
    }
View Full Code Here

        } else {
            summaries = new TreeSet<Summary>(Summary.COMPARATOR_BY_DATE_AND_HOUR);
        }

        for (final Summary summary : getExecutionCourse().getAssociatedSummariesSet()) {
            final Shift shift = summary.getShift();
            if (getShift() == null || getShift() == shift) {
                if (getShiftType() == null || getShiftType() == summary.getSummaryType()) {
                    final Professorship professorship = summary.getProfessorship();
                    if (getProfessorship() == null && showOtherProfessors == null) {
                        summaries.add(summary);
View Full Code Here

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

        ExecutionCourse executionCourseTo = bean.getExecutionCourseTo();
        Shift shiftFrom = bean.getShift();

        try {
            ImportLessonPlannings.runImportLessonPlannings(executionCourseTo.getExternalId(), executionCourseTo,
                    shiftFrom.getExecutionCourse(), shiftFrom);
        } catch (DomainException e) {
            addActionMessage(request, e.getKey(), e.getArgs());
        }

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

        if (request.getParameter("showPhotos") == null) {
            request.setAttribute("showPhotos", "false");
        }

        Shift shift = FenixFramework.getDomainObject(shiftID);
        ExecutionCourse executionCourse = FenixFramework.getDomainObject(executionCourseID);

        if (registrationID != null) {
            Registration registration = FenixFramework.getDomainObject(registrationID);
            shift.removeAttendFromShift(registration, executionCourse);
            request.setAttribute("registration", registration);
        }

        List<Registration> registrations = new ArrayList<Registration>();
        registrations.addAll(shift.getStudentsSet());
        Collections.sort(registrations, Registration.NUMBER_COMPARATOR);

        request.setAttribute("registrations", registrations);
        request.setAttribute("shift", shift);
        request.setAttribute("executionCourseID", executionCourseID);
View Full Code Here

        String shiftID = request.getParameter("shiftID");
        String registrationID = request.getParameter("registrationID");
        String executionCourseID = request.getParameter("executionCourseID");
        String removeAll = request.getParameter("removeAll");

        Shift shift = FenixFramework.getDomainObject(shiftID);

        if (removeAll != null) {
            request.setAttribute("removeAll", removeAll);
        } else {
            Registration registration = FenixFramework.getDomainObject(registrationID);
View Full Code Here

TOP

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

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.