1 11 package org.jboss.portlet.forums; 12 13 import org.jboss.portal.core.model.User; 14 import org.jboss.portal.core.modules.ModuleException; 15 import org.jboss.portlet.forums.model.*; 16 17 import java.util.Date ; 18 import java.util.List ; 19 20 24 public interface ForumsModule 25 { 26 33 List findAnnouncements(Forum forum) 34 throws ModuleException; 35 36 47 List findTopicsAsc(Forum forum, 48 int type, 49 int start, 50 int perPage) 51 throws ModuleException; 52 53 64 List findTopicsDesc(Forum forum, 65 int type, 66 int start, 67 int perPage) 68 throws ModuleException; 69 70 81 List findTopicsBefore(Forum forum, 82 int type, 83 int start, 84 int perPage, 85 Date date) 86 throws ModuleException; 87 88 95 Forum findForumByID(Integer id) 96 throws ModuleException; 97 98 107 Forum createForum(Category category, 108 String name, 109 String description) 110 throws ModuleException; 111 112 119 Post findPostByID(Integer id) 120 throws ModuleException; 121 122 129 Poster findPosterByUserID(Integer userID) 130 throws ModuleException; 131 132 138 List findCategories() 139 throws ModuleException; 140 141 147 List findForums() 148 throws ModuleException; 149 150 156 List findForumsByCategoryID(Integer categoryID) 157 throws ModuleException; 158 159 169 Post createTopic(Forum forum, 170 Message message, 171 Date creationDate, 172 Poster poster, 173 int type) 174 throws ModuleException; 175 176 187 Post createPost(Topic topic, 188 Forum forum, 189 Message message, 190 Date creationTime, 191 Poster poster) 192 throws ModuleException; 193 194 201 Category createCategory(String name) 202 throws ModuleException; 203 204 210 void removeCategory(Category category) 211 throws ModuleException; 212 213 219 void removeForum(Forum forum) 220 throws ModuleException; 221 222 228 void removePost(Post post) 229 throws ModuleException; 230 231 237 void removeTopic(Topic topic) 238 throws ModuleException; 239 240 247 Category findCategoryByID(Integer categoryID) 248 throws ModuleException; 249 250 256 void addAllForums(Category source, 257 Category target); 258 259 263 Topic findTopicByID(Integer topicID) 264 throws ModuleException; 265 266 275 List findPostsByTopicIDAsc(Integer topicID, 276 int start, 277 int limit) 278 throws ModuleException; 279 280 289 List findPostsByTopicIDDesc(Integer topicID, 290 int start, 291 int limit) 292 throws ModuleException; 293 294 295 Date findLastPostDateForUser(User user) throws ModuleException; 296 297 Post findLastPost(Forum forum) throws ModuleException; 298 299 Post findFirstPost(Topic topic) throws ModuleException; 300 301 Post findLastPost(Topic topic) throws ModuleException; 302 303 List findForumWatchByUser(User user) throws ModuleException; 304 305 Poster createPoster(Integer userID) throws ModuleException; 306 307 312 void createWatch(Poster poster, Forum forum, int i) throws ModuleException; 313 314 318 ForumWatch findForumWatchByID(Integer forumWatchID) throws ModuleException; 319 320 324 void createWatch(Poster poster, Topic topic) throws ModuleException; 325 326 330 TopicWatch findTopicWatchByID(Integer topicWatchID) throws ModuleException; 331 332 335 void removeWatch(Watch watch) throws ModuleException; 336 337 } | Popular Tags |