public class EntityCalendarEventProvider extends java.lang.Object implements CalendarEventProvider, EntityCalendarEventProvider
CalendarEventProvider.EventSetChangeEvent, CalendarEventProvider.EventSetChangeListener
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
allDayProperty |
protected java.lang.String |
captionProperty |
protected CollectionDatasource.CollectionChangeListener |
collectionChangeListener |
protected CollectionDatasource |
datasource |
protected java.lang.String |
descriptionProperty |
protected java.lang.String |
endDateProperty |
protected EventHub |
events |
protected Datasource.ItemPropertyChangeListener |
itemPropertyChangeListener |
protected java.util.List<CalendarEvent> |
itemsCache |
protected java.lang.String |
startDateProperty |
protected java.lang.String |
styleNameProperty |
Constructor and Description |
---|
EntityCalendarEventProvider(CollectionDatasource datasource) |
Modifier and Type | Method and Description |
---|---|
void |
addEvent(CalendarEvent event)
Adds
CalendarEvent to the event provider list. |
Subscription |
addEventSetChangeListener(java.util.function.Consumer<CalendarEventProvider.EventSetChangeEvent> listener) |
protected CollectionDatasource.CollectionChangeListener |
createCollectionChangeListener() |
protected Datasource.ItemPropertyChangeListener |
createItemPropertyChangeListener() |
java.lang.String |
getCaptionProperty() |
CollectionDatasource |
getDatasource() |
java.lang.String |
getDescriptionProperty() |
java.lang.String |
getEndDateProperty() |
java.util.List<CalendarEvent> |
getEvents() |
java.lang.String |
getIsAllDayProperty() |
java.lang.String |
getStartDateProperty() |
java.lang.String |
getStyleNameProperty() |
void |
removeAllEvents()
Removes all
CalendarEvent in the event provider list. |
void |
removeEvent(CalendarEvent event)
Removes
CalendarEvent from the event provider list. |
void |
removeEventSetChangeListener(java.util.function.Consumer<CalendarEventProvider.EventSetChangeEvent> listener) |
void |
setAllDayProperty(java.lang.String allDayProperty)
Sets the name of the property that represents whether event is an all-day event.
|
void |
setCaptionProperty(java.lang.String captionProperty)
Sets the name of the property that represents caption of event.
|
void |
setDescriptionProperty(java.lang.String descriptionProperty)
Sets the name of the property that represents description of event.
|
void |
setEndDateProperty(java.lang.String endDateProperty)
Sets the name of the property that represents end date of event.
|
void |
setStartDateProperty(java.lang.String startDateProperty)
Sets the name of the property that represents start date of event.
|
void |
setStyleNameProperty(java.lang.String styleNameProperty)
Sets the name of the property that represents style name of event.
|
void |
unbind() |
protected java.util.List<CalendarEvent> itemsCache
protected CollectionDatasource datasource
protected java.lang.String startDateProperty
protected java.lang.String endDateProperty
protected java.lang.String captionProperty
protected java.lang.String descriptionProperty
protected java.lang.String styleNameProperty
protected java.lang.String allDayProperty
protected EventHub events
protected CollectionDatasource.CollectionChangeListener collectionChangeListener
protected Datasource.ItemPropertyChangeListener itemPropertyChangeListener
public EntityCalendarEventProvider(CollectionDatasource datasource)
protected CollectionDatasource.CollectionChangeListener createCollectionChangeListener()
protected Datasource.ItemPropertyChangeListener createItemPropertyChangeListener()
public CollectionDatasource getDatasource()
public void addEvent(CalendarEvent event)
CalendarEventProvider
CalendarEvent
to the event provider list.
Not supported by EntityCalendarEventProvider
, use datasource for changing data items.
addEvent
in interface CalendarEventProvider
event
- calendar eventpublic void removeEvent(CalendarEvent event)
CalendarEventProvider
CalendarEvent
from the event provider list.
Not supported by EntityCalendarEventProvider
, use datasource for changing data items.
removeEvent
in interface CalendarEventProvider
event
- calendar eventpublic void removeAllEvents()
CalendarEventProvider
CalendarEvent
in the event provider list.
Not supported by EntityCalendarEventProvider
, use datasource for changing data items.
removeAllEvents
in interface CalendarEventProvider
public Subscription addEventSetChangeListener(java.util.function.Consumer<CalendarEventProvider.EventSetChangeEvent> listener)
addEventSetChangeListener
in interface CalendarEventProvider
public void removeEventSetChangeListener(java.util.function.Consumer<CalendarEventProvider.EventSetChangeEvent> listener)
removeEventSetChangeListener
in interface CalendarEventProvider
listener
- a listener to removepublic java.util.List<CalendarEvent> getEvents()
getEvents
in interface CalendarEventProvider
public void setStartDateProperty(java.lang.String startDateProperty)
EntityCalendarEventProvider
setStartDateProperty
in interface EntityCalendarEventProvider
startDateProperty
- the name of the property that represents start date of eventpublic java.lang.String getStartDateProperty()
getStartDateProperty
in interface EntityCalendarEventProvider
public void setEndDateProperty(java.lang.String endDateProperty)
EntityCalendarEventProvider
setEndDateProperty
in interface EntityCalendarEventProvider
endDateProperty
- the name of the property that represents end date of eventpublic java.lang.String getEndDateProperty()
getEndDateProperty
in interface EntityCalendarEventProvider
public void setCaptionProperty(java.lang.String captionProperty)
EntityCalendarEventProvider
setCaptionProperty
in interface EntityCalendarEventProvider
captionProperty
- the name of the property that represents caption of eventpublic java.lang.String getCaptionProperty()
getCaptionProperty
in interface EntityCalendarEventProvider
public void setDescriptionProperty(java.lang.String descriptionProperty)
EntityCalendarEventProvider
setDescriptionProperty
in interface EntityCalendarEventProvider
descriptionProperty
- the name of the property that represents description of eventpublic java.lang.String getDescriptionProperty()
getDescriptionProperty
in interface EntityCalendarEventProvider
public void setStyleNameProperty(java.lang.String styleNameProperty)
EntityCalendarEventProvider
setStyleNameProperty
in interface EntityCalendarEventProvider
styleNameProperty
- the name of the property that represents style name of eventpublic java.lang.String getStyleNameProperty()
getStyleNameProperty
in interface EntityCalendarEventProvider
public void setAllDayProperty(java.lang.String allDayProperty)
EntityCalendarEventProvider
setAllDayProperty
in interface EntityCalendarEventProvider
allDayProperty
- true
if this event is an all-day event, false
otherwisepublic java.lang.String getIsAllDayProperty()
getIsAllDayProperty
in interface EntityCalendarEventProvider
true
if this event is an all-day event, false
otherwisepublic void unbind()
unbind
in interface EntityCalendarEventProvider