Package passport.infra.json
Class UsersJson
java.lang.Object
passport.infra.json.UsersJson
-
Constructor Summary
ConstructorDescriptionConstructor initializing the repository with a file path.UsersJson
(JsonFile filepath, UsersInMemory repository) Constructor initializing the repository with a file and in-memory repository. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves an user by their ID.boolean
has
(EmailAddress email) Checks if an user exists by their email.list()
Lists all users.Retrieves an user by their email and password.void
Registers a new user.void
Updates an existing user.
-
Constructor Details
-
UsersJson
Constructor initializing the repository with a file path.- Parameters:
filepath
- the path to the JSON file
-
UsersJson
Constructor initializing the repository with a file and in-memory repository.- Parameters:
filepath
- the JSON filerepository
- the in-memory users repository
-
-
Method Details