![]() |
Quadcap Bug Database |
Inheritance diagram for com.quadcap.app.bugdb.BugSession:

JSP pages use methods of this bean to perform the various functions of the bug database application.
Definition at line 78 of file BugSession.java.
Public Member Functions | |
| BugSession () | |
| Create a new session. | |
| Connection | getConnection () throws SQLException |
| Return the JDBC connection for this session. | |
| void | valueBound (HttpSessionBindingEvent event) |
| This application object has just been bound into an HttpSession. | |
| void | valueUnbound (HttpSessionBindingEvent event) |
| This application object has just been removed from an HttpSession. | |
| boolean | isUser () |
| Is this session associated with a valid user? | |
| boolean | isDeveloper () |
| Is this session associated with a user with 'developer' privileges? | |
| boolean | isManager () |
| Is this session associated with a user with 'manager' privileges? | |
| boolean | isAdmin () |
| Is this session associated with a user with 'administrator' privileges? | |
| String | getQuery (String name) throws ServletException |
| Return the saved bug search query with the specified name. | |
| void | saveQuery (String name, String query) throws ServletException |
| Save a bug search query. | |
| boolean | logout (Properties props) |
| Execute the 'logout' action. | |
| boolean | login (Properties props) throws SQLException |
| Execute the 'login' action. | |
| boolean | addUser (Properties props) throws SQLException, ServletException |
| Execute the 'addUser' action. | |
| boolean | updateUser (Properties p) throws SQLException |
| Execute the 'updateUser' action. | |
| boolean | deleteUser (Properties p) throws SQLException |
| Execute the 'deleteUser' action. | |
| String | listOptions (String type) throws ServletException |
Generate an HTML <SELECT> element listing all elements in the specified table. | |
| String | listOptions (String type, String sel) throws ServletException |
Generate an HTML <SELECT> element listing all elements in the specified table. | |
| String | listOptions (String table, String type, String sel) throws ServletException |
Generate an HTML <SELECT> element listing all elements in the specified table. | |
| String | listOptions (String seltype, String table, String type, String sel) throws ServletException |
Generate an HTML <SELECT> element listing all elements in the specified table. | |
| String | listUsers (String type, String sel) throws ServletException |
Generate an HTML <SELECT> element listing all users. | |
| String | getComponentOwner (String component) throws SQLException, ServletException |
| Return the name of the user who owns the specified component. | |
| boolean | addBug (Properties props) throws ServletException |
| Execute the 'addBug' action. | |
| boolean | updateBug (Properties props) throws ServletException |
| Execute the 'updateBug' action. | |
| final String | urlDecode (String s) |
| Utility to do URL decoding without any exception handling. | |
| Vector | searchBugs (String query, String ob) throws ServletException |
| Perform the bug search operation. | |
| Vector | getUsers () throws SQLException |
| Return a list of valid users, as a Vector of Properties objects, where each Hashtable object contains all of the user's properties (except the password!). | |
| Vector | getProjects () throws SQLException |
| Return a list of valid project/components, as a Vector of Hashtable objects, where each Hashtable object contains all of the user's properties (except the password!). | |
| Hashtable | getUser (String user) throws SQLException |
| Return the properties for a single user. | |
| Hashtable | getProject (String user) throws SQLException |
| Return the properties for a single component. | |
| boolean | newProject (Properties p) throws SQLException |
| Execute the 'newProject' action. | |
| boolean | updateProject (Properties p) throws SQLException |
| Execute the 'updateProject' action. | |
| boolean | deleteProject (Properties p) throws SQLException |
| Execute the 'deleteProject' action. | |
| Hashtable | getBug (String bug_id) throws ServletException |
| Return the current information and history for the specified bug. | |
| String | htmlEncode (String s) |
| Replace occurrences of <, >, and & with their HTML entity-representation equivalents. | |
| 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. | |
Package Functions | |
| int | getNextId (String type) throws SQLException |
| Return the next integer in the specified sequence. | |
| int | getBugHistSize (int bug_id) throws SQLException |
| Return the number of records in the bug history for the specified bug. | |
| final Hashtable | getProps (ResultSet rs) throws SQLException |
| Turn the current row in the result set into a Hashtable. | |
| Hashtable | diffProps (Hashtable a, Hashtable b) |
| Given two bug history records, return a hashtable containing entries for each field which changed between the two records. | |
Static Package Functions | |
| int | getInt (Properties props, String name) throws ServletException |
| Return an integer valued property. | |
| String | getString (Properties props, String name) |
| Return a string-valued property. | |
| final java.sql.Timestamp | now () |
| Make a sql timestamp value representing the current time. | |
| [static initializer] | |
Package Attributes | |
| Connection | conn |
| String | me = "nobody" |
| My user name. | |
| String | my_person_type = null |
| boolean | isAdmin = false |
| boolean | isManager = false |
| boolean | isDeveloper = false |
| boolean | isUser = false |
| Vector | debug_history = new Vector() |
| PreparedStatement | getComponentOwner |
| PreparedStatement | insertBugHist |
| PreparedStatement | insertPerson |
| PreparedStatement | getBugHist |
| PreparedStatement | getBug |
| PreparedStatement | getQuery |
| PreparedStatement | saveQuery |
| PreparedStatement | getUser |
| PreparedStatement | updateUser |
| PreparedStatement | deleteUser |
| PreparedStatement | getProject |
| PreparedStatement | newProject |
| PreparedStatement | deleteProject |
| PreparedStatement | updateProject |
| final String | driverName = "com.quadcap.jdbc.JdbcDriver" |
| final String | dbUrl = "jdbc:qed:bugdb;create=true" |
| final String | dbUser = "bugdb" |
| final String | dbPass = "bugdb" |
Static Package Attributes | |
| Object | lock = new Object() |
| Hashtable | nonDeltas = new Hashtable() |
| The properties that we ignore when computing deltas between successive bug history records. | |
Private Member Functions | |
| final void | prepareStatements () throws SQLException |
| Prepare the various SQL statements we'll be using. | |
| final void | checkSchema () throws SQLException |
| Check to make sure the database schema exists. | |
|
|
Create a new session.
Definition at line 117 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.checkSchema(), com.quadcap.app.bugdb.BugSession.driverName, com.quadcap.app.bugdb.BugSession.getConnection(), and com.quadcap.app.bugdb.BugSession.prepareStatements(). |
|
|
|
|
|
Execute the 'addBug' action.
Definition at line 695 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.addBug(), com.quadcap.app.bugdb.BugSession.conn, com.quadcap.app.bugdb.BugSession.insertBugHist, com.quadcap.app.bugdb.BugSession.isUser(), com.quadcap.app.bugdb.BugSession.me, and com.quadcap.app.bugdb.BugSession.now(). Referenced by com.quadcap.app.bugdb.BugSession.addBug(). |
|
|
Execute the 'addUser' action.
Definition at line 451 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.addUser(), com.quadcap.app.bugdb.BugSession.getString(), and com.quadcap.app.bugdb.BugSession.insertPerson. Referenced by com.quadcap.app.bugdb.BugSession.addUser(). |
|
|
Check to make sure the database schema exists.
If not, load it from the
Definition at line 225 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.conn, com.quadcap.app.bugdb.Loader.loadStream(), com.quadcap.app.bugdb.BugSession.lock, and com.quadcap.app.bugdb.Loader.setConnection(). Referenced by com.quadcap.app.bugdb.BugSession.BugSession(). |
|
|
Execute the 'deleteProject' action.
Definition at line 1026 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.deleteProject. |
|
|
Execute the 'deleteUser' action.
Definition at line 518 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.deleteUser. |
|
||||||||||||
|
Given two bug history records, return a hashtable containing entries for each field which changed between the two records.
Definition at line 1052 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.diffProps(), and com.quadcap.app.bugdb.BugSession.nonDeltas. Referenced by com.quadcap.app.bugdb.BugSession.diffProps(). |
|
|
Return the current information and history for the specified bug.
Definition at line 1084 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.getBug. |
|
|
Return the number of records in the bug history for the specified bug.
Definition at line 414 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.getBugHist, and com.quadcap.app.bugdb.BugSession.getBugHistSize(). Referenced by com.quadcap.app.bugdb.BugSession.getBugHistSize(). |
|
|
Return the name of the user who owns the specified component.
Definition at line 635 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.getComponentOwner. |
|
|
Return the JDBC connection for this session.
Definition at line 136 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.conn, com.quadcap.app.bugdb.BugSession.dbPass, com.quadcap.app.bugdb.BugSession.dbUrl, and com.quadcap.app.bugdb.BugSession.dbUser. Referenced by com.quadcap.app.bugdb.BugSession.BugSession(), and com.quadcap.app.bugdb.BugSession.login(). |
|
||||||||||||
|
Return an integer valued property.
Definition at line 663 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.getInt(). Referenced by com.quadcap.app.bugdb.BugSession.getInt(). |
|
|
Return the next integer in the specified sequence.
Definition at line 383 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.conn, and com.quadcap.app.bugdb.BugSession.getNextId(). Referenced by com.quadcap.app.bugdb.BugSession.getNextId(). |
|
|
Return the properties for a single component.
Definition at line 960 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.getProject. |
|
|
Return a list of valid project/components, as a Vector of Hashtable objects, where each Hashtable object contains all of the user's properties (except the password!).
Definition at line 910 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.conn. |
|
|
Turn the current row in the result set into a Hashtable.
Definition at line 862 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.getProps(). Referenced by com.quadcap.app.bugdb.BugSession.getProps(). |
|
|
Return the saved bug search query with the specified name.
Definition at line 281 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.getQuery, and com.quadcap.app.bugdb.BugSession.me. |
|
|
Build a Properties object containing all of the request parameters.
Definition at line 1202 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.getRequestProperties(). Referenced by com.quadcap.app.bugdb.BugSession.getRequestProperties(), and com.quadcap.app.bugdb.BugSession.handleRequest(). |
|
||||||||||||
|
Return a string-valued property.
Definition at line 680 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.getString(). Referenced by com.quadcap.app.bugdb.BugSession.addUser(), com.quadcap.app.bugdb.BugSession.getString(), and com.quadcap.app.bugdb.BugSession.login(). |
|
|
Return the properties for a single user.
Definition at line 936 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.getUser. |
|
|
Return a list of valid users, as a Vector of Properties objects, where each Hashtable object contains all of the user's properties (except the password!).
Definition at line 881 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.conn. |
|
|
The main request handler. Determine which action is to be invoked and dispatch the appropriate routine.
Definition at line 1148 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.getRequestProperties(), com.quadcap.app.bugdb.BugSession.handleRequest(), and com.quadcap.app.bugdb.BugSession.isUser(). Referenced by com.quadcap.app.bugdb.BugSession.handleRequest(). |
|
|
Replace occurrences of <, >, and & with their HTML entity-representation equivalents.
Definition at line 1125 of file BugSession.java. References com.quadcap.app.bugdb.HtmlWriter.flush(), com.quadcap.app.bugdb.BugSession.htmlEncode(), and com.quadcap.app.bugdb.HtmlWriter.write(). Referenced by com.quadcap.app.bugdb.BugSession.htmlEncode(). |
|
|
Is this session associated with a user with 'administrator' privileges?
Definition at line 271 of file BugSession.java. |
|
|
Is this session associated with a user with 'developer' privileges?
Definition at line 257 of file BugSession.java. |
|
|
Is this session associated with a user with 'manager' privileges?
Definition at line 264 of file BugSession.java. |
|
|
Is this session associated with a valid user?
Definition at line 250 of file BugSession.java. Referenced by com.quadcap.app.bugdb.BugSession.addBug(), com.quadcap.app.bugdb.BugSession.handleRequest(), and com.quadcap.app.bugdb.BugSession.updateBug(). |
|
||||||||||||||||||||
|
Generate an HTML
Definition at line 578 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.conn. |
|
||||||||||||||||
|
Generate an HTML
Definition at line 562 of file BugSession.java. |
|
||||||||||||
|
Generate an HTML
Definition at line 546 of file BugSession.java. |
|
|
Generate an HTML
Definition at line 531 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.listOptions(). Referenced by com.quadcap.app.bugdb.BugSession.listOptions(). |
|
||||||||||||
|
Generate an HTML
Definition at line 623 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.listUsers(). Referenced by com.quadcap.app.bugdb.BugSession.listUsers(). |
|
|
Execute the 'login' action.
Definition at line 349 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.conn, com.quadcap.app.bugdb.BugSession.getConnection(), com.quadcap.app.bugdb.BugSession.getString(), com.quadcap.app.bugdb.BugSession.login(), com.quadcap.app.bugdb.BugSession.me, and com.quadcap.app.bugdb.BugSession.my_person_type. Referenced by com.quadcap.app.bugdb.BugSession.login(). |
|
|
Execute the 'logout' action.
Definition at line 326 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.conn, com.quadcap.app.bugdb.BugSession.logout(), and com.quadcap.app.bugdb.BugSession.me. Referenced by com.quadcap.app.bugdb.BugSession.logout(), and com.quadcap.app.bugdb.BugSession.valueUnbound(). |
|
|
Execute the 'newProject' action.
Definition at line 987 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.newProject. |
|
|
Make a sql timestamp value representing the current time.
Definition at line 782 of file BugSession.java. Referenced by com.quadcap.app.bugdb.BugSession.addBug(), and com.quadcap.app.bugdb.BugSession.updateBug(). |
|
|
Prepare the various SQL statements we'll be using.
Definition at line 178 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.conn, com.quadcap.app.bugdb.BugSession.deleteProject, com.quadcap.app.bugdb.BugSession.deleteUser, com.quadcap.app.bugdb.BugSession.getBug, com.quadcap.app.bugdb.BugSession.getBugHist, com.quadcap.app.bugdb.BugSession.getComponentOwner, com.quadcap.app.bugdb.BugSession.getProject, com.quadcap.app.bugdb.BugSession.getQuery, com.quadcap.app.bugdb.BugSession.getUser, com.quadcap.app.bugdb.BugSession.insertBugHist, com.quadcap.app.bugdb.BugSession.insertPerson, com.quadcap.app.bugdb.BugSession.newProject, com.quadcap.app.bugdb.BugSession.saveQuery, com.quadcap.app.bugdb.BugSession.updateProject, and com.quadcap.app.bugdb.BugSession.updateUser. Referenced by com.quadcap.app.bugdb.BugSession.BugSession(). |
|
||||||||||||
|
Save a bug search query.
Definition at line 308 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.me, and com.quadcap.app.bugdb.BugSession.saveQuery. |
|
||||||||||||
|
Perform the bug search operation.
Definition at line 813 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.conn, and com.quadcap.app.bugdb.BugSession.searchBugs(). Referenced by com.quadcap.app.bugdb.BugSession.searchBugs(). |
|
|
Execute the 'updateBug' action.
Definition at line 746 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.insertBugHist, com.quadcap.app.bugdb.BugSession.isUser(), com.quadcap.app.bugdb.BugSession.me, com.quadcap.app.bugdb.BugSession.now(), and com.quadcap.app.bugdb.BugSession.updateBug(). Referenced by com.quadcap.app.bugdb.BugSession.updateBug(). |
|
|
Execute the 'updateProject' action.
Definition at line 1004 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.updateProject. |
|
|
Execute the 'updateUser' action.
Definition at line 492 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.updateUser. |
|
|
Utility to do URL decoding without any exception handling. Lazy bastard.
Definition at line 792 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.urlDecode(). Referenced by com.quadcap.app.bugdb.BugSession.urlDecode(). |
|
|
This application object has just been bound into an HttpSession.
Definition at line 154 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.valueBound(). Referenced by com.quadcap.app.bugdb.BugSession.valueBound(). |
|
|
This application object has just been removed from an HttpSession.
Definition at line 165 of file BugSession.java. References com.quadcap.app.bugdb.BugSession.conn, com.quadcap.app.bugdb.BugSession.logout(), and com.quadcap.app.bugdb.BugSession.valueUnbound(). Referenced by com.quadcap.app.bugdb.BugSession.valueUnbound(). |
|
|
|
Definition at line 112 of file BugSession.java. Referenced by com.quadcap.app.bugdb.BugSession.getConnection(). |
|
|
Definition at line 110 of file BugSession.java. Referenced by com.quadcap.app.bugdb.BugSession.getConnection(). |
|
|
Definition at line 111 of file BugSession.java. Referenced by com.quadcap.app.bugdb.BugSession.getConnection(). |
|
|
Definition at line 92 of file BugSession.java. |
|
|
Definition at line 106 of file BugSession.java. Referenced by com.quadcap.app.bugdb.BugSession.deleteProject(), and com.quadcap.app.bugdb.BugSession.prepareStatements(). |
|
|
Definition at line 103 of file BugSession.java. Referenced by com.quadcap.app.bugdb.BugSession.deleteUser(), and com.quadcap.app.bugdb.BugSession.prepareStatements(). |
|
|
Definition at line 109 of file BugSession.java. Referenced by com.quadcap.app.bugdb.BugSession.BugSession(). |
|
|
Definition at line 98 of file BugSession.java. Referenced by com.quadcap.app.bugdb.BugSession.getBug(), and com.quadcap.app.bugdb.BugSession.prepareStatements(). |
|
|
Definition at line 97 of file BugSession.java. Referenced by com.quadcap.app.bugdb.BugSession.getBugHistSize(), and com.quadcap.app.bugdb.BugSession.prepareStatements(). |
|