Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.RuntimeCollective.bboard.action
Class SaveMessage  view SaveMessage download SaveMessage.java

java.lang.Object
  extended byBaseAction
      extended bycom.RuntimeCollective.webapps.action.BaseForwardAction
          extended bycom.RuntimeCollective.webapps.action.BaseUserAction
              extended bycom.RuntimeCollective.permission.action.PermissibleAction
                  extended bycom.RuntimeCollective.permission.action.AuthenticatedAction
                      extended bycom.RuntimeCollective.bboard.action.SaveMessage

public final class SaveMessage
extends com.RuntimeCollective.permission.action.AuthenticatedAction

Implementation of Action that adds a bulletin board message to a topic.

Version:
$Id: SaveMessage.java,v 1.15 2003/10/03 14:47:33 criss Exp $

Field Summary
 
Fields inherited from class com.RuntimeCollective.permission.action.PermissibleAction
DENIED, NOT_AUTH
 
Fields inherited from class com.RuntimeCollective.webapps.action.BaseUserAction
USER_KEY
 
Fields inherited from class com.RuntimeCollective.webapps.action.BaseForwardAction
CANCEL, FAILURE, FAILURE_KEY, INVALID, ITERATE, SUCCESS, SUCCESS_FORWARD, SUCCESS_KEY, SUCCESS_PARAM_MAP, TRANSACTION_TOKEN_KEY
 
Constructor Summary
SaveMessage()
           
 
Method Summary
protected  void authorisedPreProcess(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Ensure the action is set to a value we understand
 void executeLogic(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Create a Message bean from the form.
 
Methods inherited from class com.RuntimeCollective.permission.action.AuthenticatedAction
checkPermissions
 
Methods inherited from class com.RuntimeCollective.permission.action.PermissibleAction
preProcess, validateRequest
 
Methods inherited from class com.RuntimeCollective.webapps.action.BaseUserAction
execute, getUser
 
Methods inherited from class com.RuntimeCollective.webapps.action.BaseForwardAction
findFailure, findSuccess, forward, getToken, isTokenValid, iterate, resetToken, saveToken, setFailureForward, setSuccessForward, setSuccessForward, setSuccessForward, setToken, validForm
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SaveMessage

public SaveMessage()
Method Detail

authorisedPreProcess

protected void authorisedPreProcess(org.apache.struts.action.ActionMapping mapping,
                                    org.apache.struts.action.ActionForm form,
                                    javax.servlet.http.HttpServletRequest request,
                                    javax.servlet.http.HttpServletResponse response)
Ensure the action is set to a value we understand


executeLogic

public void executeLogic(org.apache.struts.action.ActionMapping mapping,
                         org.apache.struts.action.ActionForm form,
                         javax.servlet.http.HttpServletRequest request,
                         javax.servlet.http.HttpServletResponse response)
                  throws java.lang.Exception
Create a Message bean from the form. This action will either add the message to an existing topic, save changes to an existing message, or use the message to create a new topic, depending on the value of MessageForm.formAction:
  • MessageForm.formAction="first" -- Create a new topic and make this the first message.
  • MessageForm.formAction="add" -- Add this message to the topic with id MessageForm.topicId.
  • MessageForm.formAction="edit" -- Save changes to this message. The create date is left unchanged.

    If a new message is created, its class will be determined by the value of the ActionMapping.beanName parameter. If this is not set, then an com.RuntimeCollective.bboard.SimpleMessage will be created.

    The following ActionForwards are returned:

    • failure
    • cancel
    • editSuccess
    • addSuccess
    • firstSuccess