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.OrderLineCompletionrepresenting the successful completion of anOrderLine.- Parameters:
orderLine- must not be null.- Returns:
-
error
public static OrderCompletionReport.OrderLineCompletion error(OrderLine orderLine, String message)
Creates anOrderCompletionReport.OrderLineCompletionrepresenting an erroneousOrderLinealongside an error message.- Parameters:
orderLine- must not be null.message- must not be null.- Returns:
-
isFailure
public boolean isFailure()
Returns whether theOrderCompletionReport.OrderLineCompletionrepresents a failure.- Returns:
-
onSuccess
public OrderCompletionReport.OrderLineCompletion onSuccess(Consumer<OrderLine> action)
Applies the givenConsumerin case theOrderCompletionReport.OrderLineCompletionis 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()
-
-