|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.jdbdump.connect.Configuration
public class Configuration
This class is a Singleton, which purpose is to manage system's configuration data such as:
Method Summary | |
---|---|
void |
addBackup(DatabaseBackupData dbd)
Adds data about database backup to current configuration. |
void |
addDatabase(DatabaseConnectionData dcd)
Adds data about database connection to current configuration. |
java.lang.Object |
clone()
Prevents cloning the Configuration object, and therefore reduces the possibility of creating more than one object - we are avoiding such situations, becouse Configuration is implementing Singleton design pattern |
java.lang.String |
getBackupDir()
|
java.util.Hashtable<java.lang.String,DatabaseBackupData> |
getBackups()
Returns list of backuped databases |
java.util.Hashtable<java.lang.String,DatabaseConnectionData> |
getConnections()
Returns list of configured database connections |
java.lang.String |
getEmail()
|
static Configuration |
getInstance()
This method is the only possibility to get an instance of class Configuration. |
void |
loadData()
Loads configuration data to the Configuration object |
void |
removeBackup(DatabaseBackupData dbd)
Removes data about database backup from current configuration. |
void |
removeBackup(java.lang.String title,
java.lang.String date)
Removes data about database backup from current configuration. |
void |
removeDatabase(DatabaseConnectionData dbc)
Removes data about database connection from current configuration. |
void |
removeDatabase(java.lang.String title)
Removes data about database connection from current configuration. |
void |
saveData()
Saves configuration storred in the Configuration object. |
boolean |
setAutoload(boolean value)
Changes value of autoload setting. |
boolean |
setAutosave(boolean value)
Changes value of autosave setting. |
void |
setEmail(java.lang.String e)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Configuration getInstance() throws java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.ClassNotFoundException, java.io.IOException
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.io.IOException
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if one tries to clone a Configuration objectpublic boolean setAutosave(boolean value)
value
- new setting of the autosave flag.
autosave
,
#save()
public boolean setAutoload(boolean value)
value
- new setting of the autoload flag.
autoload
,
#reload()
public void addDatabase(DatabaseConnectionData dcd)
dcd
- database connection to be addedpublic void removeDatabase(java.lang.String title)
title
- name of database connection to be removedpublic void removeDatabase(DatabaseConnectionData dbc)
dcd
- database connection to be removedpublic void addBackup(DatabaseBackupData dbd)
dcd
- database backup info to be addedpublic void removeBackup(java.lang.String title, java.lang.String date)
title
- name of database backup info to be removeddate
- date of database backup info to be removedpublic void removeBackup(DatabaseBackupData dbd)
dbd
- database backup info to be removedpublic java.util.Hashtable<java.lang.String,DatabaseConnectionData> getConnections()
public java.util.Hashtable<java.lang.String,DatabaseBackupData> getBackups()
public java.lang.String getEmail()
public void setEmail(java.lang.String e)
public void saveData() throws java.io.IOException
java.io.IOException
public void loadData() throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public java.lang.String getBackupDir()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |