Gaia/Contacts/Data Refactor/mozcontactsProposal: Difference between revisions

Jump to navigation Jump to search
Line 5: Line 5:
To support this apprach the mozContact object will be extended with a 'sources' attribute (vcard standard) that will allow us to store the datastore provider and the id of the "linked" contacts. There can be contacts in the system that only exist in the external service and in that case all the mozContact attributes will be empty apart from the referred 'sources' attribute.
To support this apprach the mozContact object will be extended with a 'sources' attribute (vcard standard) that will allow us to store the datastore provider and the id of the "linked" contacts. There can be contacts in the system that only exist in the external service and in that case all the mozContact attributes will be empty apart from the referred 'sources' attribute.


= How it works =
= Architecture =


[[File:MozContactsDatastore_Architecture.png]]
[[File:MozContactsDatastore_Architecture.png]]
Line 21: Line 21:
* '''Consumer App'''. Any certified app in the system that wants to get access to contacts (dialer, messaging, email, etc.)
* '''Consumer App'''. Any certified app in the system that wants to get access to contacts (dialer, messaging, email, etc.)


* '''Other apps'''. If granted, privileged apps may get access to the Global Contacts Datastore or any other provider datastore.
* '''Other apps'''. If granted, privileged apps may get access to the Global Contacts Datastore or any other external service datastore. The mozContacts find method could still be used but only to get access to local contacts and not to contacts which belong to external providers.
 
== Sequence Diagrams ==
 
The figure below illustrates three use cases of the referred architecture. Firstly the arrival of a new contact coming from an external provider. Secondly, the addition of a new contact from the contacts app, and finally how the contacts application can get access to contact data from the different sources.
 
[[File:MozContactsDatastore_flow.png]]


= Advantages =
= Advantages =
172

edits

Navigation menu