public class DefaultFollowManager extends Object implements FollowManagerInternal
Modifier and Type | Class and Description |
---|---|
static class |
DefaultFollowManager.CanUserUseConfluence |
static class |
DefaultFollowManager.UserCanUseConfluencePredicate
Deprecated.
since 7.0.1. Use
DefaultFollowManager.CanUserUseConfluence |
Constructor and Description |
---|
DefaultFollowManager(ConnectionDao connectionDao,
SpacePermissionManager spacePermissionManager,
com.atlassian.event.api.EventPublisher eventPublisher,
PaginationServiceInternal paginationService) |
Modifier and Type | Method and Description |
---|---|
void |
followUser(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.
|
boolean |
isUserFollowing(com.atlassian.user.User follower,
com.atlassian.user.User followee)
True if the follower is following the followee
|
void |
removeAllConnectionsFor(com.atlassian.user.User user)
Removes all connections for this user (as a follower and as a followee).
|
void |
unfollowUser(com.atlassian.user.User follower,
com.atlassian.user.User followee)
Unsets the follower from following the specified user.
|
public DefaultFollowManager(ConnectionDao connectionDao, SpacePermissionManager spacePermissionManager, com.atlassian.event.api.EventPublisher eventPublisher, PaginationServiceInternal paginationService)
public boolean isUserFollowing(com.atlassian.user.User follower, com.atlassian.user.User followee)
FollowManager
isUserFollowing
in interface FollowManager
follower
- the proposed followerfollowee
- the proposed followeepublic void followUser(ConfluenceUser follower, ConfluenceUser followee)
FollowManager
followUser
in interface FollowManager
follower
- the followerfollowee
- the new followeepublic void unfollowUser(com.atlassian.user.User follower, com.atlassian.user.User followee)
FollowManager
unfollowUser
in interface FollowManager
follower
- the followerfollowee
- the new followeepublic void removeAllConnectionsFor(com.atlassian.user.User user)
FollowManager
removeAllConnectionsFor
in interface FollowManager
user
- the userpublic <T> Paginated<T> getFollowers(ConfluenceUser user, PaginationQuery<ConfluenceUser,T> query)
FollowManagerInternal
NOTE: this method will implicitly add a Predicate filtering results to ConfluenceUsers that are permitted to use Confluence.
getFollowers
in interface FollowManagerInternal
user
- the user to check for followersquery
- a constructed PaginationQuery containing optional predicates and model conversion strategy.public <T> Paginated<T> getFollowing(ConfluenceUser user, PaginationQuery<ConfluenceUser,T> query)
FollowManagerInternal
getFollowing
in interface FollowManagerInternal
user
- the user to check for followeesquery
- a constructed PaginationQuery containing optional predicates and model conversion strategy.Copyright © 2003–2019 Atlassian. All rights reserved.