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