All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class oncore.InstrSession

java.lang.Object
   |
   +----oncore.Session
           |
           +----oncore.InstrSession

public class InstrSession
extends Session
Class models instructor's session. This class has session as the base class.


Constructor Index

 o InstrSession(HttpServletRequest, Connection)
Constructor for the class InstrSession.

Method Index

 o printFirst(PrintWriter)
Method to print the first page for instructor.
 o processQuery(HttpServletRequest, PrintWriter)
Method to process a query from an html form.

Constructors

 o InstrSession
 public InstrSession(HttpServletRequest req,
                     Connection con) throws ValidationException, SQLException
Constructor for the class InstrSession. This constructor executes a query on database to precompute and store all course numbers and course names in vectors.

Parameters:
req - This is HttpServletRequest got by doPost.
con - This is database connection established by init of servlet.
Throws: ValidationException
Thrown when can't authenticate
Throws: SQLException
Thrown when some database problem occurs

Methods

 o printFirst
 public void printFirst(PrintWriter out) throws SQLException
Method to print the first page for instructor. This method does SQL querying and collects all the data and presents it in html form. This method is called in processQuery and also when the instructor logs in for the first time.

Parameters:
out - PrintWriter to write output html to.
Throws: SQLException
Thrown when some database problems occur.
Overrides:
printFirst in class Session
 o processQuery
 public void processQuery(HttpServletRequest req,
                          PrintWriter out) throws SQLException
Method to process a query from an html form. This method is called every time some update query is sent by instructor. This method does updates and deletes on database and then calls printFirst to show the page.

Parameters:
req - The HttpServletRequest got by method doPost in servlet
out - PrintWriter to output html page. this is only passed to printFirst.
Overrides:
processQuery in class Session

All Packages  Class Hierarchy  This Package  Previous  Next  Index