List<Map<String, Object>> roomModerators, Boolean allowUserQuestions) {
try {
log.debug("*** updateRoom numberOfPartizipants: "
+ numberOfPartizipants);
if (authLevelUtil.checkModLevel(user_level)) {
Room r = roomDao.get(rooms_id);
r.setComment(comment);
r.setIspublic(ispublic);
r.setNumberOfPartizipants(numberOfPartizipants);
r.setName(name);
r.setRoomtype(this.getRoomTypesById(roomtypes_id));
r.setUpdatetime(new Date());
r.setAllowUserQuestions(allowUserQuestions);
r.setIsDemoRoom(isDemoRoom);
r.setDemoTime(demoTime);
r.setAppointment(appointment);
r.setIsModeratedRoom(isModeratedRoom);
if (r.getRooms_id() == null) {
em.persist(r);
} else {
if (!em.contains(r)) {
em.merge(r);
}
}
// FIXME: Organizations will not be changed when you do an
// update as Moderator
if (roomModerators != null) {
roomModeratorsDao.updateRoomModeratorByUserList(
roomModerators, r.getRooms_id());
}
return r.getRooms_id();
}
} catch (Exception ex2) {
log.error("[updateRoom] ", ex2);
}
return null;