Examples of InfoShift


Examples of org.fenixedu.academic.dto.InfoShift

        if (showOccupation instanceof InfoLesson) {
            InfoLesson lesson = (InfoLesson) showOccupation;

            strBuffer.append(lesson.getInfoShift().getInfoDisciplinaExecucao().getSigla());

            final InfoShift infoShift = lesson.getInfoShift();
            InfoExecutionCourse infoExecutionCourse = infoShift.getInfoDisciplinaExecucao();

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

            final Space allocatableSpace = lesson.getAllocatableSpace();
            if (allocatableSpace != null) {
                /*strBuffer.append(" <a href='");
                strBuffer.append(context).append("/resourceAllocationManager/");
                strBuffer.append("pesquisarSala.do?name=").append(allocatableSpace.getName()).append("'>")
                        .append(allocatableSpace.getName()).append("</a>");*/
                strBuffer.append(allocatableSpace.getName());
            }

            if (lesson.getFrequency().equals(FrequencyType.BIWEEKLY)) {
                strBuffer.append("&nbsp;&nbsp;[Q]");
            }

        } else if (showOccupation instanceof InfoLessonInstance) {

            InfoLessonInstance lesson = (InfoLessonInstance) showOccupation;

            strBuffer.append(lesson.getInfoShift().getInfoDisciplinaExecucao().getSigla());

            final InfoShift infoShift = lesson.getInfoShift();
            InfoExecutionCourse infoExecutionCourse = infoShift.getInfoDisciplinaExecucao();

            strBuffer.append("&nbsp;(");
            strBuffer.append("<a href='");
            strBuffer.append(context).append("/resourceAllocationManager/")
                    .append("manageShift.do?method=prepareEditShift&amp;page=0").append("&amp;shift_oid=")
                    .append(infoShift.getExternalId()).append("&amp;execution_course_oid=")
                    .append(infoExecutionCourse.getExternalId()).append("&amp;" + PresentationConstants.ACADEMIC_INTERVAL + "=")
                    .append(infoExecutionCourse.getAcademicInterval().getResumedRepresentationInStringFormat())
                    .append("&amp;curricular_year_oid=").append(infoCurricularYear.getExternalId())
                    .append("&amp;execution_degree_oid=").append(infoExecutionDegree.getExternalId()).append("'>")
                    .append(lesson.getShiftTypeCodesPrettyPrint()).append("</a>").append(")&nbsp;");
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoShift

        InfoClass infoClass = (InfoClass) request.getAttribute(PresentationConstants.CLASS_VIEW);

        String shiftOID = request.getParameter(PresentationConstants.SHIFT_OID);

        InfoShift infoShift = ReadShiftByOID.run(shiftOID);

        RemoverTurno.run(infoShift, infoClass);

        return prepare(mapping, form, request, response);
    }
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoShift

public class AddClassesDA extends FenixShiftAndExecutionCourseAndExecutionDegreeAndCurricularYearContextDispatchAction {

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

        InfoShift infoShift = (InfoShift) request.getAttribute(PresentationConstants.SHIFT);

        List classes = ReadAvailableClassesForShift.run(infoShift.getExternalId());

        if (classes != null && !classes.isEmpty()) {
            Collections.sort(classes, new BeanComparator("nome"));
            request.setAttribute(PresentationConstants.CLASSES, classes);
        }
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoShift

    }

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

        InfoShift infoShift = (InfoShift) request.getAttribute(PresentationConstants.SHIFT);

        DynaActionForm addClassesForm = (DynaActionForm) form;
        String[] selectedClasses = (String[]) addClassesForm.get("selectedItems");

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

Examples of org.fenixedu.academic.dto.InfoShift

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

        DynaActionForm manageLessonForm = (DynaActionForm) form;

        InfoShift infoShift = (InfoShift) request.getAttribute(PresentationConstants.SHIFT);
        Shift shift = FenixFramework.getDomainObject(infoShift.getExternalId());
        GenericPair<YearMonthDay, YearMonthDay> maxLessonsPeriod = shift.getExecutionCourse().getMaxLessonsPeriod();

        if (maxLessonsPeriod != null) {
            request.setAttribute("executionDegreeLessonsStartDate", maxLessonsPeriod.getLeft().toString("dd/MM/yyyy"));
            request.setAttribute("executionDegreeLessonsEndDate", maxLessonsPeriod.getRight().toString("dd/MM/yyyy"));
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoShift

            } else {
                frequency = FrequencyType.WEEKLY;
            }

            InfoLesson infoLesson = (InfoLesson) request.getAttribute(PresentationConstants.LESSON);
            InfoShift infoShift = (InfoShift) request.getAttribute(PresentationConstants.SHIFT);

            String action = request.getParameter("action");

            final Shift shift;
            if (action != null && action.equals("edit")) {
                final Lesson lesson = FenixFramework.getDomainObject(infoLesson.getExternalId());
                shift = lesson.getShift();
            } else {
                shift = FenixFramework.getDomainObject(infoShift.getExternalId());
            }
            final GenericPair<YearMonthDay, YearMonthDay> maxLessonsPeriod = shift.getExecutionCourse().getMaxLessonsPeriod();

            YearMonthDay lessonNewBeginDate = getDateFromForm(manageLessonForm, "newBeginDate");
            YearMonthDay lessonEndDate = getDateFromForm(manageLessonForm, "newEndDate");
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoShift

        ActionErrors actionErrors = checkTimeIntervalAndWeekDay(inicio, fim, weekDay);

        if (actionErrors.isEmpty()) {

            InfoShift infoShift = (InfoShift) (request.getAttribute(PresentationConstants.SHIFT));

            InfoRoomOccupationEditor infoRoomOccupation = null;
            if (infoSala != null) {
                infoRoomOccupation = new InfoRoomOccupationEditor();
                infoRoomOccupation.setDayOfWeek(weekDay);
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoShift

            request.setAttribute("groupPropertiesCode", groupPropertiesCode);
            return mapping.findForward("viewStudentGroupInformation");
        }

        ArrayList shiftsList = new ArrayList();
        InfoShift oldInfoShift = infoSiteShifts.getOldShift();
        if (shifts.size() != 0) {
            shiftsList.add(new LabelValueBean("(escolher)", ""));
            InfoShift infoShift;
            Iterator iter = shifts.iterator();
            String label, value;
            List shiftValues = new ArrayList();
            while (iter.hasNext()) {
                infoShift = (InfoShift) iter.next();
                value = infoShift.getExternalId().toString();
                shiftValues.add(value);
                label = infoShift.getNome();
                shiftsList.add(new LabelValueBean(label, value));
            }
            if (shiftsList.size() == 1 && shiftValues.contains(oldInfoShift.getExternalId().toString())) {
                ActionErrors actionErrors4 = new ActionErrors();
                ActionError error4 = null;
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoShift

        infoExecutionCourseOccupancy.setShiftsInGroups(new ArrayList());

        Iterator iterator = infoExecutionCourseOccupancy.getInfoShifts().iterator();

        while (iterator.hasNext()) {
            InfoShift infoShift = (InfoShift) iterator.next();
            if (infoShift.containsType(ShiftType.TEORICA)) {
                theoreticalShifts.add(infoShift);
            } else if (infoShift.containsType(ShiftType.PRATICA)) {
                praticalShifts.add(infoShift);
            } else if (infoShift.containsType(ShiftType.DUVIDAS)) {
                doubtsShifts.add(infoShift);
            } else if (infoShift.containsType(ShiftType.LABORATORIAL)) {
                labShifts.add(infoShift);
            } else if (infoShift.containsType(ShiftType.RESERVA)) {
                reserveShifts.add(infoShift);
            } else if (infoShift.containsType(ShiftType.TEORICO_PRATICA)) {
                theoPraticalShifts.add(infoShift);
            } else if (infoShift.containsType(ShiftType.FIELD_WORK)) {
                fieldWork.add(infoShift);
            } else if (infoShift.containsType(ShiftType.PROBLEMS)) {
                problems.add(infoShift);
            } else if (infoShift.containsType(ShiftType.SEMINARY)) {
                seminary.add(infoShift);
            } else if (infoShift.containsType(ShiftType.TRAINING_PERIOD)) {
                trainingPeriod.add(infoShift);
            } else if (infoShift.containsType(ShiftType.TUTORIAL_ORIENTATION)) {
                tutorialOrientation.add(infoShift);
            }
        }

        infoExecutionCourseOccupancy.setInfoShifts(null);
View Full Code Here

Examples of org.fenixedu.academic.dto.InfoShift

        }

        infoShift.setTipos(shiftTypes);

        // try {
        final InfoShift newInfoShift = CriarTurno.run(infoShift);
        request.setAttribute(PresentationConstants.SHIFT, newInfoShift);

        // } catch (ExistingServiceException ex) {
        // throw new ExistingActionException("O Shift", ex);
        // }
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.