QED Administrator Console

com.quadcap.app.qed.AdminSession Class Reference

List of all members.

Detailed Description

A JavaBean which encapsulates administrative access to QED databases running in this JVM.

Author:
Stan Bailes

Definition at line 75 of file AdminSession.java.

Public Member Functions

 AdminSession ()
 Construct a new admin session.

boolean isAuthenticated ()
 Return true if this session has been authenticated.

void setPage (String page)
 Remember which page we're displaying in the body frame.

String getPage ()
 Return the last page visited in the body frame.

JdbcDriver getDriver ()
 Return the QED JDBC Driver instance.

Enumeration getDatabaseNames ()
 Return an enumeration of strings containing the names of all open databases.

Database getDatabase (String name) throws SQLException
 Return the opened database with the specified name.

Connection getConnection (String name, boolean create, boolean force) throws SQLException
 Return a new connection for the specified database.

Connection getConnection (String name) throws SQLException
 Return a new connection for the specified database.

void handleRequest (HttpServletRequest req) throws ServletException, SQLException
 The main request handler.

Properties getRequestProperties (HttpServletRequest req)
 Build a Properties object containing all of the request parameters.


Static Public Member Functions

String isSel (String sel, String val)
 jsp helper to build radio button checklists.

String isSet (int pos, int val)
 jsp helper to build radio button checklists.

String lz2 (int num)

Package Functions

void closeConnections ()
 Close all open connections held by this session.


Package Attributes

String page = "login.jsp"
JdbcDriver qedDriver = null
boolean isAuthenticated = false
String auth = "admin"
ConfigString adminUser
ConfigString adminPassword
Hashtable connections = new Hashtable()

Static Package Attributes

char[] digits = {'0','1','2','3','4','5','6','7','8','9'}
 jsp helper to format time from backup time (minutes since midnite)


Private Member Functions

Database findDatabase (String name)
 Return the opened database with the specified name.

void login (Properties p)
 Login action.

void open (Properties p) throws SQLException
 Open action.

void close (Properties p)
 Close action.

void logout (Properties p)
 Logout action.


Constructor & Destructor Documentation

com.quadcap.app.qed.AdminSession.AdminSession  ) 
 

Construct a new admin session.

Definition at line 87 of file AdminSession.java.

References com.quadcap.app.qed.AdminSession.adminPassword, com.quadcap.app.qed.AdminSession.adminUser, and com.quadcap.app.qed.AdminSession.isAuthenticated.


Member Function Documentation

void com.quadcap.app.qed.AdminSession.close Properties  p  )  [private]
 

Close action.

Definition at line 293 of file AdminSession.java.

References com.quadcap.app.qed.AdminSession.close(), and com.quadcap.app.qed.AdminSession.connections.

Referenced by com.quadcap.app.qed.AdminSession.close().

void com.quadcap.app.qed.AdminSession.closeConnections  )  [package]
 

Close all open connections held by this session.

Definition at line 214 of file AdminSession.java.

References com.quadcap.app.qed.AdminSession.connections.

Referenced by com.quadcap.app.qed.AdminSession.logout().

Database com.quadcap.app.qed.AdminSession.findDatabase String  name  )  [private]
 

Return the opened database with the specified name.

Definition at line 155 of file AdminSession.java.

References com.quadcap.app.qed.AdminSession.findDatabase(), and com.quadcap.app.qed.AdminSession.getDriver().

Referenced by com.quadcap.app.qed.AdminSession.findDatabase().

Connection com.quadcap.app.qed.AdminSession.getConnection String  name  )  throws SQLException
 

Return a new connection for the specified database.

Definition at line 207 of file AdminSession.java.

Connection com.quadcap.app.qed.AdminSession.getConnection String  name,
boolean  create,
boolean  force
throws SQLException
 

Return a new connection for the specified database.

Definition at line 178 of file AdminSession.java.

References com.quadcap.app.qed.AdminSession.adminPassword, com.quadcap.app.qed.AdminSession.adminUser, com.quadcap.app.qed.AdminSession.auth, com.quadcap.app.qed.AdminSession.connections, com.quadcap.app.qed.AdminSession.getConnection(), and com.quadcap.app.qed.AdminSession.getDriver().

Referenced by com.quadcap.app.qed.AdminSession.getConnection(), com.quadcap.app.qed.AdminSession.getDatabase(), and com.quadcap.app.qed.XmlDumpServlet.service().

Database com.quadcap.app.qed.AdminSession.getDatabase String  name  )  throws SQLException
 

Return the opened database with the specified name.

Definition at line 164 of file AdminSession.java.

References com.quadcap.app.qed.AdminSession.getConnection(), and com.quadcap.app.qed.AdminSession.getDatabase().

Referenced by com.quadcap.app.qed.AdminSession.getDatabase().

Enumeration com.quadcap.app.qed.AdminSession.getDatabaseNames  ) 
 

Return an enumeration of strings containing the names of all open databases.

Definition at line 144 of file AdminSession.java.

References com.quadcap.app.qed.AdminSession.getDriver().

JdbcDriver com.quadcap.app.qed.AdminSession.getDriver  ) 
 

Return the QED JDBC Driver instance.

There should be only one.

Definition at line 120 of file AdminSession.java.

References com.quadcap.app.qed.AdminSession.qedDriver.

Referenced by com.quadcap.app.qed.AdminSession.findDatabase(), com.quadcap.app.qed.AdminSession.getConnection(), and com.quadcap.app.qed.AdminSession.getDatabaseNames().

String com.quadcap.app.qed.AdminSession.getPage  ) 
 

Return the last page visited in the body frame.

Definition at line 115 of file AdminSession.java.

References com.quadcap.app.qed.AdminSession.page.

Properties com.quadcap.app.qed.AdminSession.getRequestProperties HttpServletRequest  req  ) 
 

Build a Properties object containing all of the request parameters.

Parameters:
req the http request
Returns:
the request parameters

Definition at line 355 of file AdminSession.java.

References com.quadcap.app.qed.AdminSession.getRequestProperties().

Referenced by com.quadcap.app.qed.AdminSession.getRequestProperties(), and com.quadcap.app.qed.AdminSession.handleRequest().

void com.quadcap.app.qed.AdminSession.handleRequest HttpServletRequest  req  )  throws ServletException, SQLException
 

The main request handler.

Determine which action is to be invoked and dispatch the appropriate routine.

Parameters:
req the http request
Exceptions:
ServletException may be thrown

Definition at line 324 of file AdminSession.java.

References com.quadcap.app.qed.AdminSession.getRequestProperties(), com.quadcap.app.qed.AdminSession.handleRequest(), and com.quadcap.app.qed.AdminSession.isAuthenticated().

Referenced by com.quadcap.app.qed.AdminSession.handleRequest().

boolean com.quadcap.app.qed.AdminSession.isAuthenticated  ) 
 

Return true if this session has been authenticated.

Definition at line 105 of file AdminSession.java.

Referenced by com.quadcap.app.qed.AdminSession.handleRequest().

String com.quadcap.app.qed.AdminSession.isSel String  sel,
String  val
[static]
 

jsp helper to build radio button checklists.

Definition at line 227 of file AdminSession.java.

References com.quadcap.app.qed.AdminSession.isSel().

Referenced by com.quadcap.app.qed.AdminSession.isSel().

String com.quadcap.app.qed.AdminSession.isSet int  pos,
int  val
[static]
 

jsp helper to build radio button checklists.

Definition at line 238 of file AdminSession.java.

References com.quadcap.app.qed.AdminSession.isSet().

Referenced by com.quadcap.app.qed.AdminSession.isSet().

void com.quadcap.app.qed.AdminSession.login Properties  p  )  [private]
 

Login action.

Definition at line 261 of file AdminSession.java.

References com.quadcap.app.qed.AdminSession.adminPassword, com.quadcap.app.qed.AdminSession.adminUser, and com.quadcap.app.qed.AdminSession.login().

Referenced by com.quadcap.app.qed.AdminSession.login().

void com.quadcap.app.qed.AdminSession.logout Properties  p  )  [private]
 

Logout action.

Definition at line 310 of file AdminSession.java.

References com.quadcap.app.qed.AdminSession.adminUser, com.quadcap.app.qed.AdminSession.closeConnections(), and com.quadcap.app.qed.AdminSession.logout().

Referenced by com.quadcap.app.qed.AdminSession.logout().

String com.quadcap.app.qed.AdminSession.lz2 int  num  )  [static]
 

Definition at line 250 of file AdminSession.java.

References com.quadcap.app.qed.AdminSession.digits, and com.quadcap.app.qed.AdminSession.lz2().

Referenced by com.quadcap.app.qed.AdminSession.lz2().

void com.quadcap.app.qed.AdminSession.open Properties  p  )  throws SQLException [private]
 

Open action.

Definition at line 280 of file AdminSession.java.

References com.quadcap.app.qed.AdminSession.open().

Referenced by com.quadcap.app.qed.AdminSession.open().

void com.quadcap.app.qed.AdminSession.setPage String  page  ) 
 

Remember which page we're displaying in the body frame.

Definition at line 110 of file AdminSession.java.

References com.quadcap.app.qed.AdminSession.setPage().

Referenced by com.quadcap.app.qed.AdminSession.setPage().


Member Data Documentation

ConfigString com.quadcap.app.qed.AdminSession.adminPassword [package]
 

Definition at line 81 of file AdminSession.java.

Referenced by com.quadcap.app.qed.AdminSession.AdminSession(), com.quadcap.app.qed.AdminSession.getConnection(), and com.quadcap.app.qed.AdminSession.login().

ConfigString com.quadcap.app.qed.AdminSession.adminUser [package]
 

Definition at line 80 of file AdminSession.java.

Referenced by com.quadcap.app.qed.AdminSession.AdminSession(), com.quadcap.app.qed.AdminSession.getConnection(), com.quadcap.app.qed.AdminSession.login(), and com.quadcap.app.qed.AdminSession.logout().

String com.quadcap.app.qed.AdminSession.auth = "admin" [package]
 

Definition at line 79 of file AdminSession.java.

Referenced by com.quadcap.app.qed.AdminSession.getConnection().

Hashtable com.quadcap.app.qed.AdminSession.connections = new Hashtable() [package]
 

Definition at line 82 of file AdminSession.java.

Referenced by com.quadcap.app.qed.AdminSession.close(), com.quadcap.app.qed.AdminSession.closeConnections(), and com.quadcap.app.qed.AdminSession.getConnection().

char [] com.quadcap.app.qed.AdminSession.digits = {'0','1','2','3','4','5','6','7','8','9'} [static, package]
 

jsp helper to format time from backup time (minutes since midnite)

Definition at line 249 of file AdminSession.java.

Referenced by com.quadcap.app.qed.AdminSession.lz2().

boolean com.quadcap.app.qed.AdminSession.isAuthenticated = false [package]
 

Definition at line 78 of file AdminSession.java.

Referenced by com.quadcap.app.qed.AdminSession.AdminSession().

String com.quadcap.app.qed.AdminSession.page = "login.jsp" [package]
 

Definition at line 76 of file AdminSession.java.

Referenced by com.quadcap.app.qed.AdminSession.getPage().

JdbcDriver com.quadcap.app.qed.AdminSession.qedDriver = null [package]
 

Definition at line 77 of file AdminSession.java.

Referenced by com.quadcap.app.qed.AdminSession.getDriver().