superwaba.ext.xplat.io.pimal.datebook
Interface DateBook

All Known Implementing Classes:
PalmDateBook, PocketPCDateBook

public interface DateBook

An interface describing the functionality and implementation DateBook must provide.


Method Summary
 void addCategory(java.lang.String category)
          Adds a category
 DateRecord createDateRecord()
          Creates a new DateRecord
 void deleteDateRecord(DateRecord dateRecord)
          Deletes a DateRecord from the device
 Vector getCategories()
           
 RecordList getDateRecords()
          Reads stored DateRecords from the device.
 void removeCategory(java.lang.String category)
          Removes a category
 void renameCategory(java.lang.String oldName, java.lang.String newName)
          Renames a category
 

Method Detail

getDateRecords

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

createDateRecord

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

deleteDateRecord

public void deleteDateRecord(DateRecord dateRecord)
Deletes a DateRecord from the device
Parameters:
dateRecord - DateRecord 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