// getConfKey(3,"default_lang_id").getConf_value()).longValue();
String template = invitationTemplate.getRegisterInvitationTemplate(
fromUserField, message, invitation_link, language_id, starttime,
endtime);
IcalHandler handler = new IcalHandler(
IcalHandler.ICAL_METHOD_REQUEST);
Appointment point = appointmentLogic
.getAppointMentById(appointMentId);
// Transforming Meeting Members
HashMap<String, String> attendeeList = handler.getAttendeeData(
email, username, invitor);
Vector<HashMap<String, String>> atts = new Vector<HashMap<String, String>>();
atts.add(attendeeList);
// Defining Organizer
User user = userManager.getUserById(organizer_userId);
HashMap<String, String> organizerAttendee = handler
.getAttendeeData(email, username, invitor);
String replyToEmail = null;
if (user != null) {
replyToEmail = user.getAdresses().getEmail();
organizerAttendee = handler.getAttendeeData(replyToEmail, user.getLogin(), invitor);
}
// Create ICal Message
String meetingId = handler.addNewMeeting(starttime, endtime,
point.getAppointmentName(), atts, invitation_link,
organizerAttendee, point.getIcalId(), timezone);
// Writing back meetingUid
if (point.getIcalId() == null || point.getIcalId().length() < 1) {
point.setIcalId(meetingId);
appointmentDaoImpl.updateAppointment(point);
}
log.debug(handler.getICalDataAsString());
mailHandler.send(new MailMessage(email, replyToEmail, subject, template, handler.getIcalAsByteArray()));
return "success";
} catch (Exception err) {
log.error("sendInvitionIcalLink", err);
}