org.apache.struts.apps.mailreader.actions
Class SubscriptionAction

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by org.apache.struts.actions.BaseAction
          extended by org.apache.struts.actions.DispatchAction
              extended by org.apache.struts.actions.MappingDispatchAction
                  extended by org.apache.struts.apps.mailreader.actions.BaseAction
                      extended by org.apache.struts.apps.mailreader.actions.SubscriptionAction

public final class SubscriptionAction
extends BaseAction

Provide an Edit method for retrieving an existing subscription, and a Save method for updating or inserting a subscription.


Field Summary
static String AUTO_CONNECT
           Name of autoConnect field ["autoConnect"].
static String HOST
           Name of host field ["host"].
static String TYPE
           Name of type field ["type"].
 
Fields inherited from class org.apache.struts.apps.mailreader.actions.BaseAction
log, PASSWORD, TASK, USERNAME
 
Fields inherited from class org.apache.struts.actions.DispatchAction
clazz, methods, types
 
Fields inherited from class org.apache.struts.actions.BaseAction
messages
 
Fields inherited from class org.apache.struts.action.Action
servlet
 
Constructor Summary
SubscriptionAction()
           
 
Method Summary
 ActionForward Delete(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
           Prepare for a Delete operation by populating the form and seting the action to Delete.
 ActionForward Edit(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
           Retrieve the Subscription object to edit or null if the Subscription does not exist.
 ActionForward Save(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
           Insert or update a Subscription object to the persistent store.
 
Methods inherited from class org.apache.struts.apps.mailreader.actions.BaseAction
doCancel, doFindFailure, doFindLogon, doFindSuccess, doGet, doGetSubscription, doGetSubscription, doGetUser, doGetUser, doGetUserDatabase, doInputForward, doLogProcess, doSaveToken, doSaveUser, doSet
 
Methods inherited from class org.apache.struts.actions.MappingDispatchAction
execute, getMethodName, getParameter, unspecified
 
Methods inherited from class org.apache.struts.actions.DispatchAction
cancelled, dispatchMethod, getMethod
 
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUTO_CONNECT

public static final String AUTO_CONNECT

Name of autoConnect field ["autoConnect"].

See Also:
Constant Field Values

HOST

public static final String HOST

Name of host field ["host"].

See Also:
Constant Field Values

TYPE

public static final String TYPE

Name of type field ["type"].

See Also:
Constant Field Values
Constructor Detail

SubscriptionAction

public SubscriptionAction()
Method Detail

Delete

public ActionForward Delete(ActionMapping mapping,
                            ActionForm form,
                            HttpServletRequest request,
                            HttpServletResponse response)
                     throws Exception

Prepare for a Delete operation by populating the form and seting the action to Delete.

Parameters:
mapping - Our ActionMapping
form - Our ActionForm
request - Our HttpServletRequest
response - Our HttpServletResponse
Returns:
The "Success" result for this mapping
Throws:
Exception - on any error

Edit

public ActionForward Edit(ActionMapping mapping,
                          ActionForm form,
                          HttpServletRequest request,
                          HttpServletResponse response)
                   throws Exception

Retrieve the Subscription object to edit or null if the Subscription does not exist.

The Subscription object is bound to the User, and so if the User is not logged in, control is forwarded to the Logon result.

Parameters:
mapping - Our ActionMapping
form - Our ActionForm
request - Our HttpServletRequest
response - Our HttpServletResponse
Returns:
The "Success" result for this mapping
Throws:
Exception - on any error

Save

public ActionForward Save(ActionMapping mapping,
                          ActionForm form,
                          HttpServletRequest request,
                          HttpServletResponse response)
                   throws Exception

Insert or update a Subscription object to the persistent store.

Parameters:
mapping - Our ActionMapping
form - Our ActionForm
request - Our HttpServletRequest
response - Our HttpServletResponse
Returns:
The "Success" result for this mapping
Throws:
Exception - on any error


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.