Class BundleCartValidator


  • public class BundleCartValidator
    extends java.lang.Object
    Class that handles updating EntryGroup.getErroneous() status for bundle entryGroups which entries that were changed.
    • Constructor Detail

      • BundleCartValidator

        public BundleCartValidator()
    • Method Detail

      • updateErroneousGroups

        public boolean updateErroneousGroups​(@Nonnull
                                             java.util.List<EntryGroup> groups,
                                             @Nonnull
                                             AbstractOrderModel order)
        Updates erroneous flag of entries in order according to current state of bundle.
        Parameters:
        groups - entryGroups to check/update erroneous flag for
        order - order with entryGroups
        Returns:
        true if any of the entry groups were updated, and false otherwise
      • updateEntryGroupErroneousStatus

        protected void updateEntryGroupErroneousStatus​(@Nonnull
                                                       AbstractOrderModel order,
                                                       @Nonnull
                                                       EntryGroup bundleEntryGroup,
                                                       @Nonnull
                                                       java.util.concurrent.atomic.AtomicBoolean changed)
      • areSelectionCriteriaSatisfied

        protected boolean areSelectionCriteriaSatisfied​(@Nonnull
                                                        AbstractOrderModel order,
                                                        @Nonnull
                                                        java.lang.Integer groupNumber,
                                                        @Nonnull
                                                        BundleTemplateModel bundleTemplate)
      • getEntryGroupItemsQuantity

        @Nonnull
        protected java.lang.Long getEntryGroupItemsQuantity​(@Nonnull
                                                            AbstractOrderModel order,
                                                            @Nonnull
                                                            java.lang.Integer bundleEntryGroupNumber)
      • setBundleTemplateService

        public void setBundleTemplateService​(BundleTemplateService bundleTemplateService)
      • getModelService

        protected ModelService getModelService()
      • setModelService

        public void setModelService​(ModelService modelService)