Search in sources :

Example 16 with OpenMeetingsRoom

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

the class OpenMeetingsAdminRoomsController method event.

@Override
protected void event(UserRequest ureq, Controller source, Event event) {
    if (source == tableCtr) {
        if (event instanceof TableEvent) {
            TableEvent e = (TableEvent) event;
            int row = e.getRowId();
            OpenMeetingsRoom room = (OpenMeetingsRoom) tableCtr.getTableDataModel().getObject(row);
            if ("delete".equals(e.getActionId())) {
                confirmDelete(ureq, room);
            } else if ("infos".equals(e.getActionId())) {
                openInfoBox(ureq, room);
            } else if ("resource".equals(e.getActionId())) {
                openResource(ureq, room);
            }
        }
    } else if (source == dialogCtr) {
        if (DialogBoxUIFactory.isOkEvent(event)) {
            OpenMeetingsRoom room = (OpenMeetingsRoom) dialogCtr.getUserObject();
            doDelete(room);
        }
    } else if (source == cmc) {
        removeAsListenerAndDispose(infoController);
        removeAsListenerAndDispose(cmc);
    } else if (source == infoController) {
        cmc.deactivate();
        removeAsListenerAndDispose(infoController);
        removeAsListenerAndDispose(cmc);
        reloadModel();
    }
}
Also used : OpenMeetingsRoom(org.olat.modules.openmeetings.model.OpenMeetingsRoom) TableEvent(org.olat.core.gui.components.table.TableEvent)

Example 17 with OpenMeetingsRoom

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

the class CollaborationTools method openOpenMeetingsRoom.

private void openOpenMeetingsRoom() {
    OpenMeetingsModule omModule = CoreSpringFactory.getImpl(OpenMeetingsModule.class);
    if (!omModule.isEnabled())
        return;
    OpenMeetingsManager omm = CoreSpringFactory.getImpl(OpenMeetingsManager.class);
    Long roomId = omm.getRoomId(ores, null, null);
    if (roomId == null) {
        // create the room
        OpenMeetingsRoom room = new OpenMeetingsRoom();
        room.setComment(ores.getDescription());
        room.setModerated(true);
        room.setName(ores.getName());
        room.setAudioOnly(true);
        room.setResourceName(ores.getName());
        room.setSize(25);
        room.setType(RoomType.conference.type());
        omm.addRoom(ores, null, null, room);
    }
}
Also used : OpenMeetingsRoom(org.olat.modules.openmeetings.model.OpenMeetingsRoom) OpenMeetingsModule(org.olat.modules.openmeetings.OpenMeetingsModule) OpenMeetingsManager(org.olat.modules.openmeetings.manager.OpenMeetingsManager)

Example 18 with OpenMeetingsRoom

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

the class OpenMeetingsDAOTest method createReference.

@Test
public void createReference() {
    OLATResourceable ores = OresHelper.createOLATResourceableInstance(UUID.randomUUID().toString(), 1l);
    OpenMeetingsRoom room = new OpenMeetingsRoom();
    room.setRoomId(123l);
    OpenMeetingsRoomReference ref = openMeetingsDAO.createReference(null, ores, "hello", room);
    Assert.assertNotNull(ref);
    Assert.assertNotNull(ref.getKey());
    Assert.assertNotNull(ref.getCreationDate());
    Assert.assertNotNull(ref.getLastModified());
    Assert.assertEquals(ores.getResourceableTypeName(), ref.getResourceTypeName());
    Assert.assertEquals(ores.getResourceableId(), ref.getResourceTypeId());
    Assert.assertEquals(123l, ref.getRoomId());
}
Also used : OpenMeetingsRoom(org.olat.modules.openmeetings.model.OpenMeetingsRoom) OLATResourceable(org.olat.core.id.OLATResourceable) OpenMeetingsRoomReference(org.olat.modules.openmeetings.model.OpenMeetingsRoomReference) Test(org.junit.Test)

Example 19 with OpenMeetingsRoom

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

the class OpenMeetingsAdminRoomsController method event.

@Override
protected void event(UserRequest ureq, Controller source, Event event) {
    if (source == tableCtr) {
        if (event instanceof TableEvent) {
            TableEvent e = (TableEvent) event;
            int row = e.getRowId();
            OpenMeetingsRoom room = (OpenMeetingsRoom) tableCtr.getTableDataModel().getObject(row);
            if ("delete".equals(e.getActionId())) {
                confirmDelete(ureq, room);
            } else if ("infos".equals(e.getActionId())) {
                openInfoBox(ureq, room);
            } else if ("resource".equals(e.getActionId())) {
                openResource(ureq, room);
            }
        }
    } else if (source == dialogCtr) {
        if (DialogBoxUIFactory.isOkEvent(event)) {
            OpenMeetingsRoom room = (OpenMeetingsRoom) dialogCtr.getUserObject();
            doDelete(room);
        }
    } else if (source == cmc) {
        removeAsListenerAndDispose(infoController);
        removeAsListenerAndDispose(cmc);
    } else if (source == infoController) {
        cmc.deactivate();
        removeAsListenerAndDispose(infoController);
        removeAsListenerAndDispose(cmc);
        reloadModel();
    }
}
Also used : OpenMeetingsRoom(org.olat.modules.openmeetings.model.OpenMeetingsRoom) TableEvent(org.olat.core.gui.components.table.TableEvent)

Example 20 with OpenMeetingsRoom

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

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)

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