| java.lang.Object dinamica.AbstractModule
All known Subclasses: dinamica.GenericOutput, dinamica.GenericTransaction,
AbstractModule | abstract public class AbstractModule (Code) | | Base class that factorizes reusable behavior
for Output and Transaction classes
Creation date: 4/10/2003
Last Update: 4/10/2003
(c) 2003 Martin Cordova
This code is released under the LGPL license
author: Martin Cordova |
getConnection | protected Connection getConnection()(Code) | | The application uses a default DataSource.
A connection from this pool is made available
for Transaction modules
Default Database Connection |
getDb | protected Db getDb() throws Throwable(Code) | | Return framework Db object (wrapper for JDBC operations)
using the connection and the LogWriter passed to this object
Db object throws: Throwable - |
getLocalResource | protected String getLocalResource(String path) throws Throwable(Code) | | Load a text resource relative to the class location
Parameters: path - Pathname of the resource, if it is a filenamethen the resource location is assumed in the same path as the classotherwise may be a sybdirectory relative to the class directory. A String containing the resource throws: Throwable - |
getResource | public String getResource(String fileName) throws Throwable(Code) | | Load a text resource from the Action path
(where config.xml is located) or from a relative
path inside the context. The resource may be
a SQL or HTML template, any text based file.
Parameters: fileName - Resource file name; if starts with "/" thenit is interpreted as a path relative to the context, otherwisethe Action's path is used. A String containing the resource throws: Throwable - |
getSession | protected HttpSession getSession()(Code) | | Return HTTP Session, force session creation if necessary
HttpSession reference |
getUserName | protected String getUserName()(Code) | | Return UserID for the current security session, if any,
otherwise returns null
|
isUserInRole | protected boolean isUserInRole(String roleName)(Code) | | Returns true if user belongs to role
Parameters: roleName - Name of the role as defined in WEB.XML |
log | protected void log(String message)(Code) | | Write message to the log writer
Parameters: message - Message to log |
setConfig | public void setConfig(Config config)(Code) | | Set transaction configuration
Parameters: config - |
setConnection | public void setConnection(Connection connection)(Code) | | Set database connection
Parameters: connection - |
setLogWriter | public void setLogWriter(PrintWriter pw)(Code) | | Set log writer for Db object (to log jdbc operations)
Parameters: pw - |
|
|