|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface IAddressBook
Represents an address book, which contains contact information for various
LCS/OCS users. This is used along with IAddressBookProvider to
provide a custom, locally-cached address book implementation.
| Method Summary | |
|---|---|
void |
commitChanges()
Commits changes after contacts have been created, updated, or deleted. |
boolean |
containsContact(String id)
Returns true if the specified contact exists. |
void |
createContact(IAddressBookContact contact)
Adds a new contact to this Address Book. |
void |
deleteContact(String id)
Attempts to delete an existing contact's information. |
IAddressBookContact |
findContact(String partialName)
Searches for the specified contact's information. |
IAddressBookContact[] |
findContacts(String partialName,
int maxResults)
Searches for the specified contacts' information. |
IAddressBookContact |
getContact(String id)
Looks up an existing contact's information. |
Date |
getLastModifiedDate()
Returns the date when this Address Book was last modified. |
String |
getName()
Returns this Address Book's name. |
IAddressBookProvider |
getProvider()
Returns the associated Address Book Provider. |
void |
setLastModifiedDate(Date date)
Sets the date when this Address Book was last modified. |
void |
updateContact(IAddressBookContact contact)
Attempts to update an existing contact's information. |
| Method Detail |
|---|
String getName()
IAddressBookProvider getProvider()
Date getLastModifiedDate()
throws Exception
null
Exception - if some error occurred
void setLastModifiedDate(Date date)
throws Exception
date - the date
Exception - if some error occurred
void createContact(IAddressBookContact contact)
throws Exception
contact - the contact's information
Exception - if some error occurred
IAddressBookContact getContact(String id)
throws Exception
id - the contact's ID
null if the contact does
not exist
Exception - if some error occurred
boolean containsContact(String id)
throws Exception
true if the specified contact exists.
This has the same effect as checking whether getContact(java.lang.String) returns
null, but no data is copied (therefore, this method is
faster).
id - the contact's ID
true if the specified contact exists
Exception - if some error occurred
IAddressBookContact findContact(String partialName)
throws Exception
partialName - a partial name. This can be a given name, surname, display name, or
any portion of those.
null if a matching contact
was not found
Exception - if some error occurredfindContacts(String, int)
IAddressBookContact[] findContacts(String partialName,
int maxResults)
throws Exception
partialName - a partial name. This can be a given name, surname, display name, or
any portion of those.maxResults - the maximum number of results to return. If not specified
(maxResults < 0), any number of results can be
returned.
Exception - if some error occurred
void updateContact(IAddressBookContact contact)
throws Exception
contact - the contact's information
Exception - if some error occurred
void deleteContact(String id)
throws Exception
id - the contact's ID
Exception - if some error occurred
void commitChanges()
throws Exception
This method is guaranteed to be called some time after any of the
various modification methods have been called (createContact(com.zion.jbuddy.lcs.IAddressBookContact),
updateContact(com.zion.jbuddy.lcs.IAddressBookContact), or deleteContact(java.lang.String)). This can be used to
cache and reuse database connections until all modifications have been
made, for example.
Exception - if some error occurred
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||