superwaba.ext.xplat.io.pimal.todobook
Interface ToDoBook

All Known Implementing Classes:
PalmToDoBook, PocketPCToDoBook

public interface ToDoBook

An interface describing the functionality and implementation ToDoBook must provide.


Method Summary
 void addCategory(java.lang.String category)
          Adds a category
 ToDoRecord createToDoRecord()
          Creates a new ToDoRecord
 void deleteToDoRecord(ToDoRecord todoRecord)
          Deletes a ToDoRecord from the device
 Vector getCategories()
           
 RecordList getToDoRecords()
          Reads stored ToDoRecords 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

getToDoRecords

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

createToDoRecord

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

deleteToDoRecord

public void deleteToDoRecord(ToDoRecord todoRecord)
Deletes a ToDoRecord from the device
Parameters:
todoRecord - ToDoeRecord 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