final ParameterList attendeeParams = new ParameterList();
if (attendee.getUser() != null) {
try {
attendeeParams.add(new Cn(attendee.getUser().getFullname()));
// attendeeParams.add(new SentBy(attendee.getUser().getEmail()));
attendeeParams.add(new PartStat(attendee.getStatus().name()));
if (attendee.getStatus().equals(TeamAttendeeStatus.NEEDS_ACTION) == true) {
attendeeParams.add(Role.REQ_PARTICIPANT);
attendeeParams.add(Rsvp.TRUE);
}
vEvent.getProperties().add(new Attendee(attendeeParams, "mailto:" + attendee.getUser().getEmail()));
} catch (final Exception e) {
log.error("Cant't build attendee " + e.getMessage());
}
} else {
try {
// attendeeParams.add(new SentBy(attendee.getUrl()));
attendeeParams.add(new PartStat(attendee.getStatus().name()));
if (attendee.getStatus().equals(TeamAttendeeStatus.NEEDS_ACTION) == true) {
attendeeParams.add(Role.REQ_PARTICIPANT);
attendeeParams.add(Rsvp.TRUE);
}
vEvent.getProperties().add(new Attendee(attendeeParams, "mailto:" + attendee.getUrl()));