1 11 package org.jboss.portlet.forums.commands.post; 12 13 import java.util.Date ; 14 15 import org.jboss.portal.common.command.result.Result; 16 import org.jboss.portlet.forums.commands.ValidationException; 17 import org.jboss.portlet.forums.model.AuthType; 18 import org.jboss.portlet.JBossActionRequest; 19 import org.jboss.portlet.JBossActionResponse; 20 21 26 public class EditPostCommand 27 extends PostCommand 28 { 29 30 public int topic_type; 31 32 33 public Date current_time; 34 35 36 public boolean notify; 37 38 39 public boolean poll_delete; 40 41 42 public boolean pd_first_post; 43 44 45 public boolean pd_last_post; 46 47 48 public boolean pd_edit_poll; 49 50 51 public Integer [] deletedAttachments; 52 53 public EditPostCommand(JBossActionRequest request, JBossActionResponse response) 54 { 55 super(request, response); 56 } 57 58 63 public int authType() 64 { 65 return AuthType.EDIT; 66 } 67 68 73 protected void prepare() 74 throws ValidationException 75 { 76 111 } 112 113 118 protected Result __execute() 119 { 120 if (pd_first_post) 121 { 122 topic.setSubject(message.getSubject()); 123 topic.setType(topic_type); 124 } 125 126 post.setMessage(message); 128 129 254 return TYPE_EDIT_POST_POSTED; 255 } 256 } | Popular Tags |