Open amit5881 opened 3 years ago
https://github.com/nitsshukla/AgodaBooking/blob/24095baf0c394ba4ae17d8e56d237e8eaaa461ff/src/main/java/com/agoda/booking/tracker/controller/BookingController.java#L48
public @interface BulkBookingRequest { String inputType; }
And use a factory Method: Map<String, BookingService> factory = Map.of("csv", BookingCSVServiceImpl.class);
Map<String, BookingService> factory = Map.of("csv", BookingCSVServiceImpl.class);
Entry Point:
@BulkBookingRequest(inputType = "csv") public void swallowBulkBookingRequest() { factory.get(inputType) }
I'm planning to take CSV as cli argument, if user wants to operate with CSV. Will push it in next commit
https://github.com/nitsshukla/AgodaBooking/blob/24095baf0c394ba4ae17d8e56d237e8eaaa461ff/src/main/java/com/agoda/booking/tracker/controller/BookingController.java#L48
public @interface BulkBookingRequest { String inputType; }
And use a factory Method:
Map<String, BookingService> factory = Map.of("csv", BookingCSVServiceImpl.class);
Entry Point: