1 25 26 27 package org.nemesis.forum; 28 29 import java.util.Date ; 30 import java.util.Iterator ; 31 32 import org.nemesis.forum.exception.ForumMessageNotFoundException; 33 import org.nemesis.forum.exception.UnauthorizedException; 34 35 72 public interface ForumThread { 73 74 77 public int getID(); 78 79 86 public String getName(); 87 88 91 public Date getCreationDate(); 92 93 104 public void setCreationDate(Date creationDate) throws UnauthorizedException; 105 106 110 public Date getModifiedDate(); 111 112 123 public void setModifiedDate(Date modifiedDate) throws UnauthorizedException; 124 125 128 public Forum getForum(); 129 130 135 public Message getMessage(int messageID) 136 throws ForumMessageNotFoundException; 137 138 143 public Message getRootMessage(); 144 145 150 public int getMessageCount(); 151 152 157 public int getMessageCount(boolean approved); 158 159 160 161 167 public void addMessage(Message parentMessage, Message newMessage); 168 169 180 public void deleteMessage(Message message) 181 throws UnauthorizedException; 182 183 206 public void moveMessage(Message message, ForumThread newThread, 207 Message parentMessage) throws UnauthorizedException, 208 IllegalArgumentException ; 209 210 214 public TreeWalker treeWalker(); 215 216 220 public TreeWalker treeWalker(boolean approved); 221 222 225 public Iterator messages(); 226 227 235 public Iterator messages(int startIndex, int numResults); 236 237 240 public Iterator messages(boolean approved); 241 242 250 public Iterator messages(boolean approved,int startIndex, int numResults); 251 252 260 public boolean hasPermission(int type); 261 262 266 public boolean isApproved(); 267 268 public void setApproved(boolean approved) throws UnauthorizedException; 269 } 270
| Popular Tags
|