com.atlassian.confluence.follow
Class DefaultFollowManager

java.lang.Object
  extended by com.atlassian.confluence.follow.DefaultFollowManager
All Implemented Interfaces:
FollowManager, FollowManagerInternal

public class DefaultFollowManager
extends Object
implements FollowManagerInternal


Nested Class Summary
static class DefaultFollowManager.UserCanUseConfluencePredicate
           
 
Constructor Summary
DefaultFollowManager(ConnectionDao connectionDao, SpacePermissionManager spacePermissionManager, com.atlassian.event.api.EventPublisher eventPublisher, PaginationServiceInternal paginationService)
           
 
Method Summary
 void followUser(ConfluenceUser follower, ConfluenceUser followee)
          Sets the follower to follow the specified user.
 void followUser(com.atlassian.user.User follower, com.atlassian.user.User followee)
          Deprecated. 
<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.
 List<String> getFollowers(com.atlassian.user.User user)
          Deprecated. 
 Set<ConfluenceUser> getFollowing(ConfluenceUser user)
          Deprecated. 
<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.
 List<String> getFollowing(com.atlassian.user.User user)
          Deprecated. 
 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 setUserAccessor(UserAccessor userAccessor)
           
 void unfollowUser(com.atlassian.user.User follower, com.atlassian.user.User followee)
          Unsets the follower from following the specified user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFollowManager

public DefaultFollowManager(ConnectionDao connectionDao,
                            SpacePermissionManager spacePermissionManager,
                            com.atlassian.event.api.EventPublisher eventPublisher,
                            PaginationServiceInternal paginationService)
Method Detail

getFollowers

@Deprecated
public List<String> getFollowers(com.atlassian.user.User user)
Deprecated. 

Description copied from interface: FollowManager
Returns a list of users that are followers of the specified user

Specified by:
getFollowers in interface FollowManager
Parameters:
user - the user to check for followers
Returns:
a list of usernames
See Also:
com.atlassian.confluence.internal.follow.FollowManagerInternal#getFollowers(com.atlassian.confluence.user.ConfluenceUser, com.atlassian.confluence.api.impl.pagination.PaginationQuery)}, com.atlassian.confluence.api.service.network.NetworkService}

getFollowing

@Deprecated
public Set<ConfluenceUser> getFollowing(ConfluenceUser user)
Deprecated. 

Description copied from interface: FollowManager
Returns a list of usernames for the users that the specified user is following

Specified by:
getFollowing in interface FollowManager
Parameters:
user - the username
Returns:
a list of usernames
See Also:
com.atlassian.confluence.internal.follow.FollowManagerInternal#getFollowing(com.atlassian.confluence.user.ConfluenceUser, com.atlassian.confluence.api.impl.pagination.PaginationQuery)}, com.atlassian.confluence.api.service.network.NetworkService}

getFollowing

@Deprecated
public List<String> getFollowing(com.atlassian.user.User user)
Deprecated. 

Description copied from interface: FollowManager
Returns a list of usernames for the users that the specified user is following

Specified by:
getFollowing in interface FollowManager
Parameters:
user - the username
Returns:
a list of usernames
See Also:
com.atlassian.confluence.internal.follow.FollowManagerInternal#getFollowing(com.atlassian.confluence.user.ConfluenceUser, com.atlassian.confluence.api.impl.pagination.PaginationQuery)}, com.atlassian.confluence.api.service.network.NetworkService}

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

followUser

@Deprecated
public void followUser(com.atlassian.user.User follower,
                                  com.atlassian.user.User followee)
Deprecated. 

Specified by:
followUser in interface FollowManager

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

setUserAccessor

public void setUserAccessor(UserAccessor userAccessor)


Copyright © 2003–2015 Atlassian. All rights reserved.