Package org.localify.venue
Class VenueServiceImpl
java.lang.Object
org.localify.venue.VenueServiceImpl
- All Implemented Interfaces:
VenueService
Implementation of the VenueService interface.
-
Constructor Summary
ConstructorsConstructorDescriptionVenueServiceImpl(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. -
Method Summary
Modifier and TypeMethodDescriptioncreatePlaylist(Venue venue) Creates a playlist for a venue.voiddeleteById(UUID venueId, UUID actingUserId) Deletes a venue by its ID.getOrCreatePlaylist(UUID venueId) Gets or creates a playlist for a venue.getPreviousEvents(UUID venueId, PageOptions pageOptions, UUID userId) Gets the past events for a venue.getResponse(UUID venueId, UUID actingUserId) Gets a venue response by its ID.getUpcomingEvents(UUID venueId, PageOptions pageOptions, UUID userId) Gets the upcoming events for a venue.patchById(UUID venueId, VenuePatchRequest request, UUID actingUserId) Patches a venue by its ID.voidrecordUserVenueView(UUID venueId, UUID userId) Records a user's view of a venue.toExtendedLocalResponse(UUID userId, UUID localCityId, Event event) Converts an event to an extended local response.
-
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
Description copied from interface:VenueServiceDeletes a venue by its ID.- Specified by:
deleteByIdin interfaceVenueService- Parameters:
venueId- The ID of the venue.actingUserId- The ID of the user performing the action.
-
patchById
Description copied from interface:VenueServicePatches a venue by its ID.- Specified by:
patchByIdin interfaceVenueService- 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
Description copied from interface:VenueServiceGets a venue response by its ID.- Specified by:
getResponsein interfaceVenueService- Parameters:
venueId- The ID of the venue.actingUserId- The ID of the user performing the action.- Returns:
- The venue response.
-
recordUserVenueView
Records a user's view of a venue.- Parameters:
venueId- The ID of the venue.userId- The ID of the user.
-
createPlaylist
Description copied from interface:VenueServiceCreates a playlist for a venue.- Specified by:
createPlaylistin interfaceVenueService- Parameters:
venue- The venue.- Returns:
- The playlist DTO.
-
getOrCreatePlaylist
Description copied from interface:VenueServiceGets or creates a playlist for a venue.- Specified by:
getOrCreatePlaylistin interfaceVenueService- 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:VenueServiceGets the upcoming events for a venue.- Specified by:
getUpcomingEventsin interfaceVenueService- 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:VenueServiceGets the past events for a venue.- Specified by:
getPreviousEventsin interfaceVenueService- 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.
-