| org.apache.struts.actions.MappingDispatchAction org.apache.struts.apps.mailreader.actions.BaseAction
All known Subclasses: org.apache.struts.apps.mailreader.actions.LogonAction, org.apache.struts.apps.mailreader.actions.SubscriptionAction, org.apache.struts.apps.mailreader.actions.LocaleAction, org.apache.struts.apps.mailreader.actions.MainMenuAction, org.apache.struts.apps.mailreader.actions.LogoffAction, org.apache.struts.apps.mailreader.actions.WelcomeAction, org.apache.struts.apps.mailreader.actions.RegistrationAction,
BaseAction | abstract public class BaseAction extends MappingDispatchAction (Code) | |
Base Action for MailReader application.
All the BaseAction helper methods are prefixed with "do"
so that they can be easily distinguished from Struts and Servlet API methods.
BaseAction subclasses may also have prive "do" helpers of their own.
Methods are kept in alphabetical order, to make them easier to find.
version: $Rev: 471754 $ $Date: 2006-11-06 08:55:09 -0600 (Mon, 06 Nov 2006) $ |
Field Summary | |
public static String | PASSWORD
Name of password field ["password"]. | final public static String | TASK
Name of task field ["task"]. | public static String | USERNAME
Name of username field ["username"]. | protected Log | log
The Log instance for this application. |
Method Summary | |
void | doCacheUser(HttpServletRequest request, User user)
Store User object in client session. | protected void | doCancel(HttpSession session, String method, String key)
Helper method to log event and cancel transaction. | protected ActionForward | doFindFailure(ActionMapping mapping)
Return the local or global forward named "failure"
or null if there is no such forward. | protected ActionForward | doFindLogon(ActionMapping mapping)
Return the local or global forward named "logon"
or null if there is no such forward. | protected ActionForward | doFindSuccess(ActionMapping mapping)
Return the mapping labeled "success"
or null if there is no such mapping. | protected String | doGet(ActionForm form, String property)
Helper method to fetch a String property from a DynaActionForm. | protected Subscription | doGetSubscription(HttpSession session)
Obtain the cached Subscription object, if any. | protected Subscription | doGetSubscription(HttpServletRequest request)
Obtain the cached Subscription object, if any. | User | doGetUser(UserDatabase database, String username, String password, ActionMessages errors)
Confirm user credentials. | User | doGetUser(String username, String password, ActionMessages errors)
Confirm user credentials. | protected User | doGetUser(HttpSession session)
Helper method to obtain User form session (if any). | protected User | doGetUser(HttpServletRequest request)
Helper method to obtain User form session (if any). | protected UserDatabase | doGetUserDatabase()
Return a reference to the UserDatabase
or null if the database is not available. | protected ActionForward | doInputForward(ActionMapping mapping, HttpServletRequest request, ActionMessages errors)
Save any errors and the transactioonal token, and forward to the
InputForard result. | protected void | doLogProcess(ActionMapping mapping, String method)
Log a "processing" message for an Action. | protected void | doSaveToken(HttpServletRequest request)
Helper method to log event and save token. | protected void | doSaveUser(User user)
Persist the User object, including subscriptions, to the database. | protected boolean | doSet(ActionForm form, String property, String value)
Helper method to inject a String property into a DynaActionForm. |
PASSWORD | public static String PASSWORD(Code) | |
Name of password field ["password"].
|
TASK | final public static String TASK(Code) | |
Name of task field ["task"].
|
USERNAME | public static String USERNAME(Code) | |
Name of username field ["username"].
|
log | protected Log log(Code) | |
The Log instance for this application.
|
doCacheUser | void doCacheUser(HttpServletRequest request, User user)(Code) | |
Store User object in client session.
If user object is null, any existing user object is removed.
Parameters: request - The request we are processing Parameters: user - The user object returned from the database |
doCancel | protected void doCancel(HttpSession session, String method, String key)(Code) | |
Helper method to log event and cancel transaction.
Parameters: session - Our HttpSession Parameters: method - Method being processed Parameters: key - Attrkibute to remove from session, if any |
doFindFailure | protected ActionForward doFindFailure(ActionMapping mapping)(Code) | |
Return the local or global forward named "failure"
or null if there is no such forward.
Parameters: mapping - Our ActionMapping Return the mapping named "failure" or null if there is no such mapping. |
doFindLogon | protected ActionForward doFindLogon(ActionMapping mapping)(Code) | |
Return the local or global forward named "logon"
or null if there is no such forward.
Parameters: mapping - Our ActionMapping Return the mapping named "logon" or null if there is no such mapping. |
doFindSuccess | protected ActionForward doFindSuccess(ActionMapping mapping)(Code) | |
Return the mapping labeled "success"
or null if there is no such mapping.
Parameters: mapping - Our ActionMapping Return the mapping named "success" or null if there is no suchmapping. |
doGet | protected String doGet(ActionForm form, String property)(Code) | |
Helper method to fetch a String property from a DynaActionForm.
Values are returned trimmed of leading and trailing whitespace.
Zero-length strings are returned as null.
Parameters: form - Our DynaActionForm Parameters: property - The name of the property The value or null if an error occurs |
doGetSubscription | protected Subscription doGetSubscription(HttpSession session)(Code) | |
Obtain the cached Subscription object, if any.
Parameters: session - Our HttpSession Cached Subscription object or null |
doGetSubscription | protected Subscription doGetSubscription(HttpServletRequest request)(Code) | |
Obtain the cached Subscription object, if any.
Parameters: request - Our HttpServletRequest Cached Subscription object or null |
doGetUser | protected User doGetUser(HttpSession session)(Code) | |
Helper method to obtain User form session (if any).
Parameters: session - Our HttpSession User object, or null if there is no user. |
doGetUser | protected User doGetUser(HttpServletRequest request)(Code) | |
Helper method to obtain User form session (if any).
Parameters: request - Our HttpServletRequest User object, or null if there is no user. |
doGetUserDatabase | protected UserDatabase doGetUserDatabase()(Code) | |
Return a reference to the UserDatabase
or null if the database is not available.
a reference to the UserDatabase or null if the database is notavailable |
doInputForward | protected ActionForward doInputForward(ActionMapping mapping, HttpServletRequest request, ActionMessages errors)(Code) | |
Save any errors and the transactioonal token, and forward to the
InputForard result.
Parameters: mapping - Our ActionMapping Parameters: request - Our HttpServletRequest Parameters: errors - Our ActionMessages collectoin The InputForward for this mappintg |
doLogProcess | protected void doLogProcess(ActionMapping mapping, String method)(Code) | |
Log a "processing" message for an Action.
Parameters: mapping - Our ActionMapping Parameters: method - Name of method being processed |
doSaveToken | protected void doSaveToken(HttpServletRequest request)(Code) | |
Helper method to log event and save token.
Parameters: request - Our HttpServletRequest |
doSet | protected boolean doSet(ActionForm form, String property, String value)(Code) | |
Helper method to inject a String property into a DynaActionForm.
Parameters: form - Our DynaActionForm Parameters: property - The name of the property Parameters: value - The value for the property True if the assignment succeeds |
Methods inherited from org.apache.struts.actions.MappingDispatchAction | public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception(Code)(Java Doc) protected String getMethodName(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, String parameter) throws Exception(Code)(Java Doc) protected String getParameter(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception(Code)(Java Doc) protected ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception(Code)(Java Doc)
|
|
|