phenote.dataadapter
Class LoadSaveManager

java.lang.Object
  extended by phenote.dataadapter.LoadSaveManager

public class LoadSaveManager
extends java.lang.Object

This was formerly just for files - adding in queryable/database data adapters


Constructor Summary
LoadSaveManager(CharacterListManager clManager)
           
 
Method Summary
 void addListener(LoadSaveListener listener)
           
 void exportData()
           
static LoadSaveManager inst()
          Returns singleton
 void loadData()
          Loads a new document of characters, prompting the user to choose a file and possibly a data adapter.
 void loadData(java.io.File f)
          Loads a new document of characters from the given file, using the default data adapter for the file's extension.
 void loadData(java.io.File f, DataAdapterI adapter)
          Loads a new document of characters from the given file using the given data adapter.
 void newData()
           
 void removeListener(LoadSaveListener listener)
           
static void reset()
           
 void saveData()
          Saves the document's characters to a file, prompting the user to choose a file and data adapter.
 void saveData(boolean useCurrentFile)
          Saves the document's characters to the file it was loaded from, or prompting the user to choose a file and data adapter if there is no current file.
 void saveData(java.io.File f)
          Saves the document's characters to the given file, using the default data adapter for the file's extension.
 void saveToDbDataadapter()
          Checks contraints and if pass/override then save to QueryableDataAdapter and clear transactions
 void saveToDbOrFile()
          This class needs a little refactoring - the above methods should be renamed saveFileData - this method check if have queryable/db adapter and if so saves to that - otherwise brings up file chooser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoadSaveManager

public LoadSaveManager(CharacterListManager clManager)
Method Detail

inst

public static LoadSaveManager inst()
Returns singleton


reset

public static void reset()

newData

public void newData()

loadData

public void loadData()
Loads a new document of characters, prompting the user to choose a file and possibly a data adapter.


loadData

public void loadData(java.io.File f)
Loads a new document of characters from the given file, using the default data adapter for the file's extension.


loadData

public void loadData(java.io.File f,
                     DataAdapterI adapter)
Loads a new document of characters from the given file using the given data adapter.


saveData

public void saveData()
Saves the document's characters to a file, prompting the user to choose a file and data adapter.


saveData

public void saveData(boolean useCurrentFile)
Saves the document's characters to the file it was loaded from, or prompting the user to choose a file and data adapter if there is no current file.


saveData

public void saveData(java.io.File f)
Saves the document's characters to the given file, using the default data adapter for the file's extension.


saveToDbOrFile

public void saveToDbOrFile()
This class needs a little refactoring - the above methods should be renamed saveFileData - this method check if have queryable/db adapter and if so saves to that - otherwise brings up file chooser


saveToDbDataadapter

public void saveToDbDataadapter()
Checks contraints and if pass/override then save to QueryableDataAdapter and clear transactions


exportData

public void exportData()

addListener

public void addListener(LoadSaveListener listener)

removeListener

public void removeListener(LoadSaveListener listener)