Interface AdministratorAccountStore


public interface AdministratorAccountStore
Application-side seam used by InitialAdminBootstrapService to answer "is anyone an administrator?" and to persist the freshly created initial administrator. The library does not own the user model — the consuming application supplies it.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Persists the freshly created initial administrator.
    boolean
    Returns true when at least one active administrator account exists.
  • Method Details

    • hasAnyAdministrator

      boolean hasAnyAdministrator()
      Returns true when at least one active administrator account exists. The bootstrap mechanism stops being available as soon as this returns true.
    • createAdministrator

      void createAdministrator(NewAdministrator newAdministrator)
      Persists the freshly created initial administrator. Implementations must store NewAdministrator.passwordHash() as-is — no further hashing.
      Parameters:
      newAdministrator - the administrator account to persist
      Throws:
      RuntimeException - if the username already exists or the underlying store fails