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 TypeMethodDescriptionvoidcreateAdministrator(NewAdministrator newAdministrator) Persists the freshly created initial administrator.booleanReturnstruewhen at least one active administrator account exists.
-
Method Details
-
hasAnyAdministrator
boolean hasAnyAdministrator()Returnstruewhen at least one active administrator account exists. The bootstrap mechanism stops being available as soon as this returnstrue. -
createAdministrator
Persists the freshly created initial administrator. Implementations must storeNewAdministrator.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
-