org.experlog.openeas.api
Class Session

java.lang.Object
  extended byorg.experlog.openeas.api.Session

public class Session
extends java.lang.Object

A web client session


Constructor Summary
protected Session(org.experlog.util.Client s)
           
 
Method Summary
 void closeConnection(java.sql.Connection c, java.lang.String dsn)
           
 void debug(java.lang.String msg)
           
static Session findClient(java.lang.String id)
           
 AppConfiguration getAppConfiguration()
          Get the shop configuration
 java.lang.String getClientId()
          Get the session Id (to recognize who is connected)
 java.sql.Connection getConnection(java.lang.String datasourcename)
           
 Cookie getCookie()
          Get the client info
 void logRequest(java.lang.String dsn, java.lang.String request)
           
 DbObject newDbObject(java.lang.String table, java.sql.ResultSet rs)
           
 void resetTimer()
           
 void setAdministrator(boolean adm)
           
 java.lang.String sqlEncode(java.lang.String s)
           
 java.lang.String sqlEncode(java.lang.String datasourcename, java.lang.String s)
           
 void trace(java.lang.String msg)
           
 void updateDB(java.lang.String sql)
          Update the store's database
 void updateDB(java.lang.String datasourcename, java.lang.String sql)
          Update the store's database
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Session

protected Session(org.experlog.util.Client s)
Method Detail

newDbObject

public DbObject newDbObject(java.lang.String table,
                            java.sql.ResultSet rs)
                     throws java.sql.SQLException
Throws:
java.sql.SQLException

getAppConfiguration

public AppConfiguration getAppConfiguration()
Get the shop configuration


getCookie

public Cookie getCookie()
Get the client info

Returns:
The current client info.

getClientId

public java.lang.String getClientId()
Get the session Id (to recognize who is connected)

Returns:
The session id (a String that identifies the client).

findClient

public static Session findClient(java.lang.String id)

getConnection

public java.sql.Connection getConnection(java.lang.String datasourcename)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

closeConnection

public void closeConnection(java.sql.Connection c,
                            java.lang.String dsn)
                     throws java.sql.SQLException
Throws:
java.sql.SQLException

logRequest

public void logRequest(java.lang.String dsn,
                       java.lang.String request)

updateDB

public void updateDB(java.lang.String sql)
              throws java.sql.SQLException,
                     java.lang.Exception
Update the store's database

Throws:
java.sql.SQLException
java.lang.Exception

updateDB

public void updateDB(java.lang.String datasourcename,
                     java.lang.String sql)
              throws java.sql.SQLException,
                     java.lang.Exception
Update the store's database

Throws:
java.sql.SQLException
java.lang.Exception

debug

public void debug(java.lang.String msg)

trace

public void trace(java.lang.String msg)

sqlEncode

public java.lang.String sqlEncode(java.lang.String s)

sqlEncode

public java.lang.String sqlEncode(java.lang.String datasourcename,
                                  java.lang.String s)

setAdministrator

public void setAdministrator(boolean adm)

resetTimer

public void resetTimer()