Interface FollowerService
- All Known Implementing Classes:
SuperUserFollowerService
,UserFollowerService
public interface FollowerService
Allows access to instances of
CreateFollowerRequest
. This is responsible for determining the current Profile
as well
and ensuring that the associated CreateFollowerRequest
instances are properly filtered and represented.-
Method Summary
Modifier and TypeMethodDescriptionvoid
createFollower
(String profileId, CreateFollowerRequest createFollowerRequest) Creates a follower link between two profilesvoid
deleteFollower
(String profileId, String profileToUnfollowId) Deletes the link between the supplied profile id's, throwing an exception if the supplied id is not valid.getFollowees
(String profileId, int offset, int count) Gets the listing ofProfile
's followees with the supplied offset and count.getFollower
(String profileId, String followedId) Gets the listing ofProfile
with the supplied offset, count, and search query.getFollowers
(String profileId, int offset, int count) Gets the listing ofProfile
's followers with the supplied offset and count.default Profile
redactPrivateInformation
(Profile profile) Redacts any private information from theProfile
and returns either a new instance or the current instance modified.
-
Method Details
-
getFollowers
Gets the listing ofProfile
's followers with the supplied offset and count.- Parameters:
profileId
- the profile id to fetch followers foroffset
- the offsetcount
- the count- Returns:
- the list of
Profile
instances
-
getFollowees
Gets the listing ofProfile
's followees with the supplied offset and count.- Parameters:
profileId
- the profile id to fetch followers foroffset
- the offsetcount
- the count- Returns:
- the list of
Profile
instances
-
getFollower
Gets the listing ofProfile
with the supplied offset, count, and search query.- Parameters:
profileId
- the profile id to fetch the follower forfollowedId
- the specific follower id to get the profile for- Returns:
Profile
instance
-
createFollower
Creates a follower link between two profiles- Parameters:
profileId
- the id of the user profilecreateFollowerRequest
- the request body containing the the id of the profile to follow.
-
deleteFollower
Deletes the link between the supplied profile id's, throwing an exception if the supplied id is not valid.- Parameters:
profileId
- the id of the user profile.profileToUnfollowId
- the id of the profile to unfollow
-
redactPrivateInformation
Redacts any private information from theProfile
and returns either a new instance or the current instance modified. The default implementation simply sets the user to null and returns the supplied instance. Other implementations such as those used for superuser access may redact information differently.
-