blob: 91577dc0507f7f2b943f04f3c542d5c8524cfc47 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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;
}
|