KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jresearch > gossip > actions > message > ReplyAction


1 /*
2  * $$Id: ReplyAction.java,v 1.3 2005/06/07 12:31:54 bel70 Exp $$
3  *
4  * ***** BEGIN LICENSE BLOCK ***** The contents of this file are subject to the
5  * Mozilla Public License Version 1.1 (the "License"); you may not use this file
6  * except in compliance with the License. You may obtain a copy of the License
7  * at http://www.mozilla.org/MPL/
8  *
9  * Software distributed under the License is distributed on an "AS IS" basis,
10  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
11  * the specific language governing rights and limitations under the License.
12  *
13  * The Original Code is JGossip forum code.
14  *
15  * The Initial Developer of the Original Code is the JResearch, Org. Portions
16  * created by the Initial Developer are Copyright (C) 2004 the Initial
17  * Developer. All Rights Reserved.
18  *
19  * Contributor(s): Dmitry Belov <bel@jresearch.org>
20  *
21  * ***** END LICENSE BLOCK *****
22  */

23 /*
24  * Created on Sep 25, 2003
25  *
26  */

27 package org.jresearch.gossip.actions.message;
28
29 import javax.servlet.http.HttpServletRequest JavaDoc;
30
31 import org.apache.struts.util.MessageResources;
32 import org.jresearch.gossip.IConst;
33 import org.jresearch.gossip.beans.forum.Message;
34 import org.jresearch.gossip.configuration.Configurator;
35 import org.jresearch.gossip.exception.ConfiguratorException;
36 import org.jresearch.gossip.forms.MessageForm;
37 import org.jresearch.gossip.forms.ProcessMessageForm;
38
39 /**
40  * DOCUMENT ME!
41  *
42  * @author Bel
43  */

44 public class ReplyAction extends GetMessageAction {
45
46     /*
47      * (non-Javadoc)
48      *
49      * @see org.jresearch.gossip.actions.message.GetMessageAction#fillMessageForm(org.jresearch.gossip.forms.MessageForm,
50      * org.jresearch.gossip.beans.forum.Message)
51      */

52     protected String JavaDoc fillMessageForm(MessageForm messageForm, Message mess,
53             ProcessMessageForm form, HttpServletRequest JavaDoc request)
54             throws ConfiguratorException {
55         MessageResources messages = getResources(request);
56         messageForm.setTitle(messages.getMessage(Configurator.getInstance()
57                 .getLocale(IConst.CONFIG.DEFAULT_LOCALE), "messages.RE")
58                 + mess.getHeading());
59         messageForm.setText(mess.getSender() + ",\n");
60         messageForm.setFid(form.getFid());
61         messageForm.setTid(form.getTid());
62         messageForm.setBlock(form.getBlock());
63         return "addMessageForm";
64     }
65 }
Popular Tags