Search in sources :

Example 26 with OpenMeetingsRoom

use of org.olat.modules.openmeetings.model.OpenMeetingsRoom in project openolat by klemens.

the class OpenMeetingsRoomEditController method formOK.

@Override
protected void formOK(UserRequest ureq) {
    if (room == null) {
        room = new OpenMeetingsRoom();
    }
    room.setComment(commentEl.getValue());
    room.setModerated(moderationModeEl.isOneSelected() && moderationModeEl.isSelected(0));
    room.setName(roomNameEl.getValue());
    if (roomSizeEl.isOneSelected()) {
        String key = roomSizeEl.getSelectedKey();
        if (StringHelper.isLong(key)) {
            room.setSize(Long.parseLong(key));
        } else {
            room.setSize(16l);
        }
    }
    room.setAudioOnly(avModeEl.isOneSelected() && avModeEl.isSelected(0));
    if (roomTypeEl.isOneSelected()) {
        String type = roomTypeEl.getSelectedKey();
        long roomType = Long.parseLong(type);
        room.setType(roomType);
    }
    if (room.getRoomId() > 0) {
        room = openMeetingsManager.updateRoom(group, ores, subIdentifier, room);
        fireEvent(ureq, Event.CHANGED_EVENT);
    } else {
        room = openMeetingsManager.addRoom(group, ores, subIdentifier, room);
        fireEvent(ureq, Event.DONE_EVENT);
    }
}
Also used : OpenMeetingsRoom(org.olat.modules.openmeetings.model.OpenMeetingsRoom)

Example 27 with OpenMeetingsRoom

use of org.olat.modules.openmeetings.model.OpenMeetingsRoom in project openolat by klemens.

the class OpenMeetingsRunController method doOpenMembers.

private void doOpenMembers(UserRequest ureq) {
    cleanupPopups();
    try {
        OpenMeetingsRoom reloadedRoom = openMeetingsManager.getRoom(group, ores, subIdentifier);
        membersController = new OpenMeetingsAdminRoomMembersController(ureq, getWindowControl(), reloadedRoom, readOnly);
        listenTo(membersController);
        cmc = new CloseableModalController(getWindowControl(), translate("close"), membersController.getInitialComponent(), true, translate("room.members"));
        listenTo(cmc);
        cmc.activate();
    } catch (OpenMeetingsException e) {
        showError(e.i18nKey());
    }
}
Also used : OpenMeetingsRoom(org.olat.modules.openmeetings.model.OpenMeetingsRoom) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) OpenMeetingsException(org.olat.modules.openmeetings.manager.OpenMeetingsException)

Example 28 with OpenMeetingsRoom

use of org.olat.modules.openmeetings.model.OpenMeetingsRoom in project openolat by klemens.

the class OpenMeetingsManagerImpl method getRoomById.

private OpenMeetingsRoom getRoomById(String sid, OpenMeetingsRoom room, long roomId) throws OpenMeetingsException {
    try {
        RoomServicePortType roomWs = getRoomWebService();
        Room omRoom = roomWs.getRoomById(sid, roomId);
        if (omRoom != null) {
            room.setComment(omRoom.getComment());
            if (omRoom.isIsModeratedRoom() != null) {
                room.setModerated(omRoom.isIsModeratedRoom());
            }
            if (omRoom.isIsAudioOnly() != null) {
                room.setAudioOnly(omRoom.isIsAudioOnly());
            }
            room.setName(omRoom.getName());
            if (omRoom.getRoomsId() != null) {
                room.setRoomId(omRoom.getRoomsId());
            } else {
                room.setRoomId(roomId);
            }
            room.setSize(omRoom.getNumberOfPartizipants());
            room.setType(omRoom.getRoomtype().getRoomtypesId());
            room.setClosed(omRoom.isIsClosed());
            return room;
        } else {
            return null;
        }
    } catch (Exception e) {
        log.error("", e);
        throw translateException(e, 0);
    }
}
Also used : RoomServicePortType(org.apache.openmeetings.axis.services.RoomServicePortType) OpenMeetingsRoom(org.olat.modules.openmeetings.model.OpenMeetingsRoom) Room(org.apache.openmeetings.persistence.beans.room.xsd.Room) ConnectException(java.net.ConnectException)

Aggregations

OpenMeetingsRoom (org.olat.modules.openmeetings.model.OpenMeetingsRoom)28 OpenMeetingsRoomReference (org.olat.modules.openmeetings.model.OpenMeetingsRoomReference)12 ConnectException (java.net.ConnectException)6 Test (org.junit.Test)6 OLATResourceable (org.olat.core.id.OLATResourceable)6 RoomServicePortType (org.apache.openmeetings.axis.services.RoomServicePortType)4 ModuleConfiguration (org.olat.modules.ModuleConfiguration)4 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 GetRoomsWithCurrentUsersByListAndType (org.apache.openmeetings.axis.services.GetRoomsWithCurrentUsersByListAndType)2 RoomReturn (org.apache.openmeetings.axis.services.xsd.RoomReturn)2 RoomUser (org.apache.openmeetings.axis.services.xsd.RoomUser)2 Room (org.apache.openmeetings.persistence.beans.room.xsd.Room)2 TableEvent (org.olat.core.gui.components.table.TableEvent)2 CloseableModalController (org.olat.core.gui.control.generic.closablewrapper.CloseableModalController)2 Condition (org.olat.course.condition.Condition)2 OpenMeetingsModule (org.olat.modules.openmeetings.OpenMeetingsModule)2 OpenMeetingsException (org.olat.modules.openmeetings.manager.OpenMeetingsException)2 OpenMeetingsManager (org.olat.modules.openmeetings.manager.OpenMeetingsManager)2 RoomReturnInfo (org.olat.modules.openmeetings.model.RoomReturnInfo)2