Skip to content

Commit

Permalink
Rename ReservationManager
Browse files Browse the repository at this point in the history
  • Loading branch information
bkuberek committed Aug 6, 2024
1 parent 5ed3546 commit 940d62e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/solution.md
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ quarkus.liquibase.clean-at-start=false

### Entry Points

This is app is capable of both REST and GraphQL endpoints, however, no rest endpoints were implemented.
This app is capable of both REST and GraphQL endpoints, however, no rest endpoints were implemented.
All endpoints are implemented in GraphQL and there are 2 Resources.

- [`RestaurantResource`](https://github.com/bkuberek/kotlin-quarkus-booking-service-demo/blob/main/src/main/kotlin/com/bkuberek/bookings/graphql/v1/resources/RestaurantResource.kt)
Expand Down Expand Up @@ -436,7 +436,7 @@ The Application will do some work during the Booking of a Reservation. During bo
Here are the related files

- [`ReservationValidator`](https://github.com/bkuberek/kotlin-quarkus-booking-service-demo/blob/main/src/main/kotlin/com/bkuberek/bookings/graphql/v1/ReservationValidator.kt)
- [`ReservationTableDelegator`](https://github.com/bkuberek/kotlin-quarkus-booking-service-demo/blob/main/src/main/kotlin/com/bkuberek/bookings/graphql/v1/ReservationTableDelegator.kt)
- [`ReservationManager`](https://github.com/bkuberek/kotlin-quarkus-booking-service-demo/blob/main/src/main/kotlin/com/bkuberek/bookings/graphql/v1/ReservationManager.kt)


### Data Access Layer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import org.jboss.logging.Logger
import java.util.*

@ApplicationScoped
class ReservationTableDelegator {
private val logger = Logger.getLogger(ReservationTableDelegator::class.java)
class ReservationManager {
private val logger = Logger.getLogger(ReservationManager::class.java)

fun assignTables(
restaurant: RestaurantEntity,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.bkuberek.bookings.graphql.v1.resources

import com.bkuberek.bookings.db.repositories.ReservationRepository
import com.bkuberek.bookings.db.repositories.RestaurantRepository
import com.bkuberek.bookings.graphql.v1.ReservationTableDelegator
import com.bkuberek.bookings.graphql.v1.ReservationManager
import com.bkuberek.bookings.graphql.v1.ReservationValidator
import com.bkuberek.bookings.graphql.v1.models.*
import io.smallrye.graphql.api.Context
Expand All @@ -17,10 +17,10 @@ import java.util.*

@GraphQLApi
class ReservationResource @Inject constructor(
private val reservationRepository: ReservationRepository,
private val restaurantRepository: RestaurantRepository,
private val reservationRepository: ReservationRepository,
private val reservationValidator: ReservationValidator,
private val reservationTableDelegator: ReservationTableDelegator,
private val reservationManager: ReservationManager,
) {
private val logger = Logger.getLogger(ReservationResource::class.java)

Expand Down Expand Up @@ -86,7 +86,7 @@ class ReservationResource @Inject constructor(

return try {
val entity =
reservationTableDelegator.assignTables(restaurant, available.availableTables, reservationRequest)
reservationManager.assignTables(restaurant, available.availableTables, reservationRequest)
ReservationInfo(reservationRepository.createReservation(entity))
} catch (e: IllegalArgumentException) {
ReservationError(
Expand Down

0 comments on commit 940d62e

Please sign in to comment.