All Packages Class Hierarchy This Package Previous Next Index
Class oncore.Session
java.lang.Object
|
+----oncore.Session
- public abstract class Session
- extends Object
Class to model a generic session for student, instructor and faculty
advisor. This class abstarcts out the authentication procedure which is
common to all of the sessions.
-
Session(HttpServletRequest, Connection)
- Constructor initializes variables and also authenticates the user of
the session.
-
printFirst(PrintWriter)
- Method which will be called to print the html page for that particular
session.
-
processQuery(HttpServletRequest, PrintWriter)
- Method which processes query submitted by the user.
Session
public Session(HttpServletRequest req,
Connection con) throws ValidationException
- Constructor initializes variables and also authenticates the user of
the session. For authentication it uses Validator class.
- Parameters:
- req - HttpServletRequest object got by method doPost. This will be
used by the constructor to find out user name and passowrd in the form.
- con - DataBase connection
- Throws: ValidationException
- Thrown if user cannot be authenticated.
printFirst
public abstract void printFirst(PrintWriter out) throws SQLException
- Method which will be called to print the html page for that particular
session. This method is implemented in the subclasses of this class.
This method will be directly called first time user logs in and
afterwards from the method processQuery to print the html.
- Parameters:
- out - This is used to print the html contents of the page, which
are passed back to the http server / servlet engine.
- Throws: SQLException
- thrown if there is some problem with database
query,...
processQuery
public abstract void processQuery(HttpServletRequest req,
PrintWriter out) throws SQLException
- Method which processes query submitted by the user. After processing
the query it may use ( in fact it uses ) the method printFirst to
actually display the results back.
- Parameters:
- req - HttpServletRequest object received by doPost. This is used
to extract the form fields. This way the method doPost doesn't have to
know what fields to expect and where to pass them.
- Throws: SQLException
- thrown if there is some problem with database
query,...
All Packages Class Hierarchy This Package Previous Next Index