com.atlassian.confluence.follow
Class DefaultFollowManager

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

public class DefaultFollowManager
extends java.lang.Object
implements FollowManager


Constructor Summary
DefaultFollowManager(ConnectionDao connectionDao, SpacePermissionManager spacePermissionManager, com.atlassian.event.api.EventPublisher eventPublisher)
           
 
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. 
 java.util.List<java.lang.String> getFollowers(com.atlassian.user.User user)
          Returns a list of users that are followers of the specified user
 java.util.Set<ConfluenceUser> getFollowing(ConfluenceUser user)
          Returns a list of usernames for the users that the specified user is following
 java.util.List<java.lang.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 setSpacePermissionManager(SpacePermissionManager spacePermissionManager)
           
 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)
Method Detail

getFollowers

public java.util.List<java.lang.String> getFollowers(com.atlassian.user.User user)
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

getFollowing

public java.util.Set<ConfluenceUser> getFollowing(ConfluenceUser user)
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

getFollowing

@Deprecated
public java.util.List<java.lang.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

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

setSpacePermissionManager

public void setSpacePermissionManager(SpacePermissionManager spacePermissionManager)

setUserAccessor

public void setUserAccessor(UserAccessor userAccessor)


Copyright © 2003-2013 Atlassian. All Rights Reserved.