Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

openfuture.bugbase.servlet
Class BugBaseServletClient  view BugBaseServletClient download BugBaseServletClient.java

java.lang.Object
  extended byopenfuture.bugbase.servlet.BugBaseServletClient

public class BugBaseServletClient
extends java.lang.Object

This class is the proxy to BugBaseServlet. It communicates with serialized objects via HTTP with the servlet.

Created: Sun Feb 06 16:58:12 2000

Version:
$Revision: 1.6 $

Field Summary
private  java.lang.Integer sessionID
           
private  java.net.URL url
           
 
Constructor Summary
BugBaseServletClient(java.lang.String newUrl)
          Creates a new BugBaseServletClient instance.
 
Method Summary
 void addAttachment(java.lang.Integer reportID, java.lang.String attachmentPath)
          Add an attachment to a given bug report
 java.lang.Integer addBugReport(java.lang.String project, openfuture.bugbase.domain.BugReport report)
          Add a new bug report.
 java.lang.Integer addBugReport(java.lang.String project, openfuture.bugbase.domain.BugReport report, java.lang.Integer sessionID)
          Add a new bug report.
 openfuture.bugbase.domain.User adminLogin(openfuture.bugbase.domain.Login login)
          Tries to establish a new connection to the database as administrator.
 void changePassword(openfuture.bugbase.domain.Login login, java.lang.String newPassword)
          Change the current users password.
private  openfuture.bugbase.xobjects.BugBaseQuery createQuery(int queryType, java.util.LinkedList parameter)
          Creates a new query instance and sets its session ID.
 openfuture.bugbase.domain.User doctorLogin(openfuture.bugbase.domain.Login login)
          Tries to establish a new connection to the database as doctor.
private  openfuture.bugbase.xobjects.BugBaseQueryResult doQuery(openfuture.bugbase.xobjects.BugBaseQuery query)
          Execute a query and set the session ID obtained by the query result.
 java.util.LinkedList executeQuery(java.lang.String command)
          Execute a database query.
 java.util.LinkedList getAvailableUpdates()
          Retrieve the list of available updates.
 openfuture.bugbase.domain.BugReport getBugReport(java.lang.Integer id)
          Retrieve a single bug report.
 java.util.LinkedList getBugReportList(java.lang.String project, java.lang.Boolean filterReported, java.lang.Boolean filterStarted, java.lang.Boolean filterFixed, java.lang.Boolean filterRejected, java.lang.String searchString, java.lang.String reporterId, java.lang.String doctorId)
          Retrieve the list of bug reports matching the given criteria.
 java.util.LinkedList getDoctors()
          Retrieve the list of users belonging to the 'doctors' group
 java.util.LinkedList getGroups()
          Retrieve the list of all group IDs
 openfuture.bugbase.xobjects.QueryResultMasterData getMasterData(java.lang.String project)
          Retrieve the list of doctors and project packages
 java.util.LinkedList getPackages(java.lang.String project)
          Retrieve the list of packages for a given project.
 java.util.LinkedList getPackages(java.lang.String project, java.lang.Integer sessionID)
          Retrieves the list of packages for a certain project.
 java.util.LinkedList getProjects()
          Retrieve the list of projects registered at Bug Base.
 java.lang.Integer getSessionID()
          Get the value of sessionID.
 java.util.Hashtable getStatus()
          Retrieve the status information from the BugBaseServlet.
 java.util.LinkedList getUserData()
          Retrieve the list of user data.
 java.util.LinkedList getUserList()
          Retrieve the list of user data except for their passwords.
 openfuture.bugbase.xobjects.QueryResultVersions getVersions()
          Retrieve the versions of the BugBaseServlet, persistency and the available versions from the version manager.
 openfuture.bugbase.domain.User login(openfuture.bugbase.domain.Login login)
          Tries to establish a new connection to the database.
 void saveUserData(java.util.LinkedList users, java.util.LinkedList deleted)
          Save user data.
private  java.io.Serializable service(java.io.Serializable request)
          Execute a query over a HTTP connection.
 void setPackages(java.lang.String project, java.util.LinkedList packages)
          Set the list of packages for a given project
 void setProjects(java.util.LinkedList projects)
          Set the list of projects registered in Bug Base
 void setSessionID(java.lang.Integer v)
          Set the value of sessionID, if either the current session ID is null or the given value is not null.
 java.lang.String test(java.lang.String question)
          Test the connection using a question to the BugBaseServlet.
 void updateBugReport(openfuture.bugbase.domain.User user, openfuture.bugbase.domain.BugReport report)
          Update the given bug report.
 void updateBugReports(openfuture.bugbase.domain.User user, java.util.LinkedList reports, java.lang.Boolean sendEmail)
          Update the given bug report.
 openfuture.bugbase.model.TransactionResult updatePersistency(openfuture.bugbase.model.Version version)
          Update the persistency to a given version.
 boolean validDoctorUser(openfuture.bugbase.domain.User user)
          Check, if the user belongs to the group 'doctors'.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

url

private java.net.URL url

sessionID

private java.lang.Integer sessionID
Constructor Detail

BugBaseServletClient

public BugBaseServletClient(java.lang.String newUrl)
                     throws java.net.MalformedURLException
Creates a new BugBaseServletClient instance.

Method Detail

getBugReportList

public java.util.LinkedList getBugReportList(java.lang.String project,
                                             java.lang.Boolean filterReported,
                                             java.lang.Boolean filterStarted,
                                             java.lang.Boolean filterFixed,
                                             java.lang.Boolean filterRejected,
                                             java.lang.String searchString,
                                             java.lang.String reporterId,
                                             java.lang.String doctorId)
                                      throws openfuture.bugbase.error.BugBaseException
Retrieve the list of bug reports matching the given criteria.


getBugReport

public openfuture.bugbase.domain.BugReport getBugReport(java.lang.Integer id)
                                                 throws openfuture.bugbase.error.BugBaseException
Retrieve a single bug report.


addBugReport

public java.lang.Integer addBugReport(java.lang.String project,
                                      openfuture.bugbase.domain.BugReport report)
                               throws openfuture.bugbase.error.BugBaseException
Add a new bug report. The number of the report is returned.


addBugReport

public java.lang.Integer addBugReport(java.lang.String project,
                                      openfuture.bugbase.domain.BugReport report,
                                      java.lang.Integer sessionID)
                               throws openfuture.bugbase.error.BugBaseException
Add a new bug report. The number of the report is returned.


getProjects

public java.util.LinkedList getProjects()
                                 throws openfuture.bugbase.error.BugBaseException
Retrieve the list of projects registered at Bug Base.


setProjects

public void setProjects(java.util.LinkedList projects)
                 throws openfuture.bugbase.error.BugBaseException
Set the list of projects registered in Bug Base


getPackages

public java.util.LinkedList getPackages(java.lang.String project)
                                 throws openfuture.bugbase.error.BugBaseException
Retrieve the list of packages for a given project.


getPackages

public java.util.LinkedList getPackages(java.lang.String project,
                                        java.lang.Integer sessionID)
                                 throws openfuture.bugbase.error.BugBaseException
Retrieves the list of packages for a certain project.


setPackages

public void setPackages(java.lang.String project,
                        java.util.LinkedList packages)
                 throws openfuture.bugbase.error.BugBaseException
Set the list of packages for a given project


getDoctors

public java.util.LinkedList getDoctors()
                                throws openfuture.bugbase.error.BugBaseException
Retrieve the list of users belonging to the 'doctors' group


updateBugReports

public void updateBugReports(openfuture.bugbase.domain.User user,
                             java.util.LinkedList reports,
                             java.lang.Boolean sendEmail)
                      throws openfuture.bugbase.error.BugBaseException
Update the given bug report. if sendEmail is true, the bug reporter will be notified via email about the changes.


updateBugReport

public void updateBugReport(openfuture.bugbase.domain.User user,
                            openfuture.bugbase.domain.BugReport report)
                     throws openfuture.bugbase.error.BugBaseException
Update the given bug report.


executeQuery

public java.util.LinkedList executeQuery(java.lang.String command)
                                  throws openfuture.bugbase.error.BugBaseException
Execute a database query.


getVersions

public openfuture.bugbase.xobjects.QueryResultVersions getVersions()
                                                            throws openfuture.bugbase.error.BugBaseException
Retrieve the versions of the BugBaseServlet, persistency and the available versions from the version manager.


getAvailableUpdates

public java.util.LinkedList getAvailableUpdates()
                                         throws openfuture.bugbase.error.BugBaseException
Retrieve the list of available updates.


updatePersistency

public openfuture.bugbase.model.TransactionResult updatePersistency(openfuture.bugbase.model.Version version)
                                                             throws openfuture.bugbase.error.BugBaseException
Update the persistency to a given version.


getUserData

public java.util.LinkedList getUserData()
                                 throws openfuture.bugbase.error.BugBaseException
Retrieve the list of user data. This method may only be used by admin users.


getUserList

public java.util.LinkedList getUserList()
                                 throws openfuture.bugbase.error.BugBaseException
Retrieve the list of user data except for their passwords. This method may be executed by ordinary users.


getGroups

public java.util.LinkedList getGroups()
                               throws openfuture.bugbase.error.BugBaseException
Retrieve the list of all group IDs


saveUserData

public void saveUserData(java.util.LinkedList users,
                         java.util.LinkedList deleted)
                  throws openfuture.bugbase.error.BugBaseException
Save user data. Update only dirty users. The users from deleted are deleted.


test

public java.lang.String test(java.lang.String question)
                      throws openfuture.bugbase.error.BugBaseException
Test the connection using a question to the BugBaseServlet.


getMasterData

public openfuture.bugbase.xobjects.QueryResultMasterData getMasterData(java.lang.String project)
                                                                throws openfuture.bugbase.error.BugBaseException
Retrieve the list of doctors and project packages


login

public openfuture.bugbase.domain.User login(openfuture.bugbase.domain.Login login)
                                     throws openfuture.bugbase.error.BugBaseException
Tries to establish a new connection to the database.


adminLogin

public openfuture.bugbase.domain.User adminLogin(openfuture.bugbase.domain.Login login)
                                          throws openfuture.bugbase.error.BugBaseException
Tries to establish a new connection to the database as administrator.


doctorLogin

public openfuture.bugbase.domain.User doctorLogin(openfuture.bugbase.domain.Login login)
                                           throws openfuture.bugbase.error.BugBaseException
Tries to establish a new connection to the database as doctor.


validDoctorUser

public boolean validDoctorUser(openfuture.bugbase.domain.User user)
Check, if the user belongs to the group 'doctors'.


changePassword

public void changePassword(openfuture.bugbase.domain.Login login,
                           java.lang.String newPassword)
                    throws openfuture.bugbase.error.BugBaseException
Change the current users password.


addAttachment

public void addAttachment(java.lang.Integer reportID,
                          java.lang.String attachmentPath)
                   throws openfuture.bugbase.error.BugBaseException
Add an attachment to a given bug report


getStatus

public java.util.Hashtable getStatus()
                              throws openfuture.bugbase.error.BugBaseException
Retrieve the status information from the BugBaseServlet.


doQuery

private openfuture.bugbase.xobjects.BugBaseQueryResult doQuery(openfuture.bugbase.xobjects.BugBaseQuery query)
                                                        throws openfuture.bugbase.error.BugBaseException
Execute a query and set the session ID obtained by the query result.


createQuery

private openfuture.bugbase.xobjects.BugBaseQuery createQuery(int queryType,
                                                             java.util.LinkedList parameter)
Creates a new query instance and sets its session ID.


service

private java.io.Serializable service(java.io.Serializable request)
                              throws openfuture.bugbase.error.BugBaseException
Execute a query over a HTTP connection. Both the query and the query result are serialized.


getSessionID

public java.lang.Integer getSessionID()
Get the value of sessionID.


setSessionID

public void setSessionID(java.lang.Integer v)
Set the value of sessionID, if either the current session ID is null or the given value is not null.