Class EntryMergeFilterSubscription
- java.lang.Object
-
- de.hybris.platform.commerceservices.order.impl.EntryMergeFilterSubscription
-
- All Implemented Interfaces:
EntryMergeFilter,java.util.function.BiFunction<AbstractOrderEntryModel,AbstractOrderEntryModel,java.lang.Boolean>
public class EntryMergeFilterSubscription extends java.lang.Object implements EntryMergeFilter
Denies merging of entries with subscription products.Quantity of subscription entries should always be 1, so any merge between subscription entries should be disabled.
-
-
Constructor Summary
Constructors Constructor Description EntryMergeFilterSubscription()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Booleanapply(AbstractOrderEntryModel candidate, AbstractOrderEntryModel target)ReturnBoolean.FALSEto create the item given byparameteras a separate cart entry orBoolean.TRUEto allow it to be merged into the given entry.protected SubscriptionProductServicegetSubscriptionProductService()voidsetSubscriptionProductService(SubscriptionProductService subscriptionProductService)
-
-
-
Method Detail
-
apply
public java.lang.Boolean apply(@Nonnull AbstractOrderEntryModel candidate, @Nonnull AbstractOrderEntryModel target)Description copied from interface:EntryMergeFilterReturnBoolean.FALSEto create the item given byparameteras a separate cart entry orBoolean.TRUEto 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:
applyin interfacejava.util.function.BiFunction<AbstractOrderEntryModel,AbstractOrderEntryModel,java.lang.Boolean>- Specified by:
applyin interfaceEntryMergeFilter- Parameters:
candidate- merge candidatetarget- entry to merge the candidate into- Returns:
- TRUE is the merge is allowed
-
getSubscriptionProductService
protected SubscriptionProductService getSubscriptionProductService()
-
setSubscriptionProductService
public void setSubscriptionProductService(SubscriptionProductService subscriptionProductService)
-
-