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