diff options
Diffstat (limited to 'src/main/java/at/ac/tuwien/sepm/assignment')
| -rw-r--r-- | src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/service/OperationServiceImpl.java | 12 | 
1 files changed, 0 insertions, 12 deletions
diff --git a/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/service/OperationServiceImpl.java b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/service/OperationServiceImpl.java index 497c6bc..20a3106 100644 --- a/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/service/OperationServiceImpl.java +++ b/src/main/java/at/ac/tuwien/sepm/assignment/groupphase/einsatzverwaltung/service/OperationServiceImpl.java @@ -49,17 +49,14 @@ public class OperationServiceImpl implements OperationService {      @Override      public long add(Operation o) throws InvalidOperationException, ServiceException {          if (o.created() != null) { -            LOG.info("Invalid Operation: Created must be null");              throw new InvalidOperationException("Erstellungszeitpunkt darf nicht gesetzt sein");          }          if (o.severity() != null) { -            LOG.info("Invalid Operation: Severity must be null");              throw new InvalidOperationException("Der Schweregrad darf nicht gesetzt sein");          }          if (o.id() != 0) { -            LOG.info("Invalid Operation: OperationId must be 0");              throw new InvalidOperationException("Einsatz-ID muss 0 sein");          } @@ -101,7 +98,6 @@ public class OperationServiceImpl implements OperationService {          try {              if (operationId <= 0) { -                LOG.info("Invalid Operation: OperationId is invalid (<= 0)");                  throw new InvalidOperationException("Einsatz-ID ist ungültig");              }              Operation o = operationDAO.get(operationId); @@ -109,23 +105,19 @@ public class OperationServiceImpl implements OperationService {              if (o.opCode().trim().isEmpty()                      || extractSeverityFromOpCode(o.opCode()) != o.severity()) { -                LOG.info("Invalid Operation: OpCode does not match Severity");                  throw new InvalidOperationException("Einsatzcode ist ungültig");              }              if (o.status() != Status.ACTIVE) { -                LOG.info("Invalid Operation: Operation is not active");                  throw new InvalidOperationException("Einsatz ist ungültig");              }              if (o.created() == null) { -                LOG.info("Invalid Operation: Created field is null");                  throw new InvalidOperationException("Erstellungszeitpunkt darf nicht leer sein");              }              for (Long id : vehicleIds) {                  if (id <= 0) { -                    LOG.info("Invalid Vehicle: VehicleId is not valid");                      throw new InvalidVehicleException("Fahrzeug-ID ist ungültig");                  } @@ -246,7 +238,6 @@ public class OperationServiceImpl implements OperationService {      private static void validateOperation(Operation o) throws InvalidOperationException {          if (o.vehicles().isEmpty()) { -            LOG.info("Invalid Operation: No vehicle was added");              throw new InvalidOperationException(                      "Es muss mindestens ein Fahrzeug ausgewählt werden!");          } @@ -263,12 +254,10 @@ public class OperationServiceImpl implements OperationService {          Instant created = o.created();          if (created != null && created.isAfter(Instant.now())) { -            LOG.info("Invalid Operation: Operation was created in the future");              throw new InvalidOperationException("Einsatz wurde in der Zukunft erstellt");          }          if (o.destination().trim().isEmpty()) { -            LOG.info("Invalid Operation: Adress must not be empty");              throw new InvalidOperationException("Adresse darf nicht leer sein");          }      } @@ -281,7 +270,6 @@ public class OperationServiceImpl implements OperationService {          Matcher m = opCodePattern.matcher(opCode);          if (!m.matches()) { -            LOG.info("Invalid Operation: OpCode is invalid");              throw new InvalidOperationException("Einsatzcode ist invalid");          }  | 
