|
WPI GDC CMS 0.0.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.wpi.gdc.cms.main.Config
This class represents the configuration of the current CMS session. It is generally loaded off a configuration file.
Field Summary | |
protected java.util.Properties |
dataSources
A set of tag names and the corresponding class names. |
protected java.lang.String |
dbEngine
String representation of the database engine. |
protected java.util.Properties |
dbProps
Properties for the database. |
protected java.lang.String |
dbUrl
String representation of the database URL. |
protected java.lang.String |
xmlParser
SAX XML parser. |
Constructor Summary | |
Config()
Creates a new default configuration. |
Method Summary | |
java.lang.String |
getDataSource(java.lang.String id)
Returns the datasource as specified in the configuration files associated with the given ID. |
java.util.Enumeration |
getDataSources()
|
java.lang.String |
getDBEngine()
|
java.util.Properties |
getDBProperties()
|
java.lang.String |
getDBURL()
|
boolean |
hasSessionID(java.lang.String sessionID)
Session IDs are not implemented yet; this method is useless! Determines if the given session ID exists in this configuration. |
static Config |
loadConfiguration(java.io.Reader r)
Loads a configuration file. |
java.lang.String |
toString()
Creates a string that describes this configuration. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.lang.String dbEngine
protected java.lang.String dbUrl
protected java.util.Properties dbProps
protected java.util.Properties dataSources
protected java.lang.String xmlParser
Constructor Detail |
public Config()
Method Detail |
public static Config loadConfiguration(java.io.Reader r) throws java.io.IOException, ConfigParseException
public java.lang.String getDataSource(java.lang.String id)
id
- the id for the datasourcepublic java.util.Enumeration getDataSources()
public java.lang.String getDBEngine()
public java.lang.String getDBURL()
public java.util.Properties getDBProperties()
public boolean hasSessionID(java.lang.String sessionID)
sessionID
- the session ID to checkpublic java.lang.String toString()
toString
in class java.lang.Object
|
WPI GDC CMS 0.0.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |