-
Notifications
You must be signed in to change notification settings - Fork 40
Understanding the Data Source
The data source is the center of the Ohana architecture.
To begin the loading process, call the data source's loadContacts
method. This triggers the data providers to begin loading contacts, and pass them into the data source. When all of the data providers have finished loading, the onContactsDataSourceLoadedProvidersSignal
is fired.
The data source aggregates the contacts and passes them through the post processors. When all of the post processors have completed processing, the onContactsDataSourcePostProcessorsFinishedSignal
is fired. The processed contacts are then stored in the data source's internal data model.
To access these processed contacts, read the data's sources contacts
property. Until the contacts have been loaded, this will return nil.
To select contacts, call the data source's selectContacts:
methods. This will mark the specified contacts for selection. If any selection filters have been attached to the data source, the selection nominees will be passed through each filter, and any remaining selection nominees will be marked as selected in the internal data model. After the selection has completed, the onContactsDataSourceSelectedContactsSignal
is fired. The same process occurs for deselecting contacts, with the deselectContacts:
method and onContactsDataSourceDeselectedContactsSignal
.