|
EAF 7.6 Implementation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.enhydra.server.DatabaseEdit
public class DatabaseEdit
Instances of this class are used in manipulation and editing of DatabaseManager section parameters, defined in application configuration file. Also this class contains method saveState which provides saving changed configuration onto disk.
Constructor Summary | |
---|---|
DatabaseEdit(com.lutris.util.Config config)
Construction of DatabaseEdit object for particular application with given configuration file. |
Method Summary | |
---|---|
boolean |
addDatabase(java.lang.String dBname)
Adds database name to list of databases used by application. |
boolean |
existDbName(java.lang.String dBname)
Checks existence of given database name in the list of already defined databases for application. |
java.lang.String[] |
getDatabases()
Gets list of available database names. |
java.lang.String |
getDBnameClassType(java.lang.String dBname)
Gets value of ClassType parameter for given database name from Config object of application. |
java.lang.String |
getDBnameConnectionAllocationTimeout(java.lang.String dBname)
Gets value of Connection. |
java.lang.String |
getDBnameConnectionLogging(java.lang.String dBname)
Gets value of Connection.Logging parameter for given database name from Config object of application. |
java.lang.String |
getDBnameConnectionMaxPoolSize(java.lang.String dBname)
Gets value of Connection.MaxPoolSize parameter for given database name from Config object of application. |
java.lang.String |
getDBnameConnectionPassword(java.lang.String dBname)
Gets value of Connection.Password parameter for given database name from Config object of application. |
java.lang.String |
getDBnameConnectionUrl(java.lang.String dBname)
Gets value of Connection.Url parameter for given database name from Config object of application. |
java.lang.String |
getDBnameConnectionUser(java.lang.String dBname)
Gets value of Connection.User parameter for given database name from Config object of application. |
java.lang.String |
getDBnameJdbcDriver(java.lang.String dBname)
Gets value of JdbcDriver parameter for given database name from Config object of application. |
java.lang.String |
getDBnameObjectIdCacheSize(java.lang.String dBname)
Gets value of ObjectId.CacheSize parameter for given database name from Config object of application. |
java.lang.String |
getDBnameObjectIdMinValue(java.lang.String dBname)
Gets value of ObjectId.MinValue parameter for given database name from Config object of application. |
java.lang.String |
getDebug()
Gets value of Debug parameter in Config object of application. |
java.lang.String |
getDefaultDatabase()
Gets value of DefaultDatabase parameter in Config object of application. |
void |
refreshAllDbParameters(java.lang.String dBname)
Finds all parameters for specified database in configuration file and sets they to temporary object arguments. |
boolean |
removeDatabase(java.lang.String dBname)
Removes database name from array of databases used by application. |
boolean |
saveState()
Save state of DatabaseManager configuration parameters into application configuration file. |
void |
setDatabases(java.lang.String[] databases)
Sets list of database names. |
void |
setDBnameClassType(java.lang.String value,
java.lang.String dBname)
Sets value of ClassType parameter for given database name in Config object of application. |
void |
setDBnameConnectionAllocationTimeout(java.lang.String value,
java.lang.String dBname)
Sets value of Connection.AllocationTimeout parameter for given database name in Config object of application. |
void |
setDBnameConnectionLogging(java.lang.String value,
java.lang.String dBname)
Sets value of Connection.Logging parameter for given database name in Config object of application. |
void |
setDBnameConnectionMaxPoolSize(java.lang.String value,
java.lang.String dBname)
Sets value of Connection.MaxPoolSize parameter for given database name in Config object of application. |
void |
setDBnameConnectionPassword(java.lang.String value,
java.lang.String dBname)
Sets value of Connection.Password parameter for given database name in Config object of application. |
void |
setDBnameConnectionUrl(java.lang.String value,
java.lang.String dBname)
Sets value of Connection.Url parameter for given database name in Config object of application. |
void |
setDBnameConnectionUser(java.lang.String value,
java.lang.String dBname)
Sets value of Connection.User parameter for given database name in Config object of application. |
void |
setDBnameJdbcDriver(java.lang.String value,
java.lang.String dBname)
Sets value of JdbcDriver parameter for given database name in Config object of application. |
void |
setDBnameObjectIdCacheSize(java.lang.String value,
java.lang.String dBname)
Sets value of ObjectId.CacheSize parameter for given database name in Config object of application. |
void |
setDBnameObjectIdMinValue(java.lang.String value,
java.lang.String dBname)
Sets value of ObjectId.MinValue parameter for given database name in Config object of application. |
void |
setDebug(java.lang.String debug)
Sets value of Debug parameter in Config object of application. |
void |
setDefaultDatabase(java.lang.String dBname)
Sets value of DefaultDatabase parameter in Config object of application. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DatabaseEdit(com.lutris.util.Config config) throws com.lutris.util.ConfigException, com.lutris.util.KeywordValueException
config
- configuration file of the application represented as Config
object.
com.lutris.util.ConfigException
com.lutris.util.KeywordValueException
Method Detail |
---|
public void refreshAllDbParameters(java.lang.String dBname) throws com.lutris.util.KeywordValueException
dBname
- name of database which parameters are searched.
com.lutris.util.KeywordValueException
public boolean existDbName(java.lang.String dBname)
dBname
- the name of the database.
public boolean addDatabase(java.lang.String dBname) throws com.lutris.util.KeywordValueException
dBname
- the name of the database.
com.lutris.util.KeywordValueException
public boolean removeDatabase(java.lang.String dBname) throws com.lutris.util.KeywordValueException
dBname
- the name of the database.
com.lutris.util.KeywordValueException
public void setDatabases(java.lang.String[] databases) throws com.lutris.util.KeywordValueException
databases
- list of database names.
com.lutris.util.KeywordValueException
public java.lang.String[] getDatabases()
com.lutris.util.KeywordValueException
public void setDBnameClassType(java.lang.String value, java.lang.String dBname) throws com.lutris.util.KeywordValueException
value
- given value of ClassType parameter represented as StringdBname
- name of database which parameter's value is changed or set.
com.lutris.util.KeywordValueException
public java.lang.String getDBnameClassType(java.lang.String dBname) throws com.lutris.util.KeywordValueException
dBname
- name of database which parameter's value is changed or set.
com.lutris.util.KeywordValueException
public void setDBnameConnectionAllocationTimeout(java.lang.String value, java.lang.String dBname) throws com.lutris.util.KeywordValueException
value
- given value of Connection.AllocationTimeout parameter represented
as String.dBname
- name of database which parameter's value is changed or set.
com.lutris.util.KeywordValueException
public java.lang.String getDBnameConnectionAllocationTimeout(java.lang.String dBname) throws com.lutris.util.KeywordValueException
dBname
- name of database which parameter's value is changed or set.
com.lutris.util.KeywordValueException
public void setDBnameConnectionLogging(java.lang.String value, java.lang.String dBname) throws com.lutris.util.KeywordValueException
value
- given value of Connection.Logging parameter represented as String.
Allowable values for this parameter are "true" and "false". Any other value
will be treated as N/A (not available).dBname
- name of database which parameter's value is changed or set.
com.lutris.util.KeywordValueException
public java.lang.String getDBnameConnectionLogging(java.lang.String dBname) throws com.lutris.util.KeywordValueException
dBname
- name of database which parameter's value is changed or set.
com.lutris.util.KeywordValueException
public void setDBnameConnectionMaxPoolSize(java.lang.String value, java.lang.String dBname) throws com.lutris.util.KeywordValueException
value
- given value of Connection.MaxPoolSize parameter represented as StringdBname
- name of database which parameter's value is changed or set.
com.lutris.util.KeywordValueException
public java.lang.String getDBnameConnectionMaxPoolSize(java.lang.String dBname) throws com.lutris.util.KeywordValueException
dBname
- name of database which parameter's value is changed or set.
com.lutris.util.KeywordValueException
public void setDBnameConnectionPassword(java.lang.String value, java.lang.String dBname) throws com.lutris.util.KeywordValueException
value
- given value of Connection.Password parameter represented as StringdBname
- name of database which parameter's value is changed or set.
com.lutris.util.KeywordValueException
public java.lang.String getDBnameConnectionPassword(java.lang.String dBname) throws com.lutris.util.KeywordValueException
dBname
- name of database which parameter's value is changed or set.
com.lutris.util.KeywordValueException
public void setDBnameConnectionUrl(java.lang.String value, java.lang.String dBname) throws com.lutris.util.KeywordValueException
value
- given value of Connection.Url parameter represented as StringdBname
- name of database which parameter's value is changed or set.
com.lutris.util.KeywordValueException
public java.lang.String getDBnameConnectionUrl(java.lang.String dBname) throws com.lutris.util.KeywordValueException
dBname
- name of database which parameter's value is changed or set.
com.lutris.util.KeywordValueException
public void setDBnameConnectionUser(java.lang.String value, java.lang.String dBname) throws com.lutris.util.KeywordValueException
value
- given value of Connection.User parameter represented as StringdBname
- name of database which parameter's value is changed or set.
com.lutris.util.KeywordValueException
public java.lang.String getDBnameConnectionUser(java.lang.String dBname) throws com.lutris.util.KeywordValueException
dBname
- name of database which parameter's value is changed or set.
com.lutris.util.KeywordValueException
public void setDBnameJdbcDriver(java.lang.String value, java.lang.String dBname) throws com.lutris.util.KeywordValueException
value
- given value of JdbcDriver parameter represented as String.dBname
- name of database which parameter's value is changed or set.
com.lutris.util.KeywordValueException
public java.lang.String getDBnameJdbcDriver(java.lang.String dBname) throws com.lutris.util.KeywordValueException
dBname
- name of database which parameter's value is changed or set.
com.lutris.util.KeywordValueException
public void setDBnameObjectIdCacheSize(java.lang.String value, java.lang.String dBname) throws com.lutris.util.KeywordValueException
value
- given value of ObjectId.CacheSize parameter represented as String.dBname
- name of database which parameter's value is changed or set.
com.lutris.util.KeywordValueException
public java.lang.String getDBnameObjectIdCacheSize(java.lang.String dBname) throws com.lutris.util.KeywordValueException
dBname
- name of database which parameter's value is changed or set.
com.lutris.util.KeywordValueException
public void setDBnameObjectIdMinValue(java.lang.String value, java.lang.String dBname) throws com.lutris.util.KeywordValueException
value
- given value of ObjectId.MinValue parameter represented as StringdBname
- name of database which parameter's value is changed or set.
com.lutris.util.KeywordValueException
public java.lang.String getDBnameObjectIdMinValue(java.lang.String dBname) throws com.lutris.util.KeywordValueException
dBname
- name of database which parameter's value is changed or set.
com.lutris.util.KeywordValueException
public void setDebug(java.lang.String debug) throws com.lutris.util.KeywordValueException
debug
- value of parameter represented as String. It can takes values
"true" or "false". If wrong value is specified, it will be treated as "false".
Also if values are null or empty String, or "N/A" DatabaseManager.Debug parameter
will be removed.
com.lutris.util.KeywordValueException
public java.lang.String getDebug() throws com.lutris.util.KeywordValueException
com.lutris.util.KeywordValueException
public void setDefaultDatabase(java.lang.String dBname) throws com.lutris.util.KeywordValueException
dBname
- given value of parameter DefaultDatabase represented as String.
com.lutris.util.KeywordValueException
public java.lang.String getDefaultDatabase() throws com.lutris.util.KeywordValueException
com.lutris.util.KeywordValueException
public boolean saveState()
|
EAF 7.6 Implementation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |