java.lang.Object
BaseAction
com.RuntimeCollective.webapps.action.BaseForwardAction
com.RuntimeCollective.webapps.action.BaseUserAction
com.RuntimeCollective.permission.action.PermissibleAction
com.RuntimeCollective.permission.action.AuthenticatedAction
com.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 $
| 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 |
SaveMessage
public SaveMessage()
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