Interface LineItemFilter
A
Predicate
to allow defining whether the OrderLine
s should be post processed by the
InventoryListeners.InventoryOrderEventListener
. The filters are affirmative so evaluating the Predicate
to
false will let the given OrderLine
not be post processed by the listener.- Since:
- 6.3
- Author:
- Oliver Gierke
-
Method Summary
Modifier and TypeMethodDescriptionstatic LineItemFilter
Returns aLineItemFilter
that accepts allOrderLine
s.static LineItemFilter
Returns aLineItemFilter
that does not consider anyOrderLine
s.static boolean
shouldBeHandled
(OrderLine orderLine, Collection<LineItemFilter> filters) Returns whether the givenOrderLine
should be handled considering the givenLineItemFilter
s.
-
Method Details
-
shouldBeHandled
Returns whether the givenOrderLine
should be handled considering the givenLineItemFilter
s. This means as soon as one of the filters returns false, it's not handled by the listener anymore and considered valid.- Parameters:
orderLine
- must not be null.filters
- must not be null.- Returns:
-
handleAll
Returns aLineItemFilter
that accepts allOrderLine
s.- Returns:
- will never be null.
-
handleNone
Returns aLineItemFilter
that does not consider anyOrderLine
s.- Returns:
- will never be null.
-