summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorFelix Kehrer <felix.kehrer@gmail.com>2018-05-04 13:26:46 +0200
committerFelix Kehrer <felix.kehrer@gmail.com>2018-05-07 14:42:04 +0200
commit9537613b77696bf3f7b7ecec28b464c17fbe34db (patch)
tree482172dce01d1498b047a7254c95faf5fd556412 /src/main/java
parentd3f8c25338c4dfbefc70eb5cb01f2f448ecb9e99 (diff)
downloadsepm-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
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/service/RegistrationService.java7
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;
/**