|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.liquidsite.app.servlet.Configuration
The application configuration. This class contains support for reading and writing the configuration, as well as retrieving the individual properties. The configuration is divided into a configuration file containing the database properties, and a configuration table containing the rest of the configuration properties.
| Field Summary | |
static java.lang.String |
DATABASE_HOSTNAME
The database host name key. |
static java.lang.String |
DATABASE_NAME
The database name key. |
static java.lang.String |
DATABASE_PASSWORD
The database password key. |
static java.lang.String |
DATABASE_POOL_SIZE
The database pool size key. |
static java.lang.String |
DATABASE_USER
The database user name key. |
static java.lang.String |
FILE_DIRECTORY
The file data directory key. |
static java.lang.String |
MAIL_FOOTER
The mail footer text key. |
static java.lang.String |
MAIL_FROM
The mail from address key. |
static java.lang.String |
MAIL_HEADER
The mail header text key. |
static java.lang.String |
MAIL_HOST
The mail server host name key. |
static java.lang.String |
MAIL_USER
The mail user name key. |
static java.lang.String |
STATS_DIRECTORY
The statistics data directory key. |
static java.lang.String |
UPLOAD_DIRECTORY
The temporary file upload directory key. |
static java.lang.String |
UPLOAD_MAX_SIZE
The file upload maximum size key. |
static java.lang.String |
VERSION
The version number key. |
| Constructor Summary | |
Configuration()
Creates a new read-only configuration. |
|
Configuration(java.io.File file)
Creates a new configuration. |
|
| Method Summary | |
java.lang.String |
get(java.lang.String key,
java.lang.String defaultValue)
Returns a configuration property string value. |
int |
getInt(java.lang.String key,
int defaultValue)
Returns a configuration property integer value. |
boolean |
isInitialized()
Checks if this configuration has been properly initialized. |
void |
read(DatabaseConnector db)
Reads the configuration. |
void |
set(java.lang.String key,
int value)
Sets a configuration property value. |
void |
set(java.lang.String key,
java.lang.String value)
Sets a configuration property value. |
void |
setAll(Configuration config)
Sets all configuration properties from a set. |
void |
write(DatabaseConnector db)
Writes the configuration. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String VERSION
public static final java.lang.String DATABASE_HOSTNAME
public static final java.lang.String DATABASE_NAME
public static final java.lang.String DATABASE_USER
public static final java.lang.String DATABASE_PASSWORD
public static final java.lang.String DATABASE_POOL_SIZE
public static final java.lang.String MAIL_HOST
public static final java.lang.String MAIL_USER
public static final java.lang.String MAIL_FROM
public static final java.lang.String MAIL_HEADER
public static final java.lang.String MAIL_FOOTER
public static final java.lang.String FILE_DIRECTORY
public static final java.lang.String STATS_DIRECTORY
public static final java.lang.String UPLOAD_DIRECTORY
public static final java.lang.String UPLOAD_MAX_SIZE
| Constructor Detail |
public Configuration()
public Configuration(java.io.File file)
file - the configuration file to use| Method Detail |
public boolean isInitialized()
public java.lang.String get(java.lang.String key,
java.lang.String defaultValue)
key - the configuration property keydefaultValue - the value to use if not set
public int getInt(java.lang.String key,
int defaultValue)
key - the configuration property keydefaultValue - the value to use if not set
public void set(java.lang.String key,
java.lang.String value)
key - the configuration property keyvalue - the configuration property value
public void set(java.lang.String key,
int value)
key - the configuration property keyvalue - the configuration property valuepublic void setAll(Configuration config)
config - the configuration properties
public void read(DatabaseConnector db)
throws ConfigurationException
db - the database connector to use
ConfigurationException - if the configuration couldn't
be read properly
public void write(DatabaseConnector db)
throws ConfigurationException
db - the database connector to use
ConfigurationException - if the configuration couldn't
be written properly
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||