Packagecom.flexcalendar.components.calendar.core.dataModel
Classpublic class CalendarDataProvider
InheritanceCalendarDataProvider Inheritance flash.events.EventDispatcher
Implements ICalendarDataProvider

Class used as DataProvider by FlexCalendar. Contains single or multiple instances of CalendarItemSet objects.



Public Properties
 PropertyDefined By
  itemSets : ArrayCollection
Deprecated: Deprecated
[read-only]
CalendarDataProvider
  parentCalendarComponent : FlexCalendar
CalendarDataProvider
Protected Properties
 PropertyDefined By
  _itemSets : ArrayCollection
CalendarDataProvider
  _lastRequestRange : DateRange
CalendarDataProvider
  _lastRequestTimestamp : Date
CalendarDataProvider
  _lastRequestVisibleItemsDetails : Array = null
CalendarDataProvider
  _parentCalendarComponent : FlexCalendar
CalendarDataProvider
  _sentRequestsCount : int = 0
CalendarDataProvider
Public Methods
 MethodDefined By
  
Creates CalendarDataProvider instance
CalendarDataProvider
  
Adds item set to item sets collection
CalendarDataProvider
  
buildAlarmItemDetails(from:Date, to:Date):Array
Returns array of items, for which alarm should be fired between specified dates If CalendarItem is recurring, multiple instances of ItemDetails are created.
CalendarDataProvider
  
Builds array of ItemDetails objects in requested period.
CalendarDataProvider
  
CalendarDataProvider
  
CalendarDataProvider
  
Get number of item sets - collections containing items
CalendarDataProvider
  
Return item set at the specified index - taking into consideration only visible item sets.
CalendarDataProvider
  
Get number of currently visible item sets.
CalendarDataProvider
  
Invalidate cache in all Calendar Item sets.
CalendarDataProvider
  
Removes item set from item sets collection
CalendarDataProvider
Protected Methods
 MethodDefined By
  
CalendarDataProvider
  
convertCalendarItemsToVisibleItemDetailsForDateRange(calendarItems:Array, dateRange:DateRange, calendarItemSet:ICalendarItemSet):Array
Converts array of calendarItems to array of ItemDetails in requested period.
CalendarDataProvider
  
CalendarDataProvider
  
CalendarDataProvider
  
CalendarDataProvider
Events
 Event Summary Defined By
  Dispatched when any of calendar item set's metadata has changed.CalendarDataProvider
  Dispatched when refreshed data items is ready to be displayed.CalendarDataProvider
Property Detail
_itemSetsproperty
protected var _itemSets:ArrayCollection

_lastRequestRangeproperty 
protected var _lastRequestRange:DateRange

_lastRequestTimestampproperty 
protected var _lastRequestTimestamp:Date

_lastRequestVisibleItemsDetailsproperty 
protected var _lastRequestVisibleItemsDetails:Array = null

_parentCalendarComponentproperty 
protected var _parentCalendarComponent:FlexCalendar

_sentRequestsCountproperty 
protected var _sentRequestsCount:int = 0

itemSetsproperty 
itemSets:ArrayCollection  [read-only]
Deprecated: Deprecated


Implementation
    public function get itemSets():ArrayCollection
parentCalendarComponentproperty 
parentCalendarComponent:FlexCalendar

This property can be used as the source for data binding.


Implementation
    public function get parentCalendarComponent():FlexCalendar
    public function set parentCalendarComponent(value:FlexCalendar):void
Constructor Detail
CalendarDataProvider()Constructor
public function CalendarDataProvider()

Creates CalendarDataProvider instance

Method Detail
addHandlersToItemSet()method
protected function addHandlersToItemSet(itemSet:ICalendarItemSet):void

Parameters

itemSet:ICalendarItemSet

addItemSet()method 
public function addItemSet(itemSet:ICalendarItemSet):void

Adds item set to item sets collection

Parameters

itemSet:ICalendarItemSet — item set to add

buildAlarmItemDetails()method 
public function buildAlarmItemDetails(from:Date, to:Date):Array

Returns array of items, for which alarm should be fired between specified dates If CalendarItem is recurring, multiple instances of ItemDetails are created. If CalendarItem have multiple alarms, multiple instances of ItemDetails are created.

Parameters

from:Date — from date
 
to:Date — to date

Returns
Array — array of items in this period
buildItemDetailsForRequestedPeriodAsync()method 
public function buildItemDetailsForRequestedPeriodAsync(dateRange:DateRange):void

Builds array of ItemDetails objects in requested period. Should dispatch an event {

Parameters

dateRange:DateRange — - date range to build items for.

convertCalendarItemsToVisibleItemDetailsForDateRange()method 
protected function convertCalendarItemsToVisibleItemDetailsForDateRange(calendarItems:Array, dateRange:DateRange, calendarItemSet:ICalendarItemSet):Array

Converts array of calendarItems to array of ItemDetails in requested period. If CalendarItem is recurring, multiple instances of ItemDetails are created.

Parameters

calendarItems:Array
 
dateRange:DateRange
 
calendarItemSet:ICalendarItemSet

Returns
Array
getEventsForDateRangeFailureHandler()method 
protected function getEventsForDateRangeFailureHandler(event:GetEventsForDateRangeErrorEvent):void

Parameters

event:GetEventsForDateRangeErrorEvent

getEventsForDateRangeSuccessHandler()method 
protected function getEventsForDateRangeSuccessHandler(event:GetEventsForDateRangeSuccessEvent):void

Parameters

event:GetEventsForDateRangeSuccessEvent

getItemSetAt()method 
public function getItemSetAt(index:int):ICalendarItemSet

Parameters

index:int

Returns
ICalendarItemSet
getItemSetIndex()method 
public function getItemSetIndex(itemSet:ICalendarItemSet):int

Parameters

itemSet:ICalendarItemSet

Returns
int
getItemSetsCount()method 
public function getItemSetsCount():int

Get number of item sets - collections containing items

Returns
int — number of item sets.
getVisibleItemSetAt()method 
public function getVisibleItemSetAt(index:int):ICalendarItemSet

Return item set at the specified index - taking into consideration only visible item sets.

Parameters

index:int — index of the visible item set

Returns
ICalendarItemSet — CalendarItemSet if found, null otherwise
getVisibleItemSetsCount()method 
public function getVisibleItemSetsCount():int

Get number of currently visible item sets.

Returns
int
invalidateCache()method 
public function invalidateCache():void

Invalidate cache in all Calendar Item sets.

removeHandlersFromItemSet()method 
protected function removeHandlersFromItemSet(itemSet:ICalendarItemSet):void

Parameters

itemSet:ICalendarItemSet

removeItemSet()method 
public function removeItemSet(itemSet:ICalendarItemSet):ICalendarItemSet

Removes item set from item sets collection

Parameters

itemSet:ICalendarItemSet — item set to remove

Returns
ICalendarItemSet — removed item set, or null if not found
Event Detail
calendarItemSetMetadataUpdatedEvent Event
Event Object Type: com.flexcalendar.components.calendar.events.CalendarItemSetMetadataUpdatedEvent

Dispatched when any of calendar item set's metadata has changed.

itemDetailsBuildedEvent Event  
Event Object Type: com.flexcalendar.components.calendar.events.DataProviderItemDetailsBuildedEvent

Dispatched when refreshed data items is ready to be displayed.