teamEvent.setOrganizer(event.getOrganizer().getValue());
}
@SuppressWarnings("unchecked")
final List<VAlarm> alarms = event.getAlarms();
if (alarms != null && alarms.size() >= 1) {
final Dur dur = alarms.get(0).getTrigger().getDuration();
if (dur != null) { // Might be null.
// consider weeks
int weeksToDays = 0;
if (dur.getWeeks() != 0) {
weeksToDays = dur.getWeeks() * DURATION_OF_WEEK;
}
if (dur.getDays() != 0) {
teamEvent.setReminderDuration(dur.getDays() + weeksToDays);
teamEvent.setReminderDurationUnit(ReminderDurationUnit.DAYS);
} else if (dur.getHours() != 0) {
teamEvent.setReminderDuration(dur.getHours());
teamEvent.setReminderDurationUnit(ReminderDurationUnit.HOURS);
} else if (dur.getMinutes() != 0) {
teamEvent.setReminderDuration(dur.getMinutes());
teamEvent.setReminderDurationUnit(ReminderDurationUnit.MINUTES);
}
}
}
final RRule rule = (RRule) event.getProperty(Property.RRULE);