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 add(long vehicleId, Set 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; }