1 53 54 106 107 package com.Yasna.forum; 108 109 import com.Yasna.forum.Exceptions.RapidPostingException; 110 import com.Yasna.forum.Exceptions.UserBlackListedException; 111 import com.Yasna.forum.util.ClientIP; 112 113 import java.util.Date ; 114 import java.util.Iterator ; 115 import java.util.Enumeration ; 116 117 121 public interface Forum { 122 123 public static final int SORT_BY_CREATE_DATE = 0; 125 public static final int SORT_BY_MODIFIED_DATE = 1; 126 127 132 public int getID(); 133 134 142 public String getName(); 143 144 157 public void setName(String name) throws UnauthorizedException, 158 ForumAlreadyExistsException; 159 160 165 public String getDescription(); 166 167 173 public void setDescription(String description) throws UnauthorizedException; 174 175 180 public Date getCreationDate(); 181 182 192 public void setCreationDate(Date creationDate) throws UnauthorizedException; 193 194 200 public Date getModifiedDate(); 201 202 212 public void setModifiedDate(Date modifiedDate) throws UnauthorizedException; 213 214 221 public String getProperty(String name); 222 223 231 public void setProperty(String name, String value) throws UnauthorizedException; 232 233 238 public Enumeration propertyNames(); 239 240 247 public boolean isModerated(); 248 249 258 public void setModerated(boolean moderated) 259 throws UnauthorizedException; 260 261 268 public abstract ForumThread createThread(ForumMessage rootMessage,ThreadType type) throws 269 UnauthorizedException; 270 271 277 public abstract ForumMessage createMessage(User user,ClientIP clientIP) 278 throws UnauthorizedException,RapidPostingException, UserBlackListedException; 279 286 public abstract ForumMessage createDummyMessage(User user) 287 throws UnauthorizedException; 288 289 295 public void addThread(ForumThread thread) throws UnauthorizedException; 296 297 304 public void deleteThread(ForumThread thread) throws UnauthorizedException; 305 306 322 public void moveThread(ForumThread thread, Forum newForum) 323 throws UnauthorizedException, IllegalArgumentException ; 324 325 329 public ForumThread getThread(int threadID) 330 throws ForumThreadNotFoundException; 331 332 335 public Iterator threads(); 336 337 343 public Iterator threads(int startIndex, int numResults, int sortBy); 344 345 348 public int getThreadCount(); 349 350 353 public int getMessageCount(); 354 355 360 public Query createQuery(); 361 362 370 public void addUserPermission(User user, int permissionType) 371 throws UnauthorizedException; 372 373 381 public void removeUserPermission(User user, int permissionType) 382 throws UnauthorizedException; 383 384 391 public int [] usersWithPermission(int permissionType) 392 throws UnauthorizedException; 393 394 400 public void addGroupPermission(Group group, int permissionType) 401 throws UnauthorizedException; 402 403 408 public void removeGroupPermission(Group group, int permissionType) 409 throws UnauthorizedException; 410 411 416 public int[] groupsWithPermission(int permissionType) 417 throws UnauthorizedException; 418 419 424 public ForumMessage applyFilters(ForumMessage message); 425 426 431 public ForumMessageFilter[] getForumMessageFilters() 432 throws UnauthorizedException; 433 434 441 public void addForumMessageFilter(ForumMessageFilter filter) 442 throws UnauthorizedException; 443 444 452 public void addForumMessageFilter(ForumMessageFilter filter, int index) 453 throws UnauthorizedException; 454 455 462 public void removeForumMessageFilter(int index) 463 throws UnauthorizedException; 464 465 471 public abstract ForumPermissions getPermissions(Authorization authorization); 472 473 481 public boolean hasPermission(int type); 482 483 487 public boolean isArticleForum(); 488 489 public void addArticleMap(String pageKey,ForumThread thread) throws UnauthorizedException; 490 public int forumOrder(); 491 public void setForumOrder(int param) throws UnauthorizedException; 492 493 } 494 495 496 | Popular Tags |