40
40
public void deleteContact( Long id );
42
@SuppressWarnings("serial")
43
public class ContactCreationException extends Exception { };
46
43
* 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
44
* @param name name of the new contact
45
* @return the new contact's id, or null on failure
51
public Long addContact( String name ) throws ContactCreationException;
47
public Long addContact( String name );
54
50
* Add a phone number to an existing contact on the device.
55
51
* @param id the existing contact's id
56
52
* @param number the phone number
57
53
* @param data data about the number
58
* @throws ContactCreationException
60
55
public void addContactPhone( Long id, String number,
61
ContactData.PreferredDetail data ) throws ContactCreationException;
56
ContactData.PreferredDetail data );
64
59
* Add an email address to an existing contact on the device.
65
60
* @param id the existing contact's id
66
61
* @param email the email address
67
62
* @param data data about the email address
68
* @throws ContactCreationException
70
64
public void addContactEmail( Long id, String email,
71
ContactData.PreferredDetail data ) throws ContactCreationException;
65
ContactData.PreferredDetail data );
74
68
* Add an address to an existing contact on the device.
75
69
* @param id the existing contact's id
76
70
* @param address the address
77
71
* @param data data about the address
78
* @throws ContactCreationException
80
73
public void addContactAddresses( Long id, String address,
81
ContactData.TypeDetail data ) throws ContactCreationException;
74
ContactData.TypeDetail data );
84
77
* Add a title and organisation to an existing contact on the device.
85
78
* @param id the existing contact's id
86
79
* @param organisation the organisation
87
80
* @param data data about the organisation
88
* @throws ContactCreationException
90
82
public void addContactOrganisation( Long id, String organisation,
91
ContactData.ExtraDetail data ) throws ContactCreationException;
83
ContactData.ExtraDetail data );