站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.2 API 英文版文档

ForumsModule - JBOSS Portal 2.2 API 英文版文档


org.jboss.portlet.forums
Interface ForumsModule

All Known Implementing Classes:
ForumsModuleImpl

public interface ForumsModule


Method Summary
 void addAllForums(Category source, Category target)
          DOCUMENT_ME
 Poll addPollToTopic(Topic topic, Poll poll)
          DOCUMENT_ME
 Category createCategory(java.lang.String name)
          DOCUMENT_ME
 Forum createForum(Category category, java.lang.String name, java.lang.String description)
          DOCUMENT_ME
 Post createPost(Topic topic, Forum forum, Message message, java.util.Date creationTime, Poster poster, java.util.List attachments)
          DOCUMENT_ME
 Poster createPoster(java.lang.String userID)
           
 Post createTopic(Forum forum, Message message, java.util.Date creationDate, Poster poster, Poll poll, java.util.List attachments, int type)
          DOCUMENT_ME
 Topic createTopic(Forum forum, java.lang.String userID, java.lang.String subject, int type)
          DOCUMENT_ME
 void createWatch(Poster poster, Forum forum, int i)
           
 void createWatch(Poster poster, Topic topic)
           
 java.util.List findAnnouncements(Forum forum)
          Returns all the announcements of the forum
 java.util.List findCategories()
          Get all the categories of forums.
 Category findCategoryById(java.lang.Integer categoryID)
          DOCUMENT_ME
 Attachment findFindAttachmentById(java.lang.Integer attachID)
           
 Post findFirstPost(Topic topic)
           
 Forum findForumById(java.lang.Integer id)
          Find a forum by specifying its ID
 java.util.List findForums()
          DOCUMENT_ME
 java.util.List findForumsByCategoryId(java.lang.Integer categoryID)
          Get all the forums of a category
 ForumWatch findForumWatchById(java.lang.Integer forumWatchID)
           
 java.util.List findForumWatchByUser(User user)
           
 Post findLastPost(Forum forum)
           
 Post findLastPost(Topic topic)
           
 java.util.Date findLastPostDateForUser(User user)
           
 Post findPostById(java.lang.Integer id)
          DOCUMENT_ME
 Poster findPosterByUserId(java.lang.String userID)
          DOCUMENT_ME
 java.util.List findPosts()
          DOCUMENT_ME
 java.util.List findPostsByTopicId(java.lang.Integer topicID)
          DOCUMENT_ME
 java.util.List findPostsByTopicIdAsc(java.lang.Integer topicID, int start, int limit)
          DOCUMENT_ME
 java.util.List findPostsByTopicIdDesc(java.lang.Integer topicID, int start, int limit)
          DOCUMENT_ME
 Topic findTopicById(java.lang.Integer topicID)
           
 java.util.List findTopics()
          Returns some topics of a forum that are not of a certain type
 java.util.List findTopics(Forum forum)
          *
 java.util.List findTopicsAsc(Forum forum, int type, int start, int perPage)
          Returns some topics of a forum that are not of a certain type The topics are ordered by creation date from oldest to newest
 java.util.List findTopicsBefore(Forum forum, int type, int start, int perPage, java.util.Date date)
          DOCUMENT_ME
 java.util.List findTopicsByLatestPosts(int limit)
          DOCUMENT_ME
 java.util.List findTopicsDesc(Forum forum, int type, int start, int perPage)
          Returns some topics of a forum that are not of a certain type The topics are ordered by creation date from newest to oldest
 java.util.List findTopicsHot(int replies, int limit)
          DOCUMENT_ME
 java.util.List findTopicsHottest(java.util.Date after, int limit)
          DOCUMENT_ME
 java.util.List findTopicsMostViewed(java.util.Date after, int limit)
          DOCUMENT_ME
 TopicWatch findTopicWatchById(java.lang.Integer topicWatchID)
           
 int getFloodInterval()
           
 java.lang.String getFromAddress()
           
 HibernateProvider getHibernate()
           
 Result invoke(ActionCommand cmd)
           
 void removeCategory(Category category)
          DOCUMENT_ME
 void removeForum(Forum forum)
          DOCUMENT_ME
 void removePollInTopic(Topic topic)
          Delete a post
 void removePost(Post post)
          Delete a post
 void removeTopic(Topic topic)
          Delete a topic
 void removeWatch(Watch watch)
           
 void setFloodInterval(int floodInterval)
           
 void setFromAddress(java.lang.String fromAddress)
           
 

Method Detail

getHibernate

public HibernateProvider getHibernate()

getFloodInterval

public int getFloodInterval()

setFloodInterval

public void setFloodInterval(int floodInterval)

getFromAddress

public java.lang.String getFromAddress()

setFromAddress

public void setFromAddress(java.lang.String fromAddress)

findAnnouncements

public java.util.List findAnnouncements(Forum forum)
                                 throws ModuleException
Returns all the announcements of the forum

Parameters:
forum - Forum in which we want to search for the announcements
Returns:
List of topics
Throws:
ModuleException - Throws an exception if unable to find the announcements.

findTopics

public java.util.List findTopics()
                          throws ModuleException
Returns some topics of a forum that are not of a certain type

Returns:
List of topics
Throws:
ModuleException - Throws an excpetion if unable to find the topics.

findTopicsAsc

public java.util.List findTopicsAsc(Forum forum,
                                    int type,
                                    int start,
                                    int perPage)
                             throws ModuleException
Returns some topics of a forum that are not of a certain type The topics are ordered by creation date from oldest to newest

Parameters:
forum - Forum in which we want to search for topics
type - Type to avoid
start - Index for fetching result
perPage - Number of result to return
Returns:
List of perPage topics ordered by creation date.
Throws:
ModuleException - Throws an excpetion if unable to find the topics.

findTopicsDesc

public java.util.List findTopicsDesc(Forum forum,
                                     int type,
                                     int start,
                                     int perPage)
                              throws ModuleException
Returns some topics of a forum that are not of a certain type The topics are ordered by creation date from newest to oldest

Parameters:
forum - Forum in which we want to search for topics
type - Type to avoid
start - Index for fetching result
perPage - Number of result to return
Returns:
List of perPage topics ordered by opposite creation date.
Throws:
ModuleException - Throws an excpetion if unable to find the topics.

findTopics

public java.util.List findTopics(Forum forum)
                          throws ModuleException
*

Parameters:
forum - Forum in which we want to search for topics
Returns:
List of perPage topics ordered by creation date.
Throws:
ModuleException - Throws an excpetion if unable to find the topics.

findTopicsBefore

public java.util.List findTopicsBefore(Forum forum,
                                       int type,
                                       int start,
                                       int perPage,
                                       java.util.Date date)
                                throws ModuleException
DOCUMENT_ME

Parameters:
forum - DOCUMENT_ME
type - DOCUMENT_ME
start - DOCUMENT_ME
perPage - DOCUMENT_ME
date - DOCUMENT_ME
Returns:
DOCUMENT_ME
Throws:
ModuleException - DOCUMENT_ME

findTopicsHot

public java.util.List findTopicsHot(int replies,
                                    int limit)
                             throws ModuleException
DOCUMENT_ME

Parameters:
replies - DOCUMENT_ME
limit - DOCUMENT_ME
Returns:
DOCUMENT_ME
Throws:
ModuleException - DOCUMENT_ME

findTopicsByLatestPosts

public java.util.List findTopicsByLatestPosts(int limit)
                                       throws ModuleException
DOCUMENT_ME

Parameters:
limit - DOCUMENT_ME
Returns:
DOCUMENT_ME
Throws:
ModuleException - DOCUMENT_ME

findTopicsHottest

public java.util.List findTopicsHottest(java.util.Date after,
                                        int limit)
                                 throws ModuleException
DOCUMENT_ME

Parameters:
after - DOCUMENT_ME
limit - DOCUMENT_ME
Returns:
DOCUMENT_ME
Throws:
ModuleException - DOCUMENT_ME

findTopicsMostViewed

public java.util.List findTopicsMostViewed(java.util.Date after,
                                           int limit)
                                    throws ModuleException
DOCUMENT_ME

Parameters:
after - DOCUMENT_ME
limit - DOCUMENT_ME
Returns:
DOCUMENT_ME
Throws:
ModuleException - DOCUMENT_ME

findForumById

public Forum findForumById(java.lang.Integer id)
                    throws ModuleException
Find a forum by specifying its ID

Parameters:
id - ID of the forum to retrieve
Returns:
Forum with specified ID
Throws:
ModuleException - Throws an exception if the forum cannot be found

createForum

public Forum createForum(Category category,
                         java.lang.String name,
                         java.lang.String description)
                  throws ModuleException
DOCUMENT_ME

Parameters:
category - DOCUMENT_ME
name - DOCUMENT_ME
description - DOCUMENT_ME
Returns:
DOCUMENT_ME
Throws:
ModuleException - DOCUMENT_ME

findPosts

public java.util.List findPosts()
                         throws ModuleException
DOCUMENT_ME

Returns:
DOCUMENT_ME
Throws:
ModuleException - DOCUMENT_ME

findPostById

public Post findPostById(java.lang.Integer id)
                  throws ModuleException
DOCUMENT_ME

Parameters:
id - DOCUMENT_ME
Returns:
DOCUMENT_ME
Throws:
ModuleException - DOCUMENT_ME

findPosterByUserId

public Poster findPosterByUserId(java.lang.String userID)
                          throws ModuleException
DOCUMENT_ME

Parameters:
userID - DOCUMENT_ME
Returns:
DOCUMENT_ME
Throws:
ModuleException - DOCUMENT_ME

findCategories

public java.util.List findCategories()
                              throws ModuleException
Get all the categories of forums.

Returns:
All the categories
Throws:
ModuleException

findForums

public java.util.List findForums()
                          throws ModuleException
DOCUMENT_ME

Returns:
DOCUMENT_ME
Throws:
ModuleException - DOCUMENT_ME

findForumsByCategoryId

public java.util.List findForumsByCategoryId(java.lang.Integer categoryID)
                                      throws ModuleException
Get all the forums of a category

Parameters:
categoryID - Category of forums
Returns:
Forums of one category
Throws:
ModuleException

createTopic

public Post createTopic(Forum forum,
                        Message message,
                        java.util.Date creationDate,
                        Poster poster,
                        Poll poll,
                        java.util.List attachments,
                        int type)
                 throws ModuleException
DOCUMENT_ME

Parameters:
forum - DOCUMENT_ME
message - DOCUMENT_ME
creationDate - DOCUMENT_ME
poster - DOCUMENT_ME
Returns:
The new post created
Throws:
ModuleException - DOCUMENT_ME

createTopic

public Topic createTopic(Forum forum,
                         java.lang.String userID,
                         java.lang.String subject,
                         int type)
                  throws ModuleException
DOCUMENT_ME

Parameters:
forum - DOCUMENT_ME
userID - DOCUMENT_ME
subject - DOCUMENT_ME
type - DOCUMENT_ME
Returns:
DOCUMENT_ME
Throws:
ModuleException - DOCUMENT_ME

createPost

public Post createPost(Topic topic,
                       Forum forum,
                       Message message,
                       java.util.Date creationTime,
                       Poster poster,
                       java.util.List attachments)
                throws ModuleException
DOCUMENT_ME

Parameters:
topic - DOCUMENT_ME
forum - DOCUMENT_ME
message - DOCUMENT_ME
creationTime - DOCUMENT_ME
poster - DOCUMENT_ME
Returns:
DOCUMENT_ME
Throws:
ModuleException - DOCUMENT_ME

addPollToTopic

public Poll addPollToTopic(Topic topic,
                           Poll poll)
                    throws ModuleException
DOCUMENT_ME

Parameters:
topic - DOCUMENT_ME
poll - DOCUMENT_ME
Returns:
DOCUMENT_ME
Throws:
ModuleException - DOCUMENT_ME

createCategory

public Category createCategory(java.lang.String name)
                        throws ModuleException
DOCUMENT_ME

Parameters:
name - DOCUMENT_ME
Returns:
DOCUMENT_ME
Throws:
ModuleException - DOCUMENT_ME

removeCategory

public void removeCategory(Category category)
                    throws ModuleException
DOCUMENT_ME

Parameters:
category - DOCUMENT_ME
Throws:
ModuleException - DOCUMENT_ME

removeForum

public void removeForum(Forum forum)
                 throws ModuleException
DOCUMENT_ME

Parameters:
forum - DOCUMENT_ME
Throws:
ModuleException - DOCUMENT_ME

removePost

public void removePost(Post post)
                throws ModuleException
Delete a post

Parameters:
post - Post to delete
Throws:
ModuleException - DOCUMENT_ME

removePollInTopic

public void removePollInTopic(Topic topic)
                       throws ModuleException
Delete a post

Parameters:
topic - Post to delete
Throws:
ModuleException - DOCUMENT_ME

removeTopic

public void removeTopic(Topic topic)
                 throws ModuleException
Delete a topic

Parameters:
topic - Topic to delete
Throws:
ModuleException - DOCUMENT_ME

findCategoryById

public Category findCategoryById(java.lang.Integer categoryID)
                          throws ModuleException
DOCUMENT_ME

Parameters:
categoryID - DOCUMENT_ME
Returns:
DOCUMENT_ME
Throws:
ModuleException - DOCUMENT_ME

addAllForums

public void addAllForums(Category source,
                         Category target)
DOCUMENT_ME

Parameters:
source - DOCUMENT_ME
target - DOCUMENT_ME

findTopicById

public Topic findTopicById(java.lang.Integer topicID)
                    throws ModuleException
Parameters:
topicID -
Returns:
DOCUMENT_ME
Throws:
ModuleException

findPostsByTopicId

public java.util.List findPostsByTopicId(java.lang.Integer topicID)
                                  throws ModuleException
DOCUMENT_ME

Parameters:
topicID - DOCUMENT_ME
Returns:
DOCUMENT_ME
Throws:
ModuleException - DOCUMENT_ME

findPostsByTopicIdAsc

public java.util.List findPostsByTopicIdAsc(java.lang.Integer topicID,
                                            int start,
                                            int limit)
                                     throws ModuleException
DOCUMENT_ME

Parameters:
topicID - DOCUMENT_ME
start - DOCUMENT_ME
limit - DOCUMENT_ME
Returns:
DOCUMENT_ME
Throws:
ModuleException - DOCUMENT_ME

findPostsByTopicIdDesc

public java.util.List findPostsByTopicIdDesc(java.lang.Integer topicID,
                                             int start,
                                             int limit)
                                      throws ModuleException
DOCUMENT_ME

Parameters:
topicID - DOCUMENT_ME
start - DOCUMENT_ME
limit - DOCUMENT_ME
Returns:
DOCUMENT_ME
Throws:
ModuleException - DOCUMENT_ME

findLastPostDateForUser

public java.util.Date findLastPostDateForUser(User user)
                                       throws ModuleException
Throws:
ModuleException

findLastPost

public Post findLastPost(Forum forum)
                  throws ModuleException
Throws:
ModuleException

findFirstPost

public Post findFirstPost(Topic topic)
                   throws ModuleException
Throws:
ModuleException

findLastPost

public Post findLastPost(Topic topic)
                  throws ModuleException
Throws:
ModuleException

findForumWatchByUser

public java.util.List findForumWatchByUser(User user)
                                    throws ModuleException
Throws:
ModuleException

findFindAttachmentById

public Attachment findFindAttachmentById(java.lang.Integer attachID)
                                  throws ModuleException
Throws:
ModuleException

createPoster

public Poster createPoster(java.lang.String userID)
                    throws ModuleException
Throws:
ModuleException

createWatch

public void createWatch(Poster poster,
                        Forum forum,
                        int i)
                 throws ModuleException
Parameters:
poster -
forum -
i -
Throws:
ModuleException

findForumWatchById

public ForumWatch findForumWatchById(java.lang.Integer forumWatchID)
                              throws ModuleException
Parameters:
forumWatchID -
Returns:
DOCUMENT_ME
Throws:
ModuleException

createWatch

public void createWatch(Poster poster,
                        Topic topic)
                 throws ModuleException
Parameters:
poster -
topic -
Throws:
ModuleException

findTopicWatchById

public TopicWatch findTopicWatchById(java.lang.Integer topicWatchID)
                              throws ModuleException
Parameters:
topicWatchID -
Returns:
DOCUMENT_ME
Throws:
ModuleException

removeWatch

public void removeWatch(Watch watch)
                 throws ModuleException
Parameters:
watch -
Throws:
ModuleException

invoke

public Result invoke(ActionCommand cmd)
              throws CommandException
Parameters:
cmd -
Returns:
Throws:
CommandException