[e6c2521] | 1 | package com.tourMate.services;
|
---|
| 2 |
|
---|
| 3 | import com.tourMate.dto.RouteListingDto;
|
---|
| 4 | import com.tourMate.dto.TransportDto;
|
---|
| 5 | import com.tourMate.dto.TransportListingDto;
|
---|
| 6 | import com.tourMate.dto.TransportReservationUserDto;
|
---|
| 7 | import com.tourMate.entities.*;
|
---|
| 8 |
|
---|
| 9 | import java.util.Collection;
|
---|
| 10 | import java.util.Date;
|
---|
| 11 | import java.util.List;
|
---|
| 12 |
|
---|
| 13 | public interface TransportManager {
|
---|
| 14 |
|
---|
[07f4e8b] | 15 | public void createTransport(String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, Long userId, String carPlate);
|
---|
[e6c2521] | 16 |
|
---|
| 17 | public void deleteTransport(long transportId);
|
---|
| 18 |
|
---|
| 19 | public List<Transport> getTransports();
|
---|
| 20 | public List<TransportDto> getTransportsByUser(long userId);
|
---|
| 21 | public List<RouteListingDto> getRoutesForTransport(long transportId);
|
---|
| 22 |
|
---|
| 23 | public TransportDto findTransportById (long transportId);
|
---|
| 24 |
|
---|
| 25 | Transport getTransportById(Long transportId);
|
---|
| 26 |
|
---|
| 27 | public void editTransport(long transportID, String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, User owner, String carPlate);
|
---|
| 28 |
|
---|
| 29 | public void createTransportReservation(Long transportRouteId, Long userId, int noSeats);
|
---|
| 30 | public TransportReservation findTransportReservationByID(long reservationID);
|
---|
| 31 |
|
---|
[07f4e8b] | 32 | List<TransportReservation> findTransportReservationByTransportId(long reservationID);
|
---|
| 33 |
|
---|
[e6c2521] | 34 | public List<TransportReservation> getTransportReservations();
|
---|
| 35 |
|
---|
| 36 | public TransportAvailible findTransportAvailableByID (long reservationID);
|
---|
| 37 | public Transport getTransportById(long transportId);
|
---|
| 38 |
|
---|
| 39 | List<Reviews> getReviewsForTransport(long transportId);
|
---|
| 40 |
|
---|
| 41 | public List<TransportListingDto> getTransportsAvailableByFilters (String from, String to, Date date, int numPassengers);
|
---|
| 42 |
|
---|
| 43 | public List<TransportReservation> getTransportsReservationsByUserID(long userID);
|
---|
| 44 |
|
---|
| 45 | public List<TransportAvailible> getTransportsAvailable();
|
---|
| 46 |
|
---|
[0f5aa27] | 47 | public void createTransportAvailable(TransportAvailible transportAvailible, Transport transport, String departureLocation, String arrivalLocation, Date date, Integer noSeats, Date departureHour, Long trnasportId, Collection<TransportRoute> routes);
|
---|
[e6c2521] | 48 | public void editTransportAvailable(Transport transport, long availableID, String departureLocation, String arrivalLocation, Date date, Integer noSeats, Date departureHour);
|
---|
| 49 |
|
---|
| 50 | public void deleteTransportReservation(long reservationID);
|
---|
| 51 |
|
---|
| 52 | public void deleteTransportAvailable(long availableID);
|
---|
| 53 |
|
---|
| 54 | public void createTransportRoute(TransportAvailible parentRoute, String from, String to, double price, Date departure, Date arrival, int freeSpace, int order);
|
---|
| 55 |
|
---|
| 56 | public void deleteTransportRoute(long transportRouteId);
|
---|
| 57 |
|
---|
| 58 | public void editTransportRoute(long transportRouteId, TransportAvailible parentRoute, String from, String to, double price, Date departure, Date arrival, int freeSpace, int order);
|
---|
| 59 |
|
---|
| 60 |
|
---|
| 61 | List<TransportReservationUserDto> findValidTransportReservationsByUser(Long userId);
|
---|
| 62 |
|
---|
| 63 | List<TransportReservationUserDto> findPastTransportReservationsByUser(Long userId);
|
---|
[07f4e8b] | 64 |
|
---|
| 65 | void setReservationReviewed(Long reservationId);
|
---|
[e6c2521] | 66 | }
|
---|
| 67 |
|
---|