/** * Returns the event visibility. */ public Visibility getVisibility() { return getExtension(Visibility.class); }
/** * Returns the list of recurrence exceptions. */ public List<RecurrenceException> getRecurrenceException() { return getRepeatingExtension(RecurrenceException.class); }
/** * Sets the event original start time. */ public void setOriginalEvent(OriginalEvent v) { setExtension(v); }
/** * Returns event reminders. */ public List<Reminder> getReminder() { if (getRecurrence() != null) { // recurrence event, g:reminder is in top level return getRepeatingExtension(Reminder.class); } else { // single event, g:reminder is inside g:when List<When> whenList = getTimes(); if (whenList.size() >= 1) { return whenList.get(0).getRepeatingExtension(Reminder.class); } return null; } } }
/** * Initializes an ExtensionProfile based upon the extensions expected * by an EventEntry. */ @Override public void declareExtensions(ExtensionProfile extProfile) { super.declareExtensions(extProfile); extProfile.declare(EventEntry.class, Who.getDefaultDescription()); }
/** * Constructs a new EventEntry instance by doing a shallow copy of data from * an existing BaseEntry instance. * * @param sourceEntry entry to copy */ public BaseEventEntry(BaseEntry<?> sourceEntry) { super(sourceEntry); getCategories().add(EventEntry.EVENT_CATEGORY); }
/** * Adds a new recurrence exception. */ public void addRecurrenceException(RecurrenceException exception) { getRecurrenceException().add(exception); }
/** * Adds a new event time. */ public void addTime(When time) { getTimes().add(time); }
/** * Adds a new event location. */ public void addLocation(Where location) { getLocations().add(location); }
/** * Returns event reminders. */ public List<Reminder> getReminder() { if (getRecurrence() != null) { // recurrence event, g:reminder is in top level return getRepeatingExtension(Reminder.class); } else { // single event, g:reminder is inside g:when List<When> whenList = getTimes(); if (whenList.size() >= 1) { return whenList.get(0).getRepeatingExtension(Reminder.class); } return null; } } }
/** * Initializes an ExtensionProfile based upon the extensions expected * by an EventEntry. */ @Override public void declareExtensions(ExtensionProfile extProfile) { super.declareExtensions(extProfile); extProfile.declare(EventEntry.class, Who.getDefaultDescription()); }
/** * Constructs a new EventEntry with the appropriate kind category * to indicate that it is an event. */ public BaseEventEntry() { super(); getCategories().add(EventEntry.EVENT_CATEGORY); }
/** * Adds a new recurrence exception. */ public void addRecurrenceException(RecurrenceException exception) { getRecurrenceException().add(exception); }
/** * Adds a new event time. */ public void addTime(When time) { getTimes().add(time); }
/** * Adds a new event location. */ public void addLocation(Where location) { getLocations().add(location); }
/** * Returns event reminders. */ public List<Reminder> getReminder() { if (getRecurrence() != null) { // recurrence event, g:reminder is in top level return getRepeatingExtension(Reminder.class); } else { // single event, g:reminder is inside g:when List<When> whenList = getTimes(); if (whenList.size() >= 1) { return whenList.get(0).getRepeatingExtension(Reminder.class); } return null; } } }
/** * Returns the event status. */ public EventStatus getStatus() { return getExtension(EventStatus.class); }
/** * Sets the event recurrence. */ public void setRecurrence(Recurrence v) { setExtension(v); }
/** * Initializes an ExtensionProfile based upon the extensions expected * by an EventEntry. */ @Override public void declareExtensions(ExtensionProfile extProfile) { super.declareExtensions(extProfile); extProfile.declare(EventEntry.class, Who.getDefaultDescription()); }
/** * Returns the list of event times. */ public List<When> getTimes() { return getRepeatingExtension(When.class); }