diff options
author | Felix Kehrer <felix.kehrer@gmail.com> | 2018-05-04 13:26:46 +0200 |
---|---|---|
committer | Felix Kehrer <felix.kehrer@gmail.com> | 2018-05-07 14:42:04 +0200 |
commit | 9537613b77696bf3f7b7ecec28b464c17fbe34db (patch) | |
tree | 482172dce01d1498b047a7254c95faf5fd556412 | |
parent | d3f8c25338c4dfbefc70eb5cb01f2f448ecb9e99 (diff) | |
download | sepm-groupproject-9537613b77696bf3f7b7ecec28b464c17fbe34db.tar.gz sepm-groupproject-9537613b77696bf3f7b7ecec28b464c17fbe34db.tar.xz sepm-groupproject-9537613b77696bf3f7b7ecec28b464c17fbe34db.zip |
Changed interface to take a whole vehicle, so the combination of vehicle type and employees can be validated
-rw-r--r-- | src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/service/RegistrationService.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/service/RegistrationService.java b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/service/RegistrationService.java index 801148c..c20ed3c 100644 --- a/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/service/RegistrationService.java +++ b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/service/RegistrationService.java @@ -1,6 +1,7 @@ package at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.service; import at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.dto.Registration; +import at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.dto.Vehicle; import at.ac.tuwien.sepm.assignment.groupphase.exception.InvalidRegistrationException; import at.ac.tuwien.sepm.assignment.groupphase.exception.InvalidVehicleException; import at.ac.tuwien.sepm.assignment.groupphase.exception.ServiceException; @@ -11,14 +12,14 @@ public interface RegistrationService { /** * Register employee to a vehicle. * - * @param vehicleId the id of the target vehicle + * @param vehicle the target vehicle * @param registrations that should be added to the vehicle - * @return a list of the ids that were assigned + * @return the id that was assigned * @throws InvalidVehicleException if the vehicleId is invalid or does not exist * @throws InvalidRegistrationException if the registration is invalid * @throws ServiceException if the registration could not be persisted */ - List<Long> add(long vehicleId, List<Registration> registrations) + List<Long> add(Vehicle vehicle, List<Registration> registrations) throws InvalidVehicleException, InvalidRegistrationException, ServiceException; /** |