diff options
author | Tharre <tharre3@gmail.com> | 2018-06-20 22:07:36 +0200 |
---|---|---|
committer | Tharre <tharre3@gmail.com> | 2018-06-20 22:07:36 +0200 |
commit | 0c995a05985da749d93aa56eba976c7fc621a4fa (patch) | |
tree | 5b80394920705aae5e2b6004c3dfbd839c8b8fa3 /src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/service/OperationService.java | |
parent | f5bc7925a8fbbe247972a6f0e0571cc7e92fbefa (diff) | |
parent | e21feb3ac772a5394dc5381b58142c3c061de716 (diff) | |
download | sepm-groupproject-master.tar.gz sepm-groupproject-master.tar.xz sepm-groupproject-master.zip |
Diffstat (limited to 'src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/service/OperationService.java')
-rw-r--r-- | src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/service/OperationService.java | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/service/OperationService.java b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/service/OperationService.java deleted file mode 100644 index 4b7e630..0000000 --- a/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/service/OperationService.java +++ /dev/null @@ -1,70 +0,0 @@ -package at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.service; - -import at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.dto.Operation; -import at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.dto.Operation.Status; -import at.ac.tuwien.sepm.assignment.groupphase.einsatzverwaltung.dto.Vehicle; -import at.ac.tuwien.sepm.assignment.groupphase.exception.InvalidOperationException; -import at.ac.tuwien.sepm.assignment.groupphase.exception.InvalidVehicleException; -import at.ac.tuwien.sepm.assignment.groupphase.exception.ServiceException; -import java.util.EnumSet; -import java.util.Set; -import java.util.SortedSet; - -public interface OperationService { - - /** - * Add given operation to the store. - * - * @param operation that should be added to the store - * @return the id that was assigned - * @throws InvalidOperationException if the operation is invalid - * @throws ServiceException if the operation could not be persisted - */ - long add(Operation operation) throws InvalidOperationException, ServiceException; - - /** - * Request new vehicles to the given operation. - * - * @param operationId id of the operation that the vehicles should be send to - * @param vehicleIds the ids of the vehicles that should be send to the given operation - * @throws InvalidOperationException if the operationId is invalid or does not exist - * @throws InvalidVehicleException if one of the vehicle ids is invalid or does not exist - * @throws ServiceException if the vehicles could not be loaded or the operation could not be - * persisted - */ - void requestVehicles(long operationId, Set<Long> vehicleIds) - throws InvalidOperationException, InvalidVehicleException, ServiceException; - - /** - * Completes the given operation with the specified status. - * - * @param operationId id of the operation that should be completed - * @param status of the completed operation, either {@link Status#COMPLETED} or {@link - * Status#CANCELLED} - * @throws InvalidOperationException if the operationId is invalid or does not exist - * @throws ServiceException if the operation could not be persisted - */ - void complete(long operationId, Status status) - throws InvalidOperationException, ServiceException; - - /** - * Get all available vehicles, sorted by how well they fit to the given opCode, starting with - * the best fitting. - * - * @param opCode the operation code that is used to determine the ranking - * @return a sorted list containing all available vehicles - * @throws InvalidOperationException if the opCode is invalid - * @throws ServiceException if loading the stored vehicles failed - */ - SortedSet<Vehicle> rankVehicles(String opCode) - throws InvalidOperationException, ServiceException; - - /** - * Get all stored operations with matching status. - * - * @param statuses set containing all statuses that should be matched - * @return list containing all matched operations - * @throws ServiceException if loading the stored operations failed - */ - Set<Operation> list(EnumSet<Status> statuses) throws ServiceException; -} |