Package org.fenixedu.academic.dto

Examples of org.fenixedu.academic.dto.InfoRoom


                // the user didn't speciefy a normal minimum capacity
            }
            if (normal != null || exam != null) {
                Iterator<InfoRoom> iter = availableInfoRoom.iterator();
                while (iter.hasNext()) {
                    InfoRoom elem = iter.next();
                    if (!((normal != null && elem.getCapacidadeNormal().intValue() < normal.intValue()) || (exam != null && elem
                            .getCapacidadeExame().intValue() < exam.intValue()))) {
                        newAvailableInfoRoom.add(elem);
                    }
                }
            } else {
                newAvailableInfoRoom = availableInfoRoom;
            }
        }
        if (newAvailableInfoRoom != null && !newAvailableInfoRoom.isEmpty()) {
            Collections.sort(newAvailableInfoRoom, new BeanComparator("nome"));
            String[] availableRoomId = new String[newAvailableInfoRoom.size()];
            Iterator<InfoRoom> iter = newAvailableInfoRoom.iterator();
            int i = 0;
            while (iter.hasNext()) {
                InfoRoom elem = iter.next();
                availableRoomId[i] = elem.getExternalId().toString();
            }
            request.setAttribute(PresentationConstants.AVAILABLE_ROOMS_ID, availableRoomId);

        }
View Full Code Here


            }

            Collections.sort(emptyRoomsList);
            List<LabelValueBean> listaSalas = new ArrayList<LabelValueBean>();
            for (int i = 0; i < emptyRoomsList.size(); i++) {
                InfoRoom elem = emptyRoomsList.get(i);
                String roomLabel = elem.getNome() + " - " + elem.getEdificio();
                listaSalas.add(new LabelValueBean(roomLabel, elem.getNome()));
            }
            listaSalas.add(0, new LabelValueBean("- Sem Sala -", ""));

            request.setAttribute("action", action);
            request.setAttribute("listaSalas", listaSalas);
View Full Code Here

        fim.set(Calendar.HOUR_OF_DAY, Integer.parseInt((String) manageLessonForm.get("horaFim")));
        fim.set(Calendar.MINUTE, Integer.parseInt((String) manageLessonForm.get("minutosFim")));
        fim.set(Calendar.SECOND, 0);
        fim.set(Calendar.MILLISECOND, 0);

        InfoRoom infoSala = null;
        if (!StringUtils.isEmpty((String) manageLessonForm.get("nomeSala"))) {
            infoSala = new InfoRoom(SpaceUtils.findAllocatableSpaceForEducationByName((String) manageLessonForm.get("nomeSala")));
        }

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

        if (actionErrors.isEmpty()) {
View Full Code Here

                        HourMinuteSecond.fromCalendarFields(examStartTime), HourMinuteSecond.fromCalendarFields(examEndTime),
                        dayOfWeek, null, null, false);

        if (this.getEvaluationID() != null) {
            for (Space room : ((WrittenEvaluation) this.getEvaluation()).getAssociatedRooms()) {
                InfoRoom associatedRoom = InfoRoom.newInfoFromDomain(room);
                if (!availableInfoRoom.contains(associatedRoom)) {
                    availableInfoRoom.add(associatedRoom);
                }
            }
        }
View Full Code Here

    private Collection<InfoRoom> allRooms = null;

    private Collection<InfoRoom> getAllRooms() throws FenixServiceException {

        if (allRooms == null) {
            allRooms = SpaceUtils.allocatableSpacesForEducation().map(s -> new InfoRoom(s)).collect(Collectors.toList());
        }
        return allRooms;
    }
View Full Code Here

            final Space room = getRoom(entry.getKey());
            result[entry.getValue() - 1] = room;
        }
//        return Arrays.asList(result);

        return Arrays.stream(result).map(s -> new InfoRoom(s)).collect(Collectors.toList());
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.dto.InfoRoom

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.