Package org.localify.event
Class EventServiceImpl
java.lang.Object
org.localify.event.EventServiceImpl
- All Implemented Interfaces:
EventService
Implementation of the EventService interface.
-
Constructor Summary
ConstructorsConstructorDescriptionEventServiceImpl(UserFavoriteEventRepository userFavoriteEventRepository, UserRepository userRepository, EventRepository eventRepository, VenueRepository venueRepository, LocalifyProperties properties, ArtistRepository artistRepository, UserRecentEventViewRepository userRecentEventViewRepository, ArtistCityRepository artistCityRepository, UserCityRepository userCityRepository) Constructs a new EventServiceImpl. -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteEvent(UUID eventId, UUID actingUserId) Deletes an event.fetchExtendedEventInfo(UUID eventId, UUID actingUserId) Fetches extended information for an event.Gets an event by its ID.mutateEvent(UUID eventId, EventPatchRequest request, UUID actingUserId) Mutates an event with the given patch request.voidrecordUserEventView(UUID eventId, UUID userId) Records a user's view of an event.
-
Constructor Details
-
EventServiceImpl
public EventServiceImpl(UserFavoriteEventRepository userFavoriteEventRepository, UserRepository userRepository, EventRepository eventRepository, VenueRepository venueRepository, LocalifyProperties properties, ArtistRepository artistRepository, UserRecentEventViewRepository userRecentEventViewRepository, ArtistCityRepository artistCityRepository, UserCityRepository userCityRepository) Constructs a new EventServiceImpl.- Parameters:
userFavoriteEventRepository- The user favorite event repository.userRepository- The user repository.eventRepository- The event repository.venueRepository- The venue repository.properties- The application properties.artistRepository- The artist repository.userRecentEventViewRepository- The user recent event view repository.artistCityRepository- The artist city repository.userCityRepository- The user city repository.
-
-
Method Details
-
getById
Gets an event by its ID.- Parameters:
eventId- The ID of the event.- Returns:
- The event response DTO.
-
fetchExtendedEventInfo
Description copied from interface:EventServiceFetches extended information for an event.- Specified by:
fetchExtendedEventInfoin interfaceEventService- Parameters:
eventId- The ID of the event.actingUserId- The ID of the user performing the action.- Returns:
- The extended event response DTO.
-
recordUserEventView
Records a user's view of an event.- Parameters:
eventId- The ID of the event.userId- The ID of the user.
-
deleteEvent
Description copied from interface:EventServiceDeletes an event.- Specified by:
deleteEventin interfaceEventService- Parameters:
eventId- The ID of the event to delete.actingUserId- The ID of the user performing the action.
-
mutateEvent
Description copied from interface:EventServiceMutates an event with the given patch request.- Specified by:
mutateEventin interfaceEventService- Parameters:
eventId- The ID of the event to mutate.request- The patch request.actingUserId- The ID of the user performing the action.- Returns:
- The mutated event.
-