locked
SimpleProvider with different ChangeUnitVersionDefinitions - Converter? RRS feed

  • Question

  • Hi,
    I have 2 SimpleProviders with different data-formats.
    The SyncItem of the first SimpleProvider has the change unit "Contact.Lastname" and SyncItem of the second provider has "Person.Surname".
    How can I implement a converter to synchronize these change units?

    T_B__
    Thursday, October 29, 2009 7:07 PM

Answers

  • Hi,

    The idea of SimpleProvider is that the actual item that is being sync'd is abstracted away for the provider to define.

    Only thing that SimpleProvider uses to identify the item, or a change within that item is the metadata that the provider returns during the EnumerateItems call. (Note the difference

    between item and metadata)

    For example, let's say one provider is using a contact PIM item and the other provider is using file to store same information.

    The two providers must agree on a structure of the metadata. In this case, it might be (id, first name, last name, address, etc...)

    During enumeration, the source provider, using a PIM item, must extract the current metadata, and pass that metadata to SimpleProvider during EnuemrateItems call as

    ItemFieldDictionaries.

    Then, given this metadata / ItemFieldDictioanries, SimpleProvider determines that the item has changed.

    Within LoadChangeData call, you are supposed to return the PIM data that has changed (you have to return the right item which matches the ItemFieldDictionaries describes).

    Then, this item will be applied to destination provider.

    During this process, your provider is supposed to "convert" this PIM item into file item which can be stored on destination (this might be the process you are referring to).

    Note that the providers have to agree on the metadata schema.

    The item conversion is up to the provider which knows what data is compatible with.

    Thanks,

    Patrick

    • Proposed as answer by Patrick S. Lee Thursday, October 29, 2009 10:31 PM
    • Marked as answer by Nina HModerator Tuesday, November 24, 2009 1:20 AM
    Thursday, October 29, 2009 10:31 PM