Interface FriendService


public interface FriendService
  • Method Details

    • areFriends

      boolean areFriends(int userId, int targetId)
    • getFriendship

      @NotNull @NotNull Optional<Friendship> getFriendship(int userId, int targetId)
    • getFriends

      @NotNull @NotNull Collection<User> getFriends(int userId)
    • getOnlineFriends

      @NotNull @NotNull Collection<User> getOnlineFriends(int userId)
    • getFriendCount

      int getFriendCount(int userId)
    • removeFriend

      @NotNull @NotNull FriendResult removeFriend(int userId, int targetId)
    • hasPendingRequest

      boolean hasPendingRequest(int senderId, int receiverId)
    • getPendingRequest

      @NotNull @NotNull Optional<FriendRequest> getPendingRequest(int senderId, int receiverId)
    • getIncomingRequests

      @NotNull @NotNull Collection<FriendRequest> getIncomingRequests(int userId)
    • getOutgoingRequests

      @NotNull @NotNull Collection<FriendRequest> getOutgoingRequests(int userId)
    • getIncomingRequestCount

      int getIncomingRequestCount(int userId)
    • getOutgoingRequestCount

      int getOutgoingRequestCount(int userId)
    • sendFriendRequest

      @NotNull @NotNull FriendResult sendFriendRequest(int senderId, int receiverId)
    • acceptFriendRequest

      @NotNull @NotNull FriendResult acceptFriendRequest(int receiverId, int senderId)
    • denyFriendRequest

      @NotNull @NotNull FriendResult denyFriendRequest(int receiverId, int senderId)
    • cancelFriendRequest

      @NotNull @NotNull FriendResult cancelFriendRequest(int senderId, int receiverId)
    • isFavorite

      boolean isFavorite(int ownerId, int friendId)
    • getFavorite

      @NotNull @NotNull Optional<FriendFavorite> getFavorite(int ownerId, int friendId)
    • getFavorites

      @NotNull @NotNull Collection<User> getFavorites(int ownerId)
    • getFavoriteCount

      int getFavoriteCount(int ownerId)
    • addFavorite

      @NotNull @NotNull FriendResult addFavorite(int ownerId, int friendId)
    • removeFavorite

      @NotNull @NotNull FriendResult removeFavorite(int ownerId, int friendId)
    • isBlocked

      boolean isBlocked(int userId, int targetId)
    • isBlockedEitherWay

      boolean isBlockedEitherWay(int userId, int targetId)
    • getBlockedUsers

      @NotNull @NotNull Collection<User> getBlockedUsers(int userId)
    • getBlockedUserCount

      int getBlockedUserCount(int userId)
    • blockUser

      @NotNull @NotNull FriendResult blockUser(int userId, int targetId)
    • unblockUser

      @NotNull @NotNull FriendResult unblockUser(int userId, int targetId)
    • getSettings

      @NotNull @NotNull FriendSettings getSettings(int userId)
    • updateSettings

      @NotNull @NotNull FriendResult updateSettings(int userId, boolean allowRequests, boolean showServer, boolean allowFollow, boolean loginNotify)
    • setAllowRequests

      @NotNull @NotNull FriendResult setAllowRequests(int userId, boolean enabled)
    • setShowServer

      @NotNull @NotNull FriendResult setShowServer(int userId, boolean enabled)
    • setAllowFollow

      @NotNull @NotNull FriendResult setAllowFollow(int userId, boolean enabled)
    • setLoginNotify

      @NotNull @NotNull FriendResult setLoginNotify(int userId, boolean enabled)
    • resetSettings

      @NotNull @NotNull FriendResult resetSettings(int userId)
    • canViewServer

      boolean canViewServer(int viewerId, int targetId)
    • canFollow

      boolean canFollow(int followerId, int targetId)
    • shouldNotifyLogin

      boolean shouldNotifyLogin(int recipientId, int loggedInUserId)
    • of

      @Internal @NotNull static @NotNull FriendService of(@NotNull @NotNull FriendProvider provider, @NotNull @NotNull UserProvider userProvider, @NotNull @NotNull UserSessionProvider sessionProvider)