Interface IProfileService

All Known Implementing Classes:
CachingProfileService, PluginMessagingProfileService

public interface IProfileService
Represents a store for cached user data from the GamerSafer API.
  • Method Details

    • startLoginProcess

      default CompletableFuture<Void> startLoginProcess(UserIdentity identity, LoginHandler loginHandler)
    • startLoginProcess

      CompletableFuture<Void> startLoginProcess(UserIdentity identity, LoginHandler loginHandler, boolean forceVerify)
    • getLoginConfirmation

      boolean getLoginConfirmation(UserIdentity identity)
    • hasLoginConfirmation

      boolean hasLoginConfirmation(UserIdentity identity)
    • evictRetention

      void evictRetention(Set<UserIdentity> onlinePlayers)
      Refreshes player data access times so that they do not get evicted.
      Parameters:
      onlinePlayers - a set of UserIdentity that should NOT be evicted
    • evict

      void evict(UserIdentity user)
      Removes the user from the cache.
      Parameters:
      user - the user to evict
    • testConnection

      CompletableFuture<Boolean> testConnection()
      Test the connection to the API
      Returns:
      whether the connection to the API was successful
    • logUserLogin

      CompletableFuture<Void> logUserLogin(String guildMemberId, UserIdentity identity)
      Logs a user login in the API.
      Parameters:
      guildMemberId - the GamerSafer guild member id
      identity - the player name and uuid
      Returns:
      a CompletableFuture
    • submitLogReport

      CompletableFuture<Boolean> submitLogReport(ReportLog log)
      Submits the LogReport to the API.
      Parameters:
      log - the LogReport
      Returns:
      a CompletableFuture indicating submission success
    • invite

      CompletableFuture<String> invite(UUID uuid)
      Submits a guild invite request
      Parameters:
      uuid - the GamerSafer guild member id
      Returns:
      a QR code image in Data-URI format, or null the player does not have a GamerSafer account, the request timed out/failed
    • verify

      CompletableFuture<String> verify(String guildMemberId)
      Submits a guild member verification request
      Parameters:
      guildMemberId - the GamerSafer guild member id
      Returns:
      the verification id of the verification
    • shutdown

      void shutdown()
      Properly shuts down the service.