Class VenueServiceImpl

java.lang.Object
org.localify.venue.VenueServiceImpl
All Implemented Interfaces:
VenueService

@Service public class VenueServiceImpl extends Object implements VenueService
Implementation of the VenueService interface.
  • Constructor Details

    • VenueServiceImpl

      public VenueServiceImpl(VenueRepository venueRepository, CityRepository cityRepository, PointUtil pointUtil, UserFavoriteVenueRepository userFavoriteVenueRepository, UserRepository userRepository, LocalifyProperties properties, ArtistEventRepository artistEventRepository, PlaylistService playlistService, EventRepository eventRepository, UserFavoriteEventRepository userFavoriteEventRepository, ArtistCityRepository artistCityRepository, UserCityRepository userCityRepository, UserRecentVenueViewRepository userRecentVenueViewRepository)
      Constructs a new VenueServiceImpl.
      Parameters:
      venueRepository - The venue repository.
      cityRepository - The city repository.
      pointUtil - The point utility.
      userFavoriteVenueRepository - The user favorite venue repository.
      userRepository - The user repository.
      properties - The localify properties.
      artistEventRepository - The artist event repository.
      playlistService - The playlist service.
      eventRepository - The event repository.
      userFavoriteEventRepository - The user favorite event repository.
      artistCityRepository - The artist city repository.
      userCityRepository - The user city repository.
      userRecentVenueViewRepository - The user recent venue view repository.
  • Method Details

    • deleteById

      public void deleteById(UUID venueId, UUID actingUserId)
      Description copied from interface: VenueService
      Deletes a venue by its ID.
      Specified by:
      deleteById in interface VenueService
      Parameters:
      venueId - The ID of the venue.
      actingUserId - The ID of the user performing the action.
    • patchById

      public Venue patchById(UUID venueId, VenuePatchRequest request, UUID actingUserId)
      Description copied from interface: VenueService
      Patches a venue by its ID.
      Specified by:
      patchById in interface VenueService
      Parameters:
      venueId - The ID of the venue.
      request - The patch request.
      actingUserId - The ID of the user performing the action.
      Returns:
      The updated venue.
    • getResponse

      public VenueResponseExtended getResponse(UUID venueId, UUID actingUserId)
      Description copied from interface: VenueService
      Gets a venue response by its ID.
      Specified by:
      getResponse in interface VenueService
      Parameters:
      venueId - The ID of the venue.
      actingUserId - The ID of the user performing the action.
      Returns:
      The venue response.
    • recordUserVenueView

      @Transactional public void recordUserVenueView(UUID venueId, UUID userId)
      Records a user's view of a venue.
      Parameters:
      venueId - The ID of the venue.
      userId - The ID of the user.
    • createPlaylist

      public PlaylistDto createPlaylist(Venue venue)
      Description copied from interface: VenueService
      Creates a playlist for a venue.
      Specified by:
      createPlaylist in interface VenueService
      Parameters:
      venue - The venue.
      Returns:
      The playlist DTO.
    • getOrCreatePlaylist

      public PlaylistDto getOrCreatePlaylist(UUID venueId)
      Description copied from interface: VenueService
      Gets or creates a playlist for a venue.
      Specified by:
      getOrCreatePlaylist in interface VenueService
      Parameters:
      venueId - The ID of the venue.
      Returns:
      The playlist DTO.
    • getUpcomingEvents

      @Transactional public List<EventResponseExtendedLocal> getUpcomingEvents(UUID venueId, PageOptions pageOptions, UUID userId)
      Description copied from interface: VenueService
      Gets the upcoming events for a venue.
      Specified by:
      getUpcomingEvents in interface VenueService
      Parameters:
      venueId - The ID of the venue.
      pageOptions - The pagination options.
      userId - The ID of the user.
      Returns:
      A list of event responses.
    • getPreviousEvents

      @Transactional public List<EventResponseExtendedLocal> getPreviousEvents(UUID venueId, PageOptions pageOptions, UUID userId)
      Description copied from interface: VenueService
      Gets the past events for a venue.
      Specified by:
      getPreviousEvents in interface VenueService
      Parameters:
      venueId - The ID of the venue.
      pageOptions - The pagination options.
      userId - The ID of the user.
      Returns:
      A list of event responses.
    • toExtendedLocalResponse

      @Transactional public EventResponseExtendedLocal toExtendedLocalResponse(UUID userId, UUID localCityId, Event event)
      Converts an event to an extended local response.
      Parameters:
      userId - The ID of the user.
      localCityId - The ID of the local city.
      event - The event.
      Returns:
      The extended local response.