Package com.atlassian.confluence.follow
Class DefaultFollowManager
- java.lang.Object
-
- com.atlassian.confluence.follow.DefaultFollowManager
-
- All Implemented Interfaces:
FollowManager,FollowManagerInternal
public class DefaultFollowManager extends Object implements FollowManagerInternal
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDefaultFollowManager.CanUserUseConfluencestatic classDefaultFollowManager.UserCanUseConfluencePredicateDeprecated.since 7.0.1.
-
Constructor Summary
Constructors Constructor Description DefaultFollowManager(ConnectionDao connectionDao, SpacePermissionManager spacePermissionManager, com.atlassian.event.api.EventPublisher eventPublisher, PaginationServiceInternal paginationService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfollowUser(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 Detail
-
DefaultFollowManager
public DefaultFollowManager(ConnectionDao connectionDao, SpacePermissionManager spacePermissionManager, com.atlassian.event.api.EventPublisher eventPublisher, PaginationServiceInternal paginationService)
-
-
Method Detail
-
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
public void followUser(ConfluenceUser follower, ConfluenceUser followee)
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
public <T> Paginated<T> getFollowers(ConfluenceUser user, PaginationQuery<ConfluenceUser,T> query)
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
public <T> Paginated<T> getFollowing(ConfluenceUser user, PaginationQuery<ConfluenceUser,T> query)
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
-
-