Package org.openwms.common.transport.spi
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.
A TransportUnitStateChangeApproval implementation validates a requested state change of a
TransportUnit
and can prevent it.- Author:
- Heiko Scherrer
-
Method Summary
Modifier and TypeMethodDescriptionvoid
approve
(@NotNull TransportUnit transportUnit, @NotBlank String newState) Validate whether changing the state of thetransportUnit
intonewState
is permitted.
-
Method Details
-
approve
void approve(@NotNull @NotNull TransportUnit transportUnit, @NotBlank @NotBlank String newState) throws NotApprovedException Validate whether changing the state of thetransportUnit
intonewState
is permitted.- Parameters:
transportUnit
- The TransportUnit to change the statenewState
- The new state to set- Throws:
NotApprovedException
- If not allowed to change
-