1 11 package org.jboss.portlet.forums.action; 12 13 import java.util.List ; 14 15 import org.jboss.portlet.forums.ForumsModule; 16 import org.jboss.portlet.forums.model.Forum; 17 import org.jboss.portlet.forums.model.Message; 18 import org.jboss.portlet.forums.model.Poster; 19 20 25 public abstract class ForumAction 26 extends Action 27 { 28 29 protected ForumsModule module; 30 31 32 public static final int INIT = 0; 33 34 35 public static final int REFRESH = 1; 36 private final int mode; 37 38 43 public void setModule(ForumsModule module) 44 { 45 this.module = module; 46 } 47 48 53 protected ForumAction(int mode) 54 { 55 if ((mode < 0) || (mode > 1)) 56 { 57 throw new IllegalArgumentException ("mode not accepted"); 58 } 59 60 this.mode = mode; 61 } 62 63 68 public int getMode() 69 { 70 return mode; 71 } 72 73 78 public abstract Poster getPoster(); 79 80 85 public abstract Forum getForum(); 86 87 92 public abstract Message getMessage(); 93 94 97 public abstract void init(); 98 99 104 public abstract List getAttachments(); 105 } | Popular Tags |