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 Details

    • getFollowers

      Pagination<Profile> getFollowers(String profileId, int offset, int count)
      Gets the listing of Profile's followers with the supplied offset and count.
      Parameters:
      profileId - the profile id to fetch followers for
      offset - the offset
      count - the count
      Returns:
      the list of Profile instances
    • getFollowees

      Pagination<Profile> getFollowees(String profileId, int offset, int count)
      Gets the listing of Profile's followees with the supplied offset and count.
      Parameters:
      profileId - the profile id to fetch followers for
      offset - the offset
      count - the count
      Returns:
      the list of Profile instances
    • getFollower

      Profile getFollower(String profileId, String followedId)
      Gets the listing of Profile with the supplied offset, count, and search query.
      Parameters:
      profileId - the profile id to fetch the follower for
      followedId - the specific follower id to get the profile for
      Returns:
      Profile instance
    • createFollower

      void createFollower(String profileId, CreateFollowerRequest createFollowerRequest)
      Creates a follower link between two profiles
      Parameters:
      profileId - the id of the user profile
      createFollowerRequest - the request body containing the the id of the profile to follow.
    • deleteFollower

      void deleteFollower(String profileId, String profileToUnfollowId)
      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

      default Profile redactPrivateInformation(Profile profile)
      Redacts any private information from the Profile 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.
      Parameters:
      profile - the Profile from which to redact private information
      Returns:
      a Profile with the information redacted (may be the same instance provided