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