KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portlet > forums > commands > post > PostCommand


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.post;
12
13 import org.jboss.portal.core.modules.ModuleException;
14 import org.jboss.portlet.forums.model.Post;
15 import org.jboss.portlet.JBossActionRequest;
16 import org.jboss.portlet.JBossActionResponse;
17
18 /**
19  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
20  * @version $Revision: 1.2 $
21  */

22 public abstract class PostCommand
23    extends TopicCommand
24 {
25
26    protected PostCommand(JBossActionRequest request, JBossActionResponse response)
27    {
28       super(request, response);
29    }
30
31    /** DOCUMENT_ME */
32    public int postId;
33
34    /** DOCUMENT_ME */
35    public Post post;
36
37    /**
38     * DOCUMENT_ME
39     */

40    protected void find()
41    {
42       try
43       {
44          post = forumsModule.findPostByID(new Integer JavaDoc(postId));
45          topic = post.getTopic();
46          forum = topic.getForum();
47          category = forum.getCategory();
48       }
49       catch (ModuleException e)
50       {
51          // TODO Auto-generated catch block
52
e.printStackTrace();
53       }
54    }
55 }
Popular Tags