Interface TransportUnitMoveApproval

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface TransportUnitMoveApproval
A TransportUnitMoveApproval implementation validates a request to move a TransportUnit and can prevent it.
Author:
Heiko Scherrer
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    approve(@NotNull TransportUnit transportUnit, @NotBlank Location newLocation)
    Approve that the requested move of the transportUnit to the newLocation is permitted.
  • Method Details

    • approve

      void approve(@NotNull @NotNull TransportUnit transportUnit, @NotBlank @NotBlank Location newLocation) throws NotApprovedException
      Approve that the requested move of the transportUnit to the newLocation is permitted.
      Parameters:
      transportUnit - The TransportUnit to move
      newLocation - The new location to move to
      Throws:
      NotApprovedException - If not allowed to move