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