Package passport.infra.json
Class EventsJson
java.lang.Object
passport.infra.json.EventsJson
-
Constructor Summary
ConstructorDescriptionEventsJson
(JsonFile filepath) Constructor initializing the repository with a file path.EventsJson
(JsonFile file, EventsInMemory repository) Constructor initializing the repository with a file and in-memory repository. -
Method Summary
Modifier and TypeMethodDescriptionavailableOn
(LocalDate date) Lists all events available on a specific date.Retrieves an event by its ID.Retrieves an event by its title and date.boolean
Checks if an event exists by its title and date.boolean
Checks if an event exists by its ID.list()
Lists all events.void
Registers a new event.void
Updates an existing event.
-
Constructor Details
-
EventsJson
Constructor initializing the repository with a file path.- Parameters:
filepath
- the path to the JSON file
-
EventsJson
Constructor initializing the repository with a file and in-memory repository.- Parameters:
file
- the JSON filerepository
- the in-memory events repository
-
-
Method Details