36
34
public void populateCache( ContactsCache cache );
37
* Delete a contact from the device.
40
38
* @param id of the contact to delete
42
40
public void deleteContact( Long id );
42
@SuppressWarnings("serial")
43
public class ContactCreationException extends Exception { };
46
* @param name name of the new contact
47
* @return the new contact's id, or 0 on failure
46
* Add a contact to the device.
47
* @param name name of the new contact, or null if there isn't one
48
* @return the new contact's id
49
* @throws ContactCreationException
49
public Long addContact( String name );
51
public Long addContact( String name ) throws ContactCreationException;
52
* Add a phone number to an existing contact
54
* Add a phone number to an existing contact on the device.
53
55
* @param id the existing contact's id
54
56
* @param number the phone number
55
57
* @param data data about the number
58
* @throws ContactCreationException
57
60
public void addContactPhone( Long id, String number,
58
ContactData.PreferredDetail data );
61
ContactData.PreferredDetail data ) throws ContactCreationException;
61
* Add an email address to an existing contact
64
* Add an email address to an existing contact on the device.
62
65
* @param id the existing contact's id
63
66
* @param email the email address
64
67
* @param data data about the email address
68
* @throws ContactCreationException
66
70
public void addContactEmail( Long id, String email,
67
ContactData.PreferredDetail data );
71
ContactData.PreferredDetail data ) throws ContactCreationException;
70
* Add an address to an existing contact
74
* Add an address to an existing contact on the device.
71
75
* @param id the existing contact's id
72
76
* @param address the address
73
77
* @param data data about the address
78
* @throws ContactCreationException
75
80
public void addContactAddresses( Long id, String address,
76
ContactData.TypeDetail data );
81
ContactData.TypeDetail data ) throws ContactCreationException;
79
* Add a title and organisation to an existing contact
84
* Add a title and organisation to an existing contact on the device.
80
85
* @param id the existing contact's id
81
86
* @param organisation the organisation
82
87
* @param data data about the organisation
88
* @throws ContactCreationException
84
90
public void addContactOrganisation( Long id, String organisation,
85
ContactData.ExtraDetail data );
91
ContactData.ExtraDetail data ) throws ContactCreationException;