|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.servlet.GenericServlet | +--javax.servlet.http.HttpServlet | +--openfuture.bugbase.servlet.BugBaseServlet
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
is the behaviour of the servlet. It executes the desired query and
returns the result wrapped into a
query result object
.
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, USER_ID |
Constructor Summary | |
BugBaseServlet()
|
Method Summary | |
static void |
checkGroup(Session session,
java.lang.String group)
Check, if the user of the session belongs to the given group. |
java.util.ResourceBundle |
getResourceBundle()
Get the value of resourceBundle. |
static User |
getUser(Session session)
Retrieve the user object from the current session. |
protected java.io.Serializable |
handleMessage(BugBaseQuery query)
This is the central dispatcher. |
void |
init(javax.servlet.ServletConfig config)
Initializes the servlet. |
void |
logException(java.lang.Exception e)
Write an exception to the log file of the servlet container. |
void |
logException(I18NException e)
Write an exception to the log file of the servlet container. |
void |
service(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res)
Reads the query object
from the HTTP stream and calls
handleMessage(BugBaseQuery) . |
void |
setResourceBundle(java.util.ResourceBundle v)
Set the value of resourceBundle. |
protected java.lang.String |
testNotNull(java.lang.Object o,
java.lang.String resultOK)
Test, if the object o is not null .
|
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service |
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BugBaseServlet()
Method Detail |
public void init(javax.servlet.ServletConfig config)
BugBaseServlet
.If the initialization failed, please visit the servlet container log file.
init
in class javax.servlet.GenericServlet
config
- a ServletConfig
valuepublic void service(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res)
query object
from the HTTP stream and calls
handleMessage(BugBaseQuery)
. The
result
is serialized and returned to the HTTP stream.service
in class javax.servlet.http.HttpServlet
req
- HTTP requestres
- HTTP responseprotected java.io.Serializable handleMessage(BugBaseQuery query)
query type
is the behaviour of the servlet. It executes the desired query and
returns the result wrapped into a
result object
.query
- query objectpublic static void checkGroup(Session session, java.lang.String group) throws I18NException
session
- current sessiongroup
- group IDI18NException
- if the user does not belong to the
given group.public static User getUser(Session session) throws I18NException
session
- the sessionI18NException
- if session
is null
or the session's user attribute
is null
.public void logException(I18NException e)
e
- exception to be loggedpublic void logException(java.lang.Exception e)
e
- exception to be loggedprotected java.lang.String testNotNull(java.lang.Object o, java.lang.String resultOK)
o
is not null
.
In this case, resultOK
is returned, otherwise
the warning message:
null.o
- object to be testedresultOK
- result stringpublic java.util.ResourceBundle getResourceBundle()
public void setResourceBundle(java.util.ResourceBundle v)
v
- Value to assign to resourceBundle.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |