Interface DiscussionService

  • All Known Implementing Classes:
    DiscussionServiceImpl

    public interface DiscussionService
    The Discussions service.
    Since:
    4.0
    Author:
    Nick Burch
    • Method Detail

      • createReply

        @NotAuditable
        PostInfo createReply​(PostInfo parentPost,
                             String contents)
        Creates a new PostInfo which 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
      • getForNodeRef

        @NotAuditable
        Pair<TopicInfo,​PostInfo> getForNodeRef​(NodeRef nodeRef)
        For a given NodeRef corresponding to either a TopicInfo or a PostInfo, returns the objects wrapping the Node. For a Topic, the 2nd half of the pair is null. For a Post, both halves of the pair are set. For anything else, the response is null.
      • 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.
      • 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​(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​(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​(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​(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<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<Pair<TopicInfo,​Integer>> listHotTopics​(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