Interface ConnectionDao
-
- All Known Implementing Classes:
HibernateConnectionDao
@Transactional(readOnly=true) public interface ConnectionDao
DAO for connections between followers and followees.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description void
followUser(com.atlassian.user.User follower, com.atlassian.user.User followee)
Sets the follower to follow the specified user.default PageResponse<ConfluenceUser>
getFilteredFollowees(ConfluenceUser follower, LimitedRequest limitedRequest, Predicate<ConfluenceUser> predicate)
Returns a list of usernames for the users that the specified user is followingdefault PageResponse<ConfluenceUser>
getFilteredFollowers(ConfluenceUser followee, LimitedRequest limitedRequest, Predicate<ConfluenceUser> predicate)
Returns a list of users that are followers of the specified userPageResponse<ConfluenceUser>
getFollowees(ConfluenceUser follower, LimitedRequest limitedRequest, com.google.common.base.Predicate<ConfluenceUser> predicate)
Deprecated.since 7.0.1.PageResponse<ConfluenceUser>
getFollowers(ConfluenceUser followee, LimitedRequest limitedRequest, com.google.common.base.Predicate<ConfluenceUser> predicate)
Deprecated.since 7.0.1.boolean
isUserFollowing(com.atlassian.user.User follower, com.atlassian.user.User followee)
True if the follower is following the followeevoid
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.
-
-
-
Method Detail
-
getFollowers
@Deprecated PageResponse<ConfluenceUser> getFollowers(ConfluenceUser followee, LimitedRequest limitedRequest, com.google.common.base.Predicate<ConfluenceUser> predicate)
Deprecated.since 7.0.1. UsegetFilteredFollowers(ConfluenceUser, LimitedRequest, Predicate)
Returns a list of users that are followers of the specified user- Parameters:
followee
- the user to check for followers- Returns:
- a list of usernames
-
getFilteredFollowers
default PageResponse<ConfluenceUser> getFilteredFollowers(ConfluenceUser followee, LimitedRequest limitedRequest, Predicate<ConfluenceUser> predicate)
Returns a list of users that are followers of the specified user- Parameters:
followee
- the user to check for followers- Returns:
- a list of usernames
- Since:
- 7.0.1
-
getFollowees
@Deprecated PageResponse<ConfluenceUser> getFollowees(ConfluenceUser follower, LimitedRequest limitedRequest, com.google.common.base.Predicate<ConfluenceUser> predicate)
Deprecated.since 7.0.1. UsegetFilteredFollowees(ConfluenceUser, LimitedRequest, Predicate)
Returns a list of usernames for the users that the specified user is following- Parameters:
follower
- the username- Returns:
- a list of usernames
-
getFilteredFollowees
default PageResponse<ConfluenceUser> getFilteredFollowees(ConfluenceUser follower, LimitedRequest limitedRequest, Predicate<ConfluenceUser> predicate)
Returns a list of usernames for the users that the specified user is following- Parameters:
follower
- the username- Returns:
- a list of usernames
- Since:
- 7.0.1
-
isUserFollowing
boolean isUserFollowing(com.atlassian.user.User follower, com.atlassian.user.User followee)
True if the follower is following the followee- Parameters:
follower
- the proposed followerfollowee
- the proposed followee- Returns:
- true if the follower is following the followee
-
followUser
@Transactional void followUser(com.atlassian.user.User follower, com.atlassian.user.User followee)
Sets the follower to follow the specified user. If the follow is alreading following the followee then this method does nothing.- Parameters:
follower
- the followerfollowee
- the new followee
-
unfollowUser
@Transactional void unfollowUser(com.atlassian.user.User follower, com.atlassian.user.User followee)
Unsets the follower from following the specified user. If the follow is not following the followee then this method does nothing.- Parameters:
follower
- the followerfollowee
- the new followee
-
removeAllConnectionsFor
@Transactional void removeAllConnectionsFor(com.atlassian.user.User user)
Removes all connections for this user (as a follower and as a followee).- Parameters:
user
- the user
-
-