uk.org.arlott.simon.hw.f24.lbsta
Interface FileHandler

All Known Implementing Classes:
JavaWSFileHandler, StandaloneFileHandler

public interface FileHandler

The FileHandler interface provides methods for loading and saving to a file. The purpose is to allow different file handling methods to be used.


Method Summary
 org.w3c.dom.Document open(java.awt.Component parent)
          Open a file and read its data.
 void reset()
          Reset the last saved file information.
 boolean save(java.awt.Component parent, org.w3c.dom.Document data, boolean saveAs)
          Save data to a file.
 

Method Detail

reset

void reset()
Reset the last saved file information.


open

org.w3c.dom.Document open(java.awt.Component parent)
                          throws FileHandlerException
Open a file and read its data.

Parameters:
parent - The parent Component for dialogs and prompts.
Returns:
A Document containing the file data.
Throws:
FileHandlerException - If there was a problem opening the file.

save

boolean save(java.awt.Component parent,
             org.w3c.dom.Document data,
             boolean saveAs)
             throws FileHandlerException
Save data to a file.

Parameters:
parent - The parent Component for dialogs and prompts.
data - A Document containing the file data.
saveAs - Set true to use the "save as" mode.
Returns:
true if the file was saved successfully.
Throws:
FileHandlerException - If there was a problem saving the file.