superwaba.ext.xplat.io.pimal.addressbook
Interface AddressBook

All Known Implementing Classes:
PalmAddressBook, PocketPCAddressBook

public interface AddressBook

An interface describing the functionality and implementation AddressBook must provide.


Method Summary
 void addCategory(java.lang.String category)
          Adds a category
 AddressRecord createAddressRecord()
          Creates a new AddressRecord
 void deleteAddressRecord(AddressRecord addressRecord)
          Deletes an AddressRecord from the device
 RecordList getAddressRecords()
          Reads stored AddressRecords from the device.
 Vector getCategories()
           
 void removeCategory(java.lang.String category)
          Removes a category
 void renameCategory(java.lang.String oldName, java.lang.String newName)
          Renames a category
 

Method Detail

getAddressRecords

public RecordList getAddressRecords()
Reads stored AddressRecords from the device. The returned Vector will be adapted, when records are deleted or created later on.
Returns:
RecordList of AddressRecords stored on this device

createAddressRecord

public AddressRecord createAddressRecord()
                                  throws NotSupportedByDeviceException
Creates a new AddressRecord
Returns:
The created AddressRecord
Throws:
NotSupportedByDeviceException - when no/no more records can be created on the given device

deleteAddressRecord

public void deleteAddressRecord(AddressRecord addressRecord)
Deletes an AddressRecord from the device
Parameters:
addressRecord - AddressRecord to delete

getCategories

public Vector getCategories()
                     throws NotSupportedByDeviceException
Returns:
A Vector if Strings containing the category name
Throws:
NotSupportedByDeviceException - when the given device doesn't support categories

addCategory

public void addCategory(java.lang.String category)
                 throws NotSupportedByDeviceException
Adds a category
Parameters:
category - Category to add
Throws:
NotSupportedByDeviceException - when the given device doesn't support categories or doesn't support more categories

removeCategory

public void removeCategory(java.lang.String category)
                    throws NotSupportedByDeviceException
Removes a category
Parameters:
category - the name of the category to remove
Throws:
NotSupportedByDeviceException - when the given device doesn't support categories

renameCategory

public void renameCategory(java.lang.String oldName,
                           java.lang.String newName)
                    throws NotSupportedByDeviceException
Renames a category
Parameters:
oldName - old name of the category
newName - new name of the category
Throws:
NotSupportedByDeviceException - when the given device doesn't support categories