Package passport.infra.json
Class UsersJson
java.lang.Object
passport.infra.json.UsersJson
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor 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.booleanhas(EmailAddress email) Checks if an user exists by their email.list()Lists all users.Retrieves an user by their email and password.voidRegisters a new user.voidUpdates 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