Package org.salespointframework.order
Class OrderCompletionReport.OrderLineCompletion
- java.lang.Object
-
- org.salespointframework.order.OrderCompletionReport.OrderLineCompletion
-
- Enclosing class:
- OrderCompletionReport
public static final class OrderCompletionReport.OrderLineCompletion extends Object
The completion status of anOrderLine
.- Author:
- Oliver Gierke
-
-
Method Summary
-
-
-
Method Detail
-
skipped
public static OrderCompletionReport.OrderLineCompletion skipped(OrderLine ordeLine)
-
success
public static OrderCompletionReport.OrderLineCompletion success(OrderLine orderLine)
Creates anOrderCompletionReport.OrderLineCompletion
representing the successful completion of anOrderLine
.- Parameters:
orderLine
- must not be null.- Returns:
-
error
public static OrderCompletionReport.OrderLineCompletion error(OrderLine orderLine, String message)
Creates anOrderCompletionReport.OrderLineCompletion
representing an erroneousOrderLine
alongside an error message.- Parameters:
orderLine
- must not be null.message
- must not be null.- Returns:
-
isFailure
public boolean isFailure()
Returns whether theOrderCompletionReport.OrderLineCompletion
represents a failure.- Returns:
-
onSuccess
public OrderCompletionReport.OrderLineCompletion onSuccess(Consumer<OrderLine> action)
Applies the givenConsumer
in case theOrderCompletionReport.OrderLineCompletion
is successful.- Parameters:
action
- must not be null.- Returns:
- the current
OrderCompletionReport.OrderLineCompletion
. - Since:
- 7.1
-
getOrderLine
@NonNull public @NonNull OrderLine getOrderLine()
-
getStatus
@NonNull public @NonNull OrderCompletionReport.CompletionStatus getStatus()
-
-