Interface EntryMergeFilter
-
- All Superinterfaces:
java.util.function.BiFunction<AbstractOrderEntryModel,AbstractOrderEntryModel,java.lang.Boolean>
- All Known Implementing Classes:
EntryMergeFilterBundleTemplate
,EntryMergeFilterConfigurableProduct
,EntryMergeFilterEntryGroup
,EntryMergeFilterGiveAway
,EntryMergeFilterIsEntryUpdatable
,EntryMergeFilterPointOfService
,EntryMergeFilterProduct
,EntryMergeFilterSubscription
,EntryMergeFilterUnits
public interface EntryMergeFilter extends java.util.function.BiFunction<AbstractOrderEntryModel,AbstractOrderEntryModel,java.lang.Boolean>
Filter to reject entry merge for particular pair of entries. Second entry (which is going to be added to cart) is presented byCommerceCartParameter
, because it does not exist in cart so far.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Boolean
apply(AbstractOrderEntryModel candidate, AbstractOrderEntryModel target)
ReturnBoolean.FALSE
to create the item given byparameter
as a separate cart entry orBoolean.TRUE
to allow it to be merged into the given entry.
-
-
-
Method Detail
-
apply
java.lang.Boolean apply(@Nonnull AbstractOrderEntryModel candidate, @Nonnull AbstractOrderEntryModel target)
ReturnBoolean.FALSE
to create the item given byparameter
as a separate cart entry orBoolean.TRUE
to allow it to be merged into the given entry.Please be aware that allowing to merge does not always means the entries will be merged. There could be another filter registered, that could deny the merge.
- Specified by:
apply
in interfacejava.util.function.BiFunction<AbstractOrderEntryModel,AbstractOrderEntryModel,java.lang.Boolean>
- Parameters:
candidate
- merge candidatetarget
- entry to merge the candidate into- Returns:
- TRUE is the merge is allowed
-
-