Interface TransportUnitStateChangeApproval

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 TransportUnitStateChangeApproval
A TransportUnitStateChangeApproval implementation validates a requested state change of a TransportUnit and can prevent it.
Author:
Heiko Scherrer
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    approve(@NotNull TransportUnit transportUnit, @NotBlank String newState)
    Validate whether changing the state of the transportUnit into newState is permitted.
  • Method Details

    • approve

      void approve(@NotNull @NotNull TransportUnit transportUnit, @NotBlank @NotBlank String newState) throws NotApprovedException
      Validate whether changing the state of the transportUnit into newState is permitted.
      Parameters:
      transportUnit - The TransportUnit to change the state
      newState - The new state to set
      Throws:
      NotApprovedException - If not allowed to change