// DefaultInvitation
Appointment point = appointmentLogic
.getAppointMentById(appointmentId);
MeetingMember member = getMemberById(memberId);
Boolean isInvitor = member.getInvitor();
Long invitationId = null;
if (point.getRemind() == null) {
log.error("Appointment has no assigned ReminderType!");
return null;
}
log.debug(":::: addMeetingMember ..... "
+ point.getRemind().getTypId());
String subject = formatSubject(language_id, point, timezone);
String message = formatMessage(language_id, point, timezone,
invitorName);
// point.getRemind().getTypId() == 1 will not receive emails
if (point.getRemind().getTypId() == 2) {
log.debug("Invitation for Appointment : simple email");
Invitations invitation = invitationManager
.addInvitationLink(
new Long(2), // userlevel
firstname + " " + lastname, // username
message,
baseUrl, // baseURl
email, // email
subject, // subject
point.getRoom().getRooms_id(), // room_id
"public",
isPasswordProtected, // passwordprotected
password, // invitationpass
2, // valid type
point.getAppointmentStarttime(), // valid from
point.getAppointmentEndtime(), // valid to
meeting_organizer, // created by
baseUrl,
language_id,
true, // really send mail sendMail
point.getAppointmentStarttime(),
point.getAppointmentEndtime(),
point.getAppointmentId(),
invitorName,
omTimeZone);
invitationId = invitation.getInvitations_id();
} else if (point.getRemind().getTypId() == 3) {
log.debug("Reminder for Appointment : iCal mail");
System.out.println("### SENDING iCAL EMAIL");
invitationId = invitationManager
.addInvitationIcalLink(
new Long(2), // userlevel
firstname + " " + lastname, // username
message,
baseUrl, // baseURl
email, // email
subject, // subject
point.getRoom().getRooms_id(), // room_id
"public",
isPasswordProtected, // passwordprotected
password, // invitationpass
2, // valid
point.getAppointmentStarttime(), // valid from
point.getAppointmentEndtime(), // valid to
meeting_organizer, // created by
point.getAppointmentId(), isInvitor,
language_id, timezone,
point.getAppointmentId(),
invitorName);
}
// Setting InvitationId within MeetingMember
if (invitationId != null) {
Invitations invi = invitationManager
.getInvitationbyId(invitationId);
member.setInvitation(invi);
updateMeetingMember(member);
}