Package com.atlassian.confluence.follow
Class DefaultFollowManager
java.lang.Object
com.atlassian.confluence.follow.DefaultFollowManager
- All Implemented Interfaces:
FollowManager,FollowManagerInternal
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classDeprecated.since 7.0.1. -
Constructor Summary
ConstructorsConstructorDescriptionDefaultFollowManager(ConnectionRepository connectionDao, SpacePermissionManager spacePermissionManager, com.atlassian.event.api.EventPublisher eventPublisher, PaginationServiceInternal paginationService) -
Method Summary
Modifier and TypeMethodDescriptionvoidfollowUser(ConfluenceUser follower, ConfluenceUser followee) Sets the follower to follow the specified user.<T> Paginated<T> getFollowers(ConfluenceUser user, PaginationQuery<ConfluenceUser, T> query) Constructs a new Paginated response containing the followers of specified user, limited and converted by the given PaginationQuery.<T> Paginated<T> getFollowing(ConfluenceUser user, PaginationQuery<ConfluenceUser, T> query) Returns a list of users that the specified user is following, limited and converted by the given PaginationQuery.booleanisUserFollowing(com.atlassian.user.User follower, com.atlassian.user.User followee) True if the follower is following the followeevoidremoveAllConnectionsFor(com.atlassian.user.User user) Removes all connections for this user (as a follower and as a followee).voidunfollowUser(com.atlassian.user.User follower, com.atlassian.user.User followee) Unsets the follower from following the specified user.
-
Constructor Details
-
DefaultFollowManager
public DefaultFollowManager(ConnectionRepository connectionDao, SpacePermissionManager spacePermissionManager, com.atlassian.event.api.EventPublisher eventPublisher, PaginationServiceInternal paginationService)
-
-
Method Details
-
isUserFollowing
public boolean isUserFollowing(com.atlassian.user.User follower, com.atlassian.user.User followee) Description copied from interface:FollowManagerTrue if the follower is following the followee- Specified by:
isUserFollowingin interfaceFollowManager- Parameters:
follower- the proposed followerfollowee- the proposed followee- Returns:
- true if the follower is following the followee
-
followUser
Description copied from interface:FollowManagerSets the follower to follow the specified user. If the follow is alreading following the followee then this method does nothing.- Specified by:
followUserin interfaceFollowManager- Parameters:
follower- the followerfollowee- the new followee
-
unfollowUser
public void unfollowUser(com.atlassian.user.User follower, com.atlassian.user.User followee) Description copied from interface:FollowManagerUnsets the follower from following the specified user. If the follow is not following the followee then this method does nothing.- Specified by:
unfollowUserin interfaceFollowManager- Parameters:
follower- the followerfollowee- the new followee
-
removeAllConnectionsFor
public void removeAllConnectionsFor(com.atlassian.user.User user) Description copied from interface:FollowManagerRemoves all connections for this user (as a follower and as a followee).- Specified by:
removeAllConnectionsForin interfaceFollowManager- Parameters:
user- the user
-
getFollowers
Description copied from interface:FollowManagerInternalConstructs 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:
getFollowersin interfaceFollowManagerInternal- Parameters:
user- the user to check for followersquery- a constructed PaginationQuery containing optional predicates and model conversion strategy.- Returns:
- a Paginated response ready for page requests or paged iteration.
-
getFollowing
Description copied from interface:FollowManagerInternalReturns a list of users that the specified user is following, limited and converted by the given PaginationQuery.- Specified by:
getFollowingin interfaceFollowManagerInternal- Parameters:
user- the user to check for followeesquery- a constructed PaginationQuery containing optional predicates and model conversion strategy.- Returns:
- a list of usernames
-