Interface DiscussionService
-
- All Known Implementing Classes:
DiscussionServiceImpl
public interface DiscussionServiceThe Discussions service.- Since:
- 4.0
- Author:
- Nick Burch
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PostInfocreatePost(TopicInfo topic, String contents)Creates a newPostInfoin the given topic, with the specified contents.PostInfocreateReply(PostInfo parentPost, String contents)Creates a newPostInfowhich is a reply to the specified other post, with the given contents.TopicInfocreateTopic(String siteShortName, String title)Creates a newTopicInfoin the given siteTopicInfocreateTopic(org.alfresco.service.cmr.repository.NodeRef parentNodeRef, String title)Creates a newTopicInfoattached to the specified Node.voiddeletePost(PostInfo post)Deletes an existingPostInfofrom the repositoryvoiddeleteTopic(TopicInfo topic)Deletes an existingTopicInfofrom the repositoryorg.alfresco.query.PagingResults<TopicInfo>findTopics(String siteShortName, String username, String tag, boolean sortAscending, org.alfresco.query.PagingRequest paging)Searches for all topics in a site, filtered by username or tag, sorted by either oldest or newest topics first.org.alfresco.query.PagingResults<TopicInfo>findTopics(org.alfresco.service.cmr.repository.NodeRef nodeRef, String username, String tag, boolean sortAscending, org.alfresco.query.PagingRequest paging)Searches for all topics attached to the specified Node, filtered by username or tag, sorted by either oldest or newest topics first.org.alfresco.util.Pair<TopicInfo,PostInfo>getForNodeRef(org.alfresco.service.cmr.repository.NodeRef nodeRef)PostInfogetMostRecentPost(TopicInfo topic)Retrieves the newest (most recent) Post in a topic, be that the Primary Post or a Reply.PostInfogetPost(TopicInfo topic, String postName)Retrieves an existingPostInfofrom the repositoryPostInfogetPrimaryPost(TopicInfo topic)Retrieves the Primary (Root) Post in a topic, to which all replies belong.TopicInfogetTopic(String siteShortName, String linkName)Retrieves an existingTopicInfofrom the repository, which is within a siteTopicInfogetTopic(org.alfresco.service.cmr.repository.NodeRef parentNodeRef, String topicName)Retrieves an existingTopicInfofrom the repository, which is attached to the specified Node.org.alfresco.query.PagingResults<org.alfresco.util.Pair<TopicInfo,Integer>>listHotTopics(String siteShortName, Date since, org.alfresco.query.PagingRequest paging)Finds topics which have had replies since the specified date, and returns them along with the count of replies since then.org.alfresco.query.PagingResults<org.alfresco.util.Pair<TopicInfo,Integer>>listHotTopics(org.alfresco.service.cmr.repository.NodeRef nodeRef, Date since, org.alfresco.query.PagingRequest paging)Finds topics which have had replies since the specified date, and returns them along with the count of replies since then.PostWithReplieslistPostReplies(PostInfo primaryPost, int levels)Retrieves all replies to a PostPostWithReplieslistPostReplies(TopicInfo forum, int levels)Retrieves all replies on a Topicorg.alfresco.query.PagingResults<PostInfo>listPosts(TopicInfo topic, org.alfresco.query.PagingRequest paging)Retrieves all posts in a topic, ordered by creation dateorg.alfresco.query.PagingResults<TopicInfo>listTopics(String siteShortName, boolean sortAscending, org.alfresco.query.PagingRequest paging)Retrieves all topics in a site, sorted by either oldest or newest topics first.org.alfresco.query.PagingResults<TopicInfo>listTopics(String siteShortName, String username, boolean sortAscending, org.alfresco.query.PagingRequest paging)Retrieves all topics in a site, filtered by username, sorted by either oldest or newest topics first.org.alfresco.query.PagingResults<TopicInfo>listTopics(String siteShortName, Date from, Date to, boolean sortAscending, org.alfresco.query.PagingRequest paging)Retrieves all topics in a site, created in the given date range, sorted by either oldest or newest topics first.org.alfresco.query.PagingResults<TopicInfo>listTopics(org.alfresco.service.cmr.repository.NodeRef nodeRef, boolean sortAscending, org.alfresco.query.PagingRequest paging)Retrieves all topics attached to the specified Node, sorted by either oldest or newest topics first.org.alfresco.query.PagingResults<TopicInfo>listTopics(org.alfresco.service.cmr.repository.NodeRef nodeRef, String username, boolean sortAscending, org.alfresco.query.PagingRequest paging)Retrieves all topics attached to the specified Node, filtered by username, sorted by either oldest or newest topics first.org.alfresco.query.PagingResults<TopicInfo>listTopics(org.alfresco.service.cmr.repository.NodeRef nodeRef, Date from, Date to, boolean sortAscending, org.alfresco.query.PagingRequest paging)Retrieves all topics attached to the specified Node, created in the given date range, sorted by either oldest or newest topics first.PostInfoupdatePost(PostInfo post)Updates an existingPostInfoin the repository.TopicInfoupdateTopic(TopicInfo topic)Updates an existingTopicInfoin the repository.
-
-
-
Method Detail
-
createPost
@NotAuditable PostInfo createPost(TopicInfo topic, String contents)
Creates a newPostInfoin the given topic, with the specified contents. Normally only one post is created this way on a topic, and the remainder of the posts are created as replies to thegetPrimaryPost(TopicInfo)primary post.- Returns:
- The newly created
PostInfo
-
createReply
@NotAuditable PostInfo createReply(PostInfo parentPost, String contents)
Creates a newPostInfowhich is a reply to the specified other post, with the given contents. The link between the parent post and the reply is created as part of this.- Returns:
- The newly created
PostInfo
-
createTopic
@NotAuditable TopicInfo createTopic(String siteShortName, String title)
Creates a newTopicInfoin the given site
-
createTopic
@NotAuditable TopicInfo createTopic(org.alfresco.service.cmr.repository.NodeRef parentNodeRef, String title)
Creates a newTopicInfoattached to the specified Node. The parent Node should normally either be a Site Container, or aForumModel.TYPE_FORUM
-
updatePost
@NotAuditable PostInfo updatePost(PostInfo post)
Updates an existingPostInfoin the repository.- Returns:
- The updated
PostInfo
-
updateTopic
@NotAuditable TopicInfo updateTopic(TopicInfo topic)
Updates an existingTopicInfoin the repository.- Returns:
- The updated
TopicInfo
-
deletePost
@NotAuditable void deletePost(PostInfo post)
Deletes an existingPostInfofrom the repository
-
deleteTopic
@NotAuditable void deleteTopic(TopicInfo topic)
Deletes an existingTopicInfofrom the repository
-
getForNodeRef
@NotAuditable org.alfresco.util.Pair<TopicInfo,PostInfo> getForNodeRef(org.alfresco.service.cmr.repository.NodeRef nodeRef)
-
getPost
@NotAuditable PostInfo getPost(TopicInfo topic, String postName)
Retrieves an existingPostInfofrom the repository
-
getPrimaryPost
@NotAuditable PostInfo getPrimaryPost(TopicInfo topic)
Retrieves the Primary (Root) Post in a topic, to which all replies belong. Returns null if the topic currently has no posts
-
getMostRecentPost
@NotAuditable PostInfo getMostRecentPost(TopicInfo topic)
Retrieves the newest (most recent) Post in a topic, be that the Primary Post or a Reply. This is typically used when identifying if a topic has had new posts added to it since the user last saw it. Note that this works on Created Date, and not Modified/Updated, so edits to an existing post will not change this.
-
getTopic
@NotAuditable TopicInfo getTopic(String siteShortName, String linkName)
Retrieves an existingTopicInfofrom the repository, which is within a site
-
getTopic
@NotAuditable TopicInfo getTopic(org.alfresco.service.cmr.repository.NodeRef parentNodeRef, String topicName)
Retrieves an existingTopicInfofrom the repository, which is attached to the specified Node. The parent Node should normally either be a Site Container, or aForumModel.TYPE_FORUM
-
listTopics
@NotAuditable org.alfresco.query.PagingResults<TopicInfo> listTopics(String siteShortName, boolean sortAscending, org.alfresco.query.PagingRequest paging)
Retrieves all topics in a site, sorted by either oldest or newest topics first.
-
listTopics
@NotAuditable org.alfresco.query.PagingResults<TopicInfo> listTopics(org.alfresco.service.cmr.repository.NodeRef nodeRef, boolean sortAscending, org.alfresco.query.PagingRequest paging)
Retrieves all topics attached to the specified Node, sorted by either oldest or newest topics first.
-
listTopics
@NotAuditable org.alfresco.query.PagingResults<TopicInfo> listTopics(String siteShortName, String username, boolean sortAscending, org.alfresco.query.PagingRequest paging)
Retrieves all topics in a site, filtered by username, sorted by either oldest or newest topics first.
-
listTopics
@NotAuditable org.alfresco.query.PagingResults<TopicInfo> listTopics(org.alfresco.service.cmr.repository.NodeRef nodeRef, String username, boolean sortAscending, org.alfresco.query.PagingRequest paging)
Retrieves all topics attached to the specified Node, filtered by username, sorted by either oldest or newest topics first.
-
listTopics
@NotAuditable org.alfresco.query.PagingResults<TopicInfo> listTopics(String siteShortName, Date from, Date to, boolean sortAscending, org.alfresco.query.PagingRequest paging)
Retrieves all topics in a site, created in the given date range, sorted by either oldest or newest topics first.
-
listTopics
@NotAuditable org.alfresco.query.PagingResults<TopicInfo> listTopics(org.alfresco.service.cmr.repository.NodeRef nodeRef, Date from, Date to, boolean sortAscending, org.alfresco.query.PagingRequest paging)
Retrieves all topics attached to the specified Node, created in the given date range, sorted by either oldest or newest topics first.
-
findTopics
@NotAuditable org.alfresco.query.PagingResults<TopicInfo> findTopics(String siteShortName, String username, String tag, boolean sortAscending, org.alfresco.query.PagingRequest paging)
Searches for all topics in a site, filtered by username or tag, sorted by either oldest or newest topics first.
-
findTopics
@NotAuditable org.alfresco.query.PagingResults<TopicInfo> findTopics(org.alfresco.service.cmr.repository.NodeRef nodeRef, String username, String tag, boolean sortAscending, org.alfresco.query.PagingRequest paging)
Searches for all topics attached to the specified Node, filtered by username or tag, sorted by either oldest or newest topics first.
-
listHotTopics
@NotAuditable org.alfresco.query.PagingResults<org.alfresco.util.Pair<TopicInfo,Integer>> listHotTopics(String siteShortName, Date since, org.alfresco.query.PagingRequest paging)
Finds topics which have had replies since the specified date, and returns them along with the count of replies since then. Primary posts are not included in this.
-
listHotTopics
@NotAuditable org.alfresco.query.PagingResults<org.alfresco.util.Pair<TopicInfo,Integer>> listHotTopics(org.alfresco.service.cmr.repository.NodeRef nodeRef, Date since, org.alfresco.query.PagingRequest paging)
Finds topics which have had replies since the specified date, and returns them along with the count of replies since then. Primary posts are not included in this.
-
listPosts
@NotAuditable org.alfresco.query.PagingResults<PostInfo> listPosts(TopicInfo topic, org.alfresco.query.PagingRequest paging)
Retrieves all posts in a topic, ordered by creation date
-
listPostReplies
@NotAuditable PostWithReplies listPostReplies(TopicInfo forum, int levels)
Retrieves all replies on a Topic
-
listPostReplies
@NotAuditable PostWithReplies listPostReplies(PostInfo primaryPost, int levels)
Retrieves all replies to a Post
-
-