| org.columba.addressbook.facade.IContactFacade
All known Subclasses: org.columba.addressbook.facade.ContactFacade,
IContactFacade | public interface IContactFacade (Code) | | Provides high-level contact management methods. This Facade API is the only
way to access functionality of this component.
In case the facade implementation doesn't support specific functionality, an
java.lang.IllegalArgumentException should be thrown.
Components making use of this facade, should try to handle missing method
implementations gracefully, if possible.
Unchecked exceptions based on java.lang.RuntimeException are
used only. A StoreException is thrown in case of an internal
store backend error or failure a client usually can't resolve gracefully. A
IllegalArgumentException is used in case the client didn't
make use of the method correctly.
Following an example on how to register a new facade implementation:
ServiceRegistry.register(MyFacadeImpl.class, IContactFacade)
author: fdietz |
addContact | void addContact(IContactItem contactItem) throws StoreException, IllegalArgumentException(Code) | | Add new contact to a contact folder. Implementation
should prompt user for a destination contact folder.
Parameters: contactItem - The IContactItem to add to the specified folder throws: StoreException - in case of an internal storage backend failure throws: IllegalArgumentException - in case of invalid arguments, in case this method is notsupported by a facade implementation |
addContacts | void addContacts(String id, IContactItem[] contactItem) throws StoreException, IllegalArgumentException(Code) | | Add an array of contacts to the contact folder with specified id.
Parameters: id - contact folder unique id Parameters: contactItems - Array of IContactItemS to add to the specified folder throws: StoreException - in case of an internal storage backend failure throws: IllegalArgumentException - in case of invalid arguments, in case this method is notsupported by a facade implementation |
addContacts | void addContacts(IContactItem[] contactItems) throws StoreException, IllegalArgumentException(Code) | | Add an array of contacts to a contact folder. Implementation
should prompt user for a destination contact folder.
Parameters: contactItems - Array of IContactItemS to add to the specified folder throws: StoreException - in case of an internal storage backend failure throws: IllegalArgumentException - in case of invalid arguments, in case this method is notsupported by a facade implementation |
findByEmailAddress | public String findByEmailAddress(String folderId, String emailAddress) throws StoreException, IllegalArgumentException(Code) | | Find a contact by email address in specified contact folder.
Parameters: folderId - contact folder unique id Parameters: emailAddress - email address to search for contact id, in case a matching contact was found.null otherwise. throws: StoreException - in case of an internal storage backend failure throws: IllegalArgumentException - in case of invalid arguments, in case this method is notsupported by a facade implementation |
findByName | public String findByName(String folderId, String name) throws StoreException, IllegalArgumentException(Code) | | Find a contact by name in specified contact folder.
First tries to find a vCard "SORT_AS", then vCard "LASTNAME" and last
vCard "FIRSTNAME", until a match is found. If several contacts match the
first one is used and all other results are ignored.
Parameters: folderId - contact folder unique id Parameters: name - name to search for contact id, in case a matching contact was found.null otherwise. throws: StoreException - in case of an internal storage backend failure throws: IllegalArgumentException - in case of invalid arguments, in case this method is notsupported by a facade implementation |
getAllHeaderItems | public List<IHeaderItem> getAllHeaderItems(String folderId, boolean flattenGroupItems) throws StoreException, IllegalArgumentException(Code) | | Retrieve all IHeaderItem instances from contact folder
with selected unique id.
Parameters: folderId - contact folder unique id Parameters: flattenGroupItems - If true, convert IGroupItem toList . The result will be a listcontaining only IContactItem instances.Otherwise, the list will contain IContactItem and IGroupItem instances. list of IHeaderItem instances, nevernull throws: StoreException - in case of an internal storage backend failure throws: IllegalArgumentException - in case of invalid arguments, in case this method is notsupported by a facade implementation |
getContactItem | public IContactItem getContactItem(String folderId, String contactId) throws StoreException, IllegalArgumentException(Code) | | Retrieve contact item with given id from specified contact folder.
Parameters: folderId - unique contact folder id Parameters: contactId - unique contact id contact item instance if available, null otherwise. throws: StoreException - in case of an internal storage backend failure throws: IllegalArgumentException - in case of invalid arguments, in case this method is notsupported by the facade implementation |
|
|