Class EventServiceImpl

java.lang.Object
org.localify.event.EventServiceImpl
All Implemented Interfaces:
EventService

@Service public class EventServiceImpl extends Object implements EventService
Implementation of the EventService interface.
  • 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

      public EventResponse getById(UUID eventId)
      Gets an event by its ID.
      Parameters:
      eventId - The ID of the event.
      Returns:
      The event response DTO.
    • fetchExtendedEventInfo

      public EventResponseExtended fetchExtendedEventInfo(UUID eventId, UUID actingUserId)
      Description copied from interface: EventService
      Fetches extended information for an event.
      Specified by:
      fetchExtendedEventInfo in interface EventService
      Parameters:
      eventId - The ID of the event.
      actingUserId - The ID of the user performing the action.
      Returns:
      The extended event response DTO.
    • recordUserEventView

      @Transactional public void recordUserEventView(UUID eventId, UUID userId)
      Records a user's view of an event.
      Parameters:
      eventId - The ID of the event.
      userId - The ID of the user.
    • deleteEvent

      public void deleteEvent(UUID eventId, UUID actingUserId)
      Description copied from interface: EventService
      Deletes an event.
      Specified by:
      deleteEvent in interface EventService
      Parameters:
      eventId - The ID of the event to delete.
      actingUserId - The ID of the user performing the action.
    • mutateEvent

      public Event mutateEvent(UUID eventId, EventPatchRequest request, UUID actingUserId)
      Description copied from interface: EventService
      Mutates an event with the given patch request.
      Specified by:
      mutateEvent in interface EventService
      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.