java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
openfuture.bugbase.servlet.BugBaseServlet
- All Implemented Interfaces:
- openfuture.bugbase.model.JspConstants, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- public class BugBaseServlet
- extends javax.servlet.http.HttpServlet
- implements openfuture.bugbase.model.JspConstants
Main servlet handling the access to the Bug Base Database. It should
not be used directly but only with the corresponding
proxy.
This servlet expects a
openfuture.bugbase.xobjects.BugBaseQuery
serialized request object
in the HTTP request. Depending upon the
query type 55
is the behaviour of the servlet. It executes the desired query and
returns the result wrapped into a
query result object.
Created: Sun Feb 06 22:45:01 2000
- Version:
- $Revision: 1.7 $
Fields inherited from class javax.servlet.http.HttpServlet |
|
Fields inherited from interface openfuture.bugbase.model.JspConstants |
ATTACHMENT_DIR, ATTACHMENT_URL, BUG_REPORT, BUGBASE_SERVLET, LOCALES, LOGIN_MANAGER, MAILSERVER, MD_PROVIDER, NEXT_PAGE, PACKAGES, PROJECT, QUERY, QUERYSTRING, REPORTS, RESULT, SENDMAIL, SERVLET_CLIENT, SERVLETPATH, USER_ID |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
USER
private static java.lang.String USER
persistency
private openfuture.bugbase.domain.Persistency persistency
version
private BugBaseServletVersion version
versionManager
private openfuture.bugbase.domain.VersionManager versionManager
dbURL
private java.lang.String dbURL
dbServer
private java.lang.String dbServer
mailServer
private java.lang.String mailServer
BugBaseServlet
public BugBaseServlet()
init
public void init(javax.servlet.ServletConfig config)
- Initializes the servlet. The following initialization
parameters are recognized:
- db.url: Database URL to the
of BugBaseServlet.
[Default: http://localhost:8080/bugbase/servlet/HypersonicDBServlet]
- db.server: Class name of the database server.
[Default: openfuture.util.database.HyperSQLServer]
- db.user: User for the connection to the database.
[Default: sa]
- db.password: Password for the connection
to the database.
[Default: <empty string>]
- openfuture.bugbase.mail.server:
Mail server for delivering emails to bug report authors.
[Default: attachments]
If the initialization failed, please visit the servlet container log file.
- Specified by:
init
in interface javax.servlet.Servlet
service
public void service(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res)
- Reads the query object
from the HTTP stream and calls
handleMessage(BugBaseQuery) 55 . The
result
is serialized and returned to the HTTP stream.
- Specified by:
service
in interface javax.servlet.Servlet
handleMessage
protected java.io.Serializable handleMessage(openfuture.bugbase.xobjects.BugBaseQuery query)
- This is the central dispatcher. Depending upon the
query type
is the behaviour of the servlet. It executes the desired query and
returns the result wrapped into a
result object.
checkGroup
public static void checkGroup(openfuture.bugbase.model.Session session,
java.lang.String group)
throws openfuture.bugbase.error.BugBaseException
- Check, if the user of the session belongs to the given group.
logException
public void logException(java.lang.Exception e)
- Write an exception to the log file of the servlet
container.
testNotNull
protected java.lang.String testNotNull(java.lang.Object o,
java.lang.String resultOK)
- Test, if the object
o
is not null
.
In this case, resultOK
is returned, otherwise
the warning message:
null.