fi.hut.tml.xsmiles.comm.implementation.general
Class XMLAddressBook

java.lang.Object
  extended byfi.hut.tml.xsmiles.comm.implementation.general.events.CommEventSenderBase
      extended byfi.hut.tml.xsmiles.comm.implementation.general.XMLAddressBook
All Implemented Interfaces:
AddressBook, CommEventSender
Direct Known Subclasses:
SipAddressBook

public abstract class XMLAddressBook
extends CommEventSenderBase
implements AddressBook

Author:
Sami Sundell xsmiles / fi.hut.tml.xsmiles.comm.implementation.general, 9.12.2004

Field Summary
protected  java.util.Hashtable contacts
           
 
Constructor Summary
XMLAddressBook()
           
 
Method Summary
protected abstract  void addContact(org.w3c.dom.Element user)
           
 int entryCount()
           
 java.util.Hashtable getContacts()
           
 void loadAddressBook()
          Gets the address book from some, possibly protocol dependent storage.
 void saveAddressBook()
          Save the address book.
 java.util.Hashtable searchInfo(java.lang.String _search, java.lang.String _field)
          Searches the address book for some info and returns the users that match.
 
Methods inherited from class fi.hut.tml.xsmiles.comm.implementation.general.events.CommEventSenderBase
addEventListener, dispatchEvent, removeEventListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fi.hut.tml.xsmiles.comm.events.CommEventSender
addEventListener, dispatchEvent, removeEventListener
 

Field Detail

contacts

protected java.util.Hashtable contacts
Constructor Detail

XMLAddressBook

public XMLAddressBook()
Method Detail

loadAddressBook

public void loadAddressBook()
Description copied from interface: AddressBook
Gets the address book from some, possibly protocol dependent storage. It could be a local file or a storage server (SIP registrar, LDAP storage, whatever)

Specified by:
loadAddressBook in interface AddressBook

saveAddressBook

public void saveAddressBook()
Description copied from interface: AddressBook
Save the address book.

Specified by:
saveAddressBook in interface AddressBook

addContact

protected abstract void addContact(org.w3c.dom.Element user)

searchInfo

public java.util.Hashtable searchInfo(java.lang.String _search,
                                      java.lang.String _field)
Description copied from interface: AddressBook
Searches the address book for some info and returns the users that match. For example, we could search for name and return address.

Specified by:
searchInfo in interface AddressBook
Parameters:
_search - What to search
_field - The target field of the search
Returns:

getContacts

public java.util.Hashtable getContacts()
Specified by:
getContacts in interface AddressBook

entryCount

public int entryCount()
Specified by:
entryCount in interface AddressBook


X-Smiles 1.2