openfuture.bugbase.actions
Class BugBaseAction

java.lang.Object
  |
  +--org.apache.struts.action.Action
        |
        +--openfuture.bugbase.actions.BugBaseAction
All Implemented Interfaces:
JspConstants
Direct Known Subclasses:
GetBugReportAction, LoginAction, LogoffAction, NewBugReportAction, RegistrationAction, SelectLanguageAction, SendMailAction, UpdateBugReportAction, UpdateRegistrationAction, ViewReportsAction

public abstract class BugBaseAction
extends org.apache.struts.action.Action
implements JspConstants

Base action bean.

Created: Mon Jan 22 06:11:28 2001

Version:
$Revision: 1.9 $
Author:
Wolfgang Reissenberger

Fields inherited from class org.apache.struts.action.Action
DATA_SOURCE_KEY, defaultLocale, ERROR_KEY, EXCEPTION_KEY, FORM_BEANS_KEY, FORWARDS_KEY, LOCALE_KEY, MAPPING_KEY, MAPPINGS_KEY, MESSAGES_KEY, MULTIPART_KEY, servlet, SERVLET_KEY, TRANSACTION_TOKEN_KEY
 
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
BugBaseAction()
           
 
Method Summary
protected  boolean checkLogin(javax.servlet.http.HttpServletRequest request)
          Check, if a user object is present in the session context.
 org.apache.struts.action.ActionForward findNextPage(javax.servlet.http.HttpServletRequest request, org.apache.struts.action.ActionMapping mapping)
          Try to forward to the last page visited.
 BugBaseServletClient getClient(javax.servlet.http.HttpServletRequest request)
          Get the value of client.
 LoginManager getLoginManager(javax.servlet.http.HttpServletRequest request)
          Get the value of loginManager.
 MasterDataProvider getMasterDataProvider(javax.servlet.http.HttpServletRequest request)
          Return the value of the masterdata provider.
 java.lang.String getProject(javax.servlet.http.HttpServletRequest request)
          Convenience method for retrieving the stored project object from the session context.
 java.lang.String getQueryString(javax.servlet.http.HttpServletRequest request)
          Convenience method for retrieving the stored query string from the session context.
 java.lang.String getServletPath(javax.servlet.http.HttpServletRequest request)
          Convenience method for retrieving the stored servlet path of the request from the session context.
 User getUser(javax.servlet.http.HttpServletRequest request)
          Convenience method for retrieving the stored user object from the session context.
protected  org.apache.struts.action.ActionErrors initialize(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Initialize the settings.
static void saveOriginalRequest(javax.servlet.http.HttpServletRequest request)
          Save the request URI and the query string.
 void setProject(javax.servlet.http.HttpServletRequest request, java.lang.String project)
          Convenience method for setting the project object into the session context.
 void setUser(javax.servlet.http.HttpServletRequest request, User user)
          Convenience method for setting the user object into the session context.
 
Methods inherited from class org.apache.struts.action.Action
generateToken, getLocale, getResources, getServlet, isCancelled, isTokenValid, perform, perform, perform, perform, resetToken, saveErrors, saveToken, setLocale, setServlet, toHex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BugBaseAction

public BugBaseAction()
Method Detail

initialize

protected org.apache.struts.action.ActionErrors initialize(org.apache.struts.action.ActionMapping mapping,
                                                           org.apache.struts.action.ActionForm form,
                                                           javax.servlet.http.HttpServletRequest request,
                                                           javax.servlet.http.HttpServletResponse response)
Initialize the settings.
Parameters:
mapping - The ActionMapping used to select this instance
form - an ActionForm value
request - The HTTP request we are processing
response - The HTTP response we are creating
Returns:
an ActionForward value

getClient

public BugBaseServletClient getClient(javax.servlet.http.HttpServletRequest request)
Get the value of client.
Parameters:
request - the current HTTP request
Returns:
Value of client.

getLoginManager

public LoginManager getLoginManager(javax.servlet.http.HttpServletRequest request)
Get the value of loginManager.
Parameters:
request - the current HTTP request
Returns:
value of loginManager.

getServletPath

public java.lang.String getServletPath(javax.servlet.http.HttpServletRequest request)
Convenience method for retrieving the stored servlet path of the request from the session context.
Parameters:
request - the current HTTP request
Returns:
the servlet path

getQueryString

public java.lang.String getQueryString(javax.servlet.http.HttpServletRequest request)
Convenience method for retrieving the stored query string from the session context.
Parameters:
request - the current HTTP request
Returns:
the query string

getUser

public User getUser(javax.servlet.http.HttpServletRequest request)
Convenience method for retrieving the stored user object from the session context.
Parameters:
request - the current HTTP request
Returns:
the user object

setUser

public void setUser(javax.servlet.http.HttpServletRequest request,
                    User user)
Convenience method for setting the user object into the session context.
Parameters:
request - the current HTTP request
user - the current user, that has logged in

getProject

public java.lang.String getProject(javax.servlet.http.HttpServletRequest request)
Convenience method for retrieving the stored project object from the session context.
Parameters:
request - the current HTTP request
Returns:
the project object

setProject

public void setProject(javax.servlet.http.HttpServletRequest request,
                       java.lang.String project)
Convenience method for setting the project object into the session context.
Parameters:
request - the current HTTP request
project - the currently selected project

findNextPage

public org.apache.struts.action.ActionForward findNextPage(javax.servlet.http.HttpServletRequest request,
                                                           org.apache.struts.action.ActionMapping mapping)
Try to forward to the last page visited. If none can be determined from getServletPath(HttpServletRequest), the forward defined as default is returned.
Parameters:
request - the current HTTP request
mapping - the current action mapping
Returns:
forward to the last page visited (or the default page, if getServletPath(HttpServletRequest) is null.

checkLogin

protected boolean checkLogin(javax.servlet.http.HttpServletRequest request)
Check, if a user object is present in the session context.
Parameters:
request - the current HTTP request
Returns:
true, iff the object is present.

getMasterDataProvider

public MasterDataProvider getMasterDataProvider(javax.servlet.http.HttpServletRequest request)
Return the value of the masterdata provider.
Parameters:
request - the current HTTP request
Returns:
the masterdata provider

saveOriginalRequest

public static void saveOriginalRequest(javax.servlet.http.HttpServletRequest request)
Save the request URI and the query string. If the query string is empty and the servlet path is equal to the already stored one, the old query string is saved (this is for the case of redirections, where the query string is removed.)
Parameters:
request - the current HTTP request


Copyright © 2000 -- 2003 openfuture.de. All Rights Reserved.