All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.expershop.esapi.Session

java.lang.Object
   |
   +----com.expershop.esapi.Session

public class Session
extends Object
A web client session


Method Index

 o debug(String)
Print a debug message (depends on the tracelevel and tracefile properties in the application's configuration file).
 o getAppConfiguration()
Get the applications's configuration
 o getClientId()
Get the session Id (to recognize who is connected)
 o getCookie()
Get the client info
 o getJdbcConnection()
Get the current JDBC connection to the database
 o newDbObject(String, ResultSet)
Obtain a DbObject instance: useful for database manipulations.
 o queryDB(String)
Query the application's database
 o setAdministrator(boolean)
Decide wether this session is an administrator session or not.
By default, sessions do not have administrator rights (false).
 o sqlEncode(String)
Encode a string into an SQL column value.
Useful for column values that contain special characters, like quotes.
 o trace(String)
Print a trace message (depends on the tracelevel and tracefile properties in the application's configuration file).
 o updateDB(String)
Update the application's database

Methods

 o getAppConfiguration
 public AppConfiguration getAppConfiguration()
Get the applications's configuration

 o getCookie
 public Cookie getCookie()
Get the client info

Returns:
The current client info.
 o getClientId
 public String getClientId()
Get the session Id (to recognize who is connected)

Returns:
The session id (a String that identifies the client).
 o getJdbcConnection
 public Connection getJdbcConnection()
Get the current JDBC connection to the database

 o queryDB
 public ResultSet queryDB(String sql) throws SQLException
Query the application's database

 o newDbObject
 public DbObject newDbObject(String table,
                             ResultSet rs) throws SQLException
Obtain a DbObject instance: useful for database manipulations.

Parameters:
table - The database table name
rs - A java.sql.ResultSet object to initialize the DbObject, or null if not required.
Returns:
A new DbObject instance.
 o updateDB
 public void updateDB(String sql) throws SQLException
Update the application's database

 o setAdministrator
 public void setAdministrator(boolean adm)
Decide wether this session is an administrator session or not.
By default, sessions do not have administrator rights (false).

Parameters:
adm - Grant this session administrator rights: true or false.
 o debug
 public void debug(String msg)
Print a debug message (depends on the tracelevel and tracefile properties in the application's configuration file).

Parameters:
msg - The message to be printed.
 o trace
 public void trace(String msg)
Print a trace message (depends on the tracelevel and tracefile properties in the application's configuration file).

Parameters:
msg - The message to be printed.
 o sqlEncode
 public String sqlEncode(String s)
Encode a string into an SQL column value.
Useful for column values that contain special characters, like quotes.


All Packages  Class Hierarchy  This Package  Previous  Next  Index