1 11 package org.jboss.portlet.forums.commands.admin; 12 13 import org.jboss.portal.common.command.result.Result; 14 import org.jboss.portal.core.modules.ModuleException; 15 import org.jboss.portlet.forums.ForumsModule; 16 import org.jboss.portlet.forums.commands.AbstractCommand; 17 import org.jboss.portlet.forums.model.Forum; 18 import org.jboss.portlet.JBossActionRequest; 19 import org.jboss.portlet.JBossActionResponse; 20 21 26 public class DeleteForumCommand 27 extends AbstractCommand 28 { 29 30 public Forum forum; 31 32 33 public ForumsModule module; 34 35 public DeleteForumCommand(JBossActionRequest request, JBossActionResponse response) 36 { 37 super(request, response); 38 } 39 40 45 public Result execute() 46 { 47 try 48 { 49 module.removeForum(forum); 50 return TYPE_FORUM_REMOVED; 51 } 52 catch (ModuleException e) 53 { 54 return TYPE_CANNOT_REMOVE_FORUM_REMOVAL_FAILED; 55 } 56 } 57 } | Popular Tags |