1 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 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 32 public int postId; 33 34 35 public Post post; 36 37 40 protected void find() 41 { 42 try 43 { 44 post = forumsModule.findPostByID(new Integer (postId)); 45 topic = post.getTopic(); 46 forum = topic.getForum(); 47 category = forum.getCategory(); 48 } 49 catch (ModuleException e) 50 { 51 e.printStackTrace(); 53 } 54 } 55 } | Popular Tags |