Class DefaultFollowManager

    • Method Detail

      • isUserFollowing

        public boolean isUserFollowing​(com.atlassian.user.User follower,
                                       com.atlassian.user.User followee)
        Description copied from interface: FollowManager
        True if the follower is following the followee
        Specified by:
        isUserFollowing in interface FollowManager
        Parameters:
        follower - the proposed follower
        followee - the proposed followee
        Returns:
        true if the follower is following the followee
      • followUser

        public void followUser​(ConfluenceUser follower,
                               ConfluenceUser followee)
        Description copied from interface: FollowManager
        Sets the follower to follow the specified user. If the follow is alreading following the followee then this method does nothing.
        Specified by:
        followUser in interface FollowManager
        Parameters:
        follower - the follower
        followee - the new followee
      • unfollowUser

        public void unfollowUser​(com.atlassian.user.User follower,
                                 com.atlassian.user.User followee)
        Description copied from interface: FollowManager
        Unsets the follower from following the specified user. If the follow is not following the followee then this method does nothing.
        Specified by:
        unfollowUser in interface FollowManager
        Parameters:
        follower - the follower
        followee - the new followee
      • removeAllConnectionsFor

        public void removeAllConnectionsFor​(com.atlassian.user.User user)
        Description copied from interface: FollowManager
        Removes all connections for this user (as a follower and as a followee).
        Specified by:
        removeAllConnectionsFor in interface FollowManager
        Parameters:
        user - the user
      • getFollowers

        public <T> Paginated<T> getFollowers​(ConfluenceUser user,
                                             PaginationQuery<ConfluenceUser,​T> query)
        Description copied from interface: FollowManagerInternal
        Constructs a new Paginated response containing the followers of specified user, limited and converted by the given PaginationQuery.

        NOTE: this method will implicitly add a Predicate filtering results to ConfluenceUsers that are permitted to use Confluence.

        Specified by:
        getFollowers in interface FollowManagerInternal
        Parameters:
        user - the user to check for followers
        query - a constructed PaginationQuery containing optional predicates and model conversion strategy.
        Returns:
        a Paginated response ready for page requests or paged iteration.
      • getFollowing

        public <T> Paginated<T> getFollowing​(ConfluenceUser user,
                                             PaginationQuery<ConfluenceUser,​T> query)
        Description copied from interface: FollowManagerInternal
        Returns a list of users that the specified user is following, limited and converted by the given PaginationQuery.
        Specified by:
        getFollowing in interface FollowManagerInternal
        Parameters:
        user - the user to check for followees
        query - a constructed PaginationQuery containing optional predicates and model conversion strategy.
        Returns:
        a list of usernames