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();
}
}
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);
}
}
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());
}
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();
}
}
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());
}
}
Aggregations