"calendar.conference.rooms.default.size", Long.class, "50");
try {
// Adding creator as MeetingMember
User user = userManager.getUserById(userId);
Long room_id = roomId > 0 ? roomId : roomManager.addRoom(3, // user level
appointmentName, // name
roomType, // RoomType
"", // Comment
numberOfParticipants, // Number of participants
true, // public
null, // organizations
true, // Appointment
false, // Demo Room => Meeting Timer
null, // Meeting Timer time in seconds
false, // Is Moderated Room
null, // Moderation List Room
true, // Allow User Questions
false, // isAudioOnly
true, // allowFontStyles
false, // isClosed
"", // redirectURL
"", // conferencePIN
null, // ownerID
null, null,
false, // hideTopBar
false, // hideChat
false, // hideActivitiesAndActions
false, // hideFilesExplorer
false, // hideActionsMenu
false, // hideScreenSharing
false, // hideWhiteboard
false, //showMicrophoneStatus
false, // chatModerated
false, // chatOpened
false, // filesOpened
false, // autoVideoSelect
false //sipEnabled
);
log.debug("Appointmentlogic.saveAppointment : Room - " + room_id);
log.debug("Appointmentlogic.saveAppointment : Reminder - " + remind);
Room room = roomDao.get(room_id);
// Re-factor the given time ignoring the Date is always UTC!
TimeZone timezone = timezoneUtil.getTimezoneByUser(user);
Long appointmentId = appointmentDao.addAppointment(appointmentName,
userId, appointmentLocation, appointmentDescription,
appointmentstart, appointmentend, isDaily, isWeekly,
isMonthly, isYearly, categoryId, remind, room, language_id,
isPasswordProtected, password, false, user.getOmTimeZone().getJname());
String invitorName = user.getFirstname() + " " + user.getLastname()
+ " [" + user.getAdresses().getEmail() + "]";
// Add the creator of the meeting calendar event
meetingMemberLogic.addMeetingMember(user.getFirstname(), user
.getLastname(), "", "", appointmentId, userId, user
.getAdresses().getEmail(), user.getPhoneForSMS(), baseUrl, userId, true,
language_id, isPasswordProtected, password, timezone, user.getOmTimeZone(),
invitorName);
// iterate through all members of this meeting and add them to the
// event and send invitation
if (mmClient != null) {
for (int i = 0; i < mmClient.size(); i++) {
@SuppressWarnings("rawtypes")
Map clientMember = (Map) mmClient.get(i);
log.debug("clientMember.get('userId') "
+ clientMember.get("userId"));
for (Object tString : clientMember.entrySet()) {
log.debug("tString " + tString);
}
log.debug("clientMember.get('meetingMemberId') "
+ clientMember.get("meetingMemberId"));
// We need two different timeZones, the internal Java Object
// TimeZone, and
// the one for the UI display object to map to, cause the UI
// only has around 24 timezones
// and Java around 600++
Long sendToUserId = 0L;
TimeZone timezoneMember = null;
OmTimeZone omTimeZone = null;
if (clientMember.get("userId") != null) {
sendToUserId = Long.valueOf(
clientMember.get("userId").toString())
.longValue();
}
String phone = "";
// Check if this is an internal user, if yes use the
// timezone from his profile otherwise get the timezones
// from the variable jNameTimeZone
if (sendToUserId > 0) {
User interalUser = userManager
.getUserById(sendToUserId);
phone = interalUser.getPhoneForSMS();
timezoneMember = timezoneUtil
.getTimezoneByUser(interalUser);
omTimeZone = interalUser.getOmTimeZone();
} else {
// Get the internal-name of the timezone set in the
// client object and convert it to a real one
Object jName = clientMember.get("jNameTimeZone");
if (jName == null) {