KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portlet > forums > commands > admin > UpdateForumCommand


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Forums JBoss Portlet *
6  * *
7  * Distributable under GPL license. *
8  * See terms of license at gnu.org. *
9  * *
10  *****************************************/

11 package org.jboss.portlet.forums.commands.admin;
12
13 import org.jboss.portal.common.command.result.Result;
14 import org.jboss.portlet.forums.commands.AbstractCommand;
15 import org.jboss.portlet.forums.model.Category;
16 import org.jboss.portlet.forums.model.Forum;
17 import org.jboss.portlet.JBossActionRequest;
18 import org.jboss.portlet.JBossActionResponse;
19
20 /**
21  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
22  * @author <a HREF="mailto:theute@jboss.org">Thomas Heute</a>
23  * @version $Revision: 1.4 $
24  */

25 public class UpdateForumCommand
26    extends AbstractCommand
27 {
28    /** Name of the forum */
29    public String JavaDoc name;
30
31    /** Description of the forum */
32    public String JavaDoc description;
33
34    /** Cagtegory of the forum */
35    public Category category;
36
37    /** Forum to edit */
38    public Forum forum;
39
40    public UpdateForumCommand(JBossActionRequest request, JBossActionResponse response)
41    {
42       super(request, response);
43    }
44
45    /**
46     * Edit the forum
47     *
48     * @return Result saying if the forum has been successfully updated
49     */

50    public Result execute()
51    {
52       forum.setCategory(category);
53       forum.setName(name);
54       forum.setDescription(description);
55       return TYPE_FORUM_UPDATED;
56    }
57 }
Popular Tags