Organizer organizer = new Organizer(URI.create("mailto:"
+ from.getEmail()));
meeting.getProperties().add(organizer);
// add attendees..
Attendee attn = new Attendee(URI.create("mailto:" + from.getEmail()));
if (ParticipantType.REQUIRED.equals(from.getType())) {
attn.getParameters().add(Role.REQ_PARTICIPANT);
} else if (ParticipantType.REQUIRED.equals(from.getType())) {
attn.getParameters().add(Role.OPT_PARTICIPANT);
} else {
attn.getParameters().add(Role.NON_PARTICIPANT);
}
attn.getParameters().add(new Cn("3Pillar Labs"));
meeting.getProperties().add(attn);
for (Participant attendee : attendees) {
Attendee dev2 = new Attendee(URI.create("mailto:"
+ attendee.getEmail()));
if (ParticipantType.REQUIRED.equals(attendee.getType())) {
dev2.getParameters().add(Role.REQ_PARTICIPANT);
} else if (ParticipantType.REQUIRED.equals(attendee.getType())) {
dev2.getParameters().add(Role.OPT_PARTICIPANT);
} else {
dev2.getParameters().add(Role.NON_PARTICIPANT);
}
dev2.getParameters().add(new Cn("3Pillar Labs"));
meeting.getProperties().add(dev2);
}
cal.getComponents().add(meeting);
}