aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/missioncontrol/service/RegistrationService.java
diff options
context:
space:
mode:
authorTharre <tharre3@gmail.com>2018-06-20 22:07:36 +0200
committerTharre <tharre3@gmail.com>2018-06-20 22:07:36 +0200
commit0c995a05985da749d93aa56eba976c7fc621a4fa (patch)
tree5b80394920705aae5e2b6004c3dfbd839c8b8fa3 /src/main/java/at/ac/tuwien/sepm/assignment/groupphase/missioncontrol/service/RegistrationService.java
parentf5bc7925a8fbbe247972a6f0e0571cc7e92fbefa (diff)
parente21feb3ac772a5394dc5381b58142c3c061de716 (diff)
downloadsepm-groupproject-master.tar.gz
sepm-groupproject-master.tar.xz
sepm-groupproject-master.zip
Merge branch 'develop'HEADv3.0master
Diffstat (limited to 'src/main/java/at/ac/tuwien/sepm/assignment/groupphase/missioncontrol/service/RegistrationService.java')
-rw-r--r--src/main/java/at/ac/tuwien/sepm/assignment/groupphase/missioncontrol/service/RegistrationService.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/missioncontrol/service/RegistrationService.java b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/missioncontrol/service/RegistrationService.java
new file mode 100644
index 0000000..91577dc
--- /dev/null
+++ b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/missioncontrol/service/RegistrationService.java
@@ -0,0 +1,32 @@
+package at.ac.tuwien.sepm.assignment.groupphase.missioncontrol.service;
+
+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;
+import at.ac.tuwien.sepm.assignment.groupphase.missioncontrol.dto.Registration;
+import java.util.Set;
+
+public interface RegistrationService {
+
+ /**
+ * Register employee to a vehicle.
+ *
+ * @param vehicleId the id of the target vehicle
+ * @param registrations that should be added to the vehicle
+ * @return the list of ids that were 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
+ */
+ Set<Long> add(long vehicleId, Set<Registration> registrations)
+ throws InvalidVehicleException, InvalidRegistrationException, ServiceException;
+
+ /**
+ * Remove given registration from the store.
+ *
+ * @param registrationId the id of the registration that should be removed
+ * @throws InvalidRegistrationException if the registration is invalid or does not exist
+ * @throws ServiceException if the registration could not be removed from the store
+ */
+ void remove(long registrationId) throws InvalidRegistrationException, ServiceException;
+}