|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dbforms.config.DbFormsConfig
public class DbFormsConfig
This class gets populated with data from the dbforms-config.xml file by the ConfigServlet. This class is a kind of "single point of entry" for configuration data: it contains the definitions of tables, fields, fieldtypes, keys etc. and even the definitions of data sources (see dbforms-config.xml) Many components of the dbforms-frameworks use the data stored in this class.
Field Summary | |
---|---|
static String |
CONFIG
DOCUMENT ME! |
Constructor Summary | |
---|---|
DbFormsConfig()
Creates a new DbFormsConfig object. |
Method Summary | |
---|---|
void |
addDbConnection(DbConnection dbConnection)
DOCUMENT ME! |
void |
addInterceptor(Interceptor interceptor)
Add an global interceptor |
void |
addParam(String name,
String value)
|
void |
addTable(Table table)
DOCUMENT ME! |
Connection |
getConnection()
Just returns the default connection |
Connection |
getConnection(String dbConnectionName)
Get a connection using the connection name specified into the xml configuration file. |
DataSource |
getDataSource(String dbConnectionName)
DOCUMENT ME! |
String |
getDefaultEscaperClass()
DOCUMENT ME! |
String |
getDefaultFormatterClass()
DOCUMENT ME! |
IEscaper |
getEscaper()
DOCUMENT ME! |
Vector |
getInterceptors()
Get all the global interceptor objects |
String |
getRealPath()
|
ServletConfig |
getServletConfig()
get access to configuration of config servlet |
ServletContext |
getServletContext()
Get access to servlet context in order to interoperate with other components of the web application |
Table |
getTable(int index)
DOCUMENT ME! |
Table |
getTableByName(String name)
DOCUMENT ME! |
boolean |
hasInterceptors()
Check if this table has got interceptors. |
String |
replaceVariables(String s)
Replaces the occurens from REALPATH in s with realpath. |
void |
setDefaultEscaperClass(String string)
DOCUMENT ME! |
void |
setDefaultFormatterClass(String string)
DOCUMENT ME! |
void |
setDOMFactoryClass(String string)
DOCUMENT ME! |
void |
setResolveConfigPropertyClass(String resolveConfigPropertyClass)
|
void |
setServletConfig(ServletConfig servletConfig)
DOCUMENT ME! |
String |
toString()
DOCUMENT ME! |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String CONFIG
Constructor Detail |
---|
public DbFormsConfig()
realPath
- local path to the application on local serverMethod Detail |
---|
public Connection getConnection() throws IllegalArgumentException, SQLException
IllegalArgumentException
- if any error occurs
SQLException
public Connection getConnection(String dbConnectionName) throws IllegalArgumentException, SQLException
dbConnectionName
- the name of the DbConnection element
IllegalArgumentException
- if any error occurs
SQLException
public void setDOMFactoryClass(String string)
string
- public void setResolveConfigPropertyClass(String resolveConfigPropertyClass)
public DataSource getDataSource(String dbConnectionName)
dbConnectionName
- DOCUMENT ME!
public void setDefaultEscaperClass(String string)
string
- public String getDefaultEscaperClass()
public void setDefaultFormatterClass(String string)
string
- public String getDefaultFormatterClass()
public IEscaper getEscaper()
public Vector getInterceptors()
public String getRealPath()
public void setServletConfig(ServletConfig servletConfig)
servletConfig
- DOCUMENT ME!public ServletConfig getServletConfig()
public ServletContext getServletContext()
public Table getTable(int index)
index
- DOCUMENT ME!
public Table getTableByName(String name)
name
- DOCUMENT ME!
public void addDbConnection(DbConnection dbConnection)
dbConnection
- DOCUMENT ME!public void addInterceptor(Interceptor interceptor)
interceptor
- the interceptor to addpublic void addParam(String name, String value)
public void addTable(Table table)
table
- DOCUMENT ME!public boolean hasInterceptors()
public String toString()
toString
in class Object
public String replaceVariables(String s)
s
- the string containing the REALPATH tokenrealpath
- the value used to replace the REALPATH token
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |