|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectAddressBookController
An object of this class performs operations on the address book in response to user gestures on the GUI
Constructor Summary | |
AddressBookController(FileSystem fileSystem)
Constructor |
Method Summary | |
void |
doAdd(AddressBookGUI gui)
Do the Add a Person Use Case. |
void |
doDelete(AddressBookGUI gui,
int index)
Do the Delete a Person use case |
void |
doEdit(AddressBookGUI gui,
int index)
Do the Edit a Person use case |
void |
doNew(AddressBookGUI gui)
Do the Create New Address Book Use Case |
void |
doOfferSaveChanges(AddressBookGUI gui)
Do Offer to Save Changes extension. |
void |
doOpen(AddressBookGUI gui)
Do the Open Existing Address Book Use Case |
void |
doPrint(AddressBookGUI gui)
Do the Print Entries Use Case |
void |
doSave(AddressBookGUI gui)
Do the Save Address Book Use Case. |
void |
doSaveAs(AddressBookGUI gui)
Do the Save Address Book As use case |
void |
doSortByName(AddressBookGUI gui)
Do the Sort Entries by Name Use Case |
void |
doSortByZip(AddressBookGUI gui)
Do the Sort Entries by ZIP Use Case |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AddressBookController(FileSystem fileSystem)
fileSystem
- the object to use for interacting with the file systemMethod Detail |
public void doAdd(AddressBookGUI gui)
gui
- the gui that requested this operationpublic void doEdit(AddressBookGUI gui, int index)
gui
- the gui that requested this operationindex
- the position of the desired personpublic void doDelete(AddressBookGUI gui, int index)
gui
- the gui that requested this operationindex
- the position of the desired personpublic void doSortByName(AddressBookGUI gui)
gui
- the gui that requested this operationpublic void doSortByZip(AddressBookGUI gui)
gui
- the gui that requested this operationpublic void doPrint(AddressBookGUI gui)
gui
- the gui that requested this operationpublic void doNew(AddressBookGUI gui)
gui
- the gui that requested this operationpublic void doOpen(AddressBookGUI gui) throws java.io.IOException, java.lang.ClassCastException, java.lang.ClassNotFoundException, java.lang.InterruptedException, java.lang.SecurityException
gui
- the gui that requested this operation
java.io.IOException
- if there is a problem reading the file
java.lang.ClassCastException
- if the file does not contain an
AddressBook
java.lang.ClassNotFoundException
- if the file does not contain
an AddressBook, and the class it does contain is not
found - this should never happen
java.lang.InterruptedException
- if the user cancels the operation
java.lang.SecurityException
- if the security manager disallows
the operationpublic void doSave(AddressBookGUI gui) throws java.io.IOException, java.lang.InterruptedException, java.lang.SecurityException
gui
- the gui that requested this operation
java.io.IOException
- if there is a problem writing the file
java.lang.InterruptedException
- will be propagated if thrown by doSaveAs()
java.lang.SecurityException
- will be propagated if thrown by doSaveAs()public void doSaveAs(AddressBookGUI gui) throws java.io.IOException, java.lang.InterruptedException, java.lang.SecurityException
gui
- the gui that requested this operation
java.io.IOException
- if there is a problem writing the file
java.lang.InterruptedException
- if the user cancels the operation
java.lang.SecurityException
- if the security manager disallows
the operationpublic void doOfferSaveChanges(AddressBookGUI gui) throws java.lang.InterruptedException, java.io.IOException, java.lang.SecurityException
gui
- the gui that requested this operation
java.lang.InterruptedException
- if the user cancels the operation
java.io.IOException
- will be propagated if thrown by doSave()
java.lang.SecurityException
- will be propagated if thrown by doSave()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |