From 9537613b77696bf3f7b7ecec28b464c17fbe34db Mon Sep 17 00:00:00 2001 From: Felix Kehrer Date: Fri, 4 May 2018 13:26:46 +0200 Subject: Changed interface to take a whole vehicle, so the combination of vehicle type and employees can be validated --- .../groupphase/einsatzverwaltung/service/RegistrationService.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main/java') 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 add(long vehicleId, List registrations) + List add(Vehicle vehicle, List registrations) throws InvalidVehicleException, InvalidRegistrationException, ServiceException; /** -- cgit v1.2.3-70-g09d2