Class DefaultTmaBpoCardinalityService
java.lang.Object
de.hybris.platform.b2ctelcoservices.cardinality.impl.DefaultTmaBpoCardinalityService
- All Implemented Interfaces:
TmaBpoCardinalityService
Default implementation of the
TmaBpoCardinalityService.- Since:
- 2011
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultTmaBpoCardinalityService(TmaPoService poService, TmaEntryGroupService entryGroupService, TmaAbstractOrderEntryService abstractOrderEntryService, TmaValidationMessagesStrategy validationMessagesStrategy, de.hybris.platform.servicelayer.i18n.L10NService l10NService) -
Method Summary
Modifier and TypeMethodDescriptionprotected TmaAbstractOrderEntryServiceprotected TmaEntryGroupServiceDeprecated.since 2102protected de.hybris.platform.servicelayer.i18n.L10NServiceprotected TmaPoServicegetValidationMessage(TmaBundledProdOfferOptionModel cardinalityRule, TmaProductOfferingModel productOffering) Returns cardinality validation message for given Product Offering based on the details of the Bundled Product Offering Option.protected TmaValidationMessagesStrategyvoidupdateCardinalityValidationMessages(AbstractOrderEntryModel entry, List<String> validationMessages) Updates the cardinality validation messages on the entry group with the provided messages.voidupdateCardinalityValidationMessages(AbstractOrderModel abstractOrder, EntryGroup entryGroup, List<String> validationMessages) Updates the cardinality validation messages on the entry group with the provided messages.booleanvalidate(TmaBundledProdOfferOptionModel cardinalityRule, long quantity) Checks if provided quantity meets the requirements of the cardinality rule.protected Map<AbstractOrderEntryModel,List<String>> verifyBpoCardinality(Collection<AbstractOrderEntryModel> entries, AbstractOrderEntryModel parentEntry, TmaBundledProductOfferingModel bundledProductOffering, TmaBundledProdOfferOptionModel rule) Validates the cardinality rules for the provided entries and bundled product offering.booleanverifyCardinality(TmaBundledProductOfferingModel bpo, Map<TmaProductOfferingModel, Integer> children) Verifies if bundled product offering's children have valid cardinalityValidated the cardinality rules for the provided entry.verifyCardinality(AbstractOrderModel abstractOrder) Validates the cardinality rules for the provided abstract order.verifyCardinality(AbstractOrderModel abstractOrder, EntryGroup entryGroup) Validated the cardinality rules for the provided entry group.protected Map<AbstractOrderEntryModel,List<String>> verifyCardinality(Collection<AbstractOrderEntryModel> entries, AbstractOrderEntryModel parentEntry, TmaBundledProductOfferingModel bundledProductOffering, TmaBundledProdOfferOptionModel parentCardinalityRule) verifyCardinality(List<AbstractOrderEntryModel> entries, TmaBundledProductOfferingModel bundledProductOffering, TmaBundledProdOfferOptionModel parentCardinalityRule) Deprecated.verifyCardinalityForOrder(AbstractOrderModel abstractOrder) Validates the cardinality rules for the provided abstract order.
-
Constructor Details
-
DefaultTmaBpoCardinalityService
public DefaultTmaBpoCardinalityService(TmaPoService poService, TmaEntryGroupService entryGroupService, TmaAbstractOrderEntryService abstractOrderEntryService, TmaValidationMessagesStrategy validationMessagesStrategy, de.hybris.platform.servicelayer.i18n.L10NService l10NService)
-
-
Method Details
-
verifyCardinality
Description copied from interface:TmaBpoCardinalityServiceValidated the cardinality rules for the provided entry group.- Specified by:
verifyCardinalityin interfaceTmaBpoCardinalityService- Parameters:
abstractOrder- The cart or orderentryGroup- The entry group- Returns:
- List of validation messages
-
verifyCardinality
Description copied from interface:TmaBpoCardinalityServiceValidated the cardinality rules for the provided entry.- Specified by:
verifyCardinalityin interfaceTmaBpoCardinalityService- Parameters:
entry- The entry- Returns:
- List of validation messages for the entries
-
verifyCardinality
Description copied from interface:TmaBpoCardinalityServiceValidates the cardinality rules for the provided abstract order.- Specified by:
verifyCardinalityin interfaceTmaBpoCardinalityService- Parameters:
abstractOrder- The cart or order
-
verifyCardinalityForOrder
public Map<AbstractOrderEntryModel,List<String>> verifyCardinalityForOrder(AbstractOrderModel abstractOrder) Description copied from interface:TmaBpoCardinalityServiceValidates the cardinality rules for the provided abstract order.- Specified by:
verifyCardinalityForOrderin interfaceTmaBpoCardinalityService- Parameters:
abstractOrder- The cart or order- Returns:
- List of validation messages for the entry
-
validate
Description copied from interface:TmaBpoCardinalityServiceChecks if provided quantity meets the requirements of the cardinality rule.- Specified by:
validatein interfaceTmaBpoCardinalityService- Parameters:
cardinalityRule- The bundled product offering rulequantity- The product offering quantity- Returns:
- True if product offering fulfills the cardinality rules, otherwise false
-
getValidationMessage
public String getValidationMessage(TmaBundledProdOfferOptionModel cardinalityRule, TmaProductOfferingModel productOffering) Description copied from interface:TmaBpoCardinalityServiceReturns cardinality validation message for given Product Offering based on the details of the Bundled Product Offering Option.- Specified by:
getValidationMessagein interfaceTmaBpoCardinalityService- Parameters:
cardinalityRule- The bundled product offering optionproductOffering- The product Offering- Returns:
- The validation message
-
updateCardinalityValidationMessages
public void updateCardinalityValidationMessages(AbstractOrderModel abstractOrder, EntryGroup entryGroup, List<String> validationMessages) Description copied from interface:TmaBpoCardinalityServiceUpdates the cardinality validation messages on the entry group with the provided messages.- Specified by:
updateCardinalityValidationMessagesin interfaceTmaBpoCardinalityService- Parameters:
abstractOrder- The cart or orderentryGroup- The entry groupvalidationMessages- The validation messages
-
updateCardinalityValidationMessages
public void updateCardinalityValidationMessages(AbstractOrderEntryModel entry, List<String> validationMessages) Description copied from interface:TmaBpoCardinalityServiceUpdates the cardinality validation messages on the entry group with the provided messages.- Specified by:
updateCardinalityValidationMessagesin interfaceTmaBpoCardinalityService- Parameters:
entry- The entryvalidationMessages- The validation messages
-
verifyCardinality
public boolean verifyCardinality(TmaBundledProductOfferingModel bpo, Map<TmaProductOfferingModel, Integer> children) Description copied from interface:TmaBpoCardinalityServiceVerifies if bundled product offering's children have valid cardinality- Specified by:
verifyCardinalityin interfaceTmaBpoCardinalityService- Parameters:
bpo- the bundled product offeringchildren- the children product offerings for which the cardinality should be fulfilled- Returns:
- true if all the children product offerings fulfills the cardinality rules, otherwise false
-
verifyCardinality
@Deprecated(since="2102") protected List<String> verifyCardinality(List<AbstractOrderEntryModel> entries, TmaBundledProductOfferingModel bundledProductOffering, TmaBundledProdOfferOptionModel parentCardinalityRule) Deprecated. -
verifyCardinality
protected Map<AbstractOrderEntryModel,List<String>> verifyCardinality(Collection<AbstractOrderEntryModel> entries, AbstractOrderEntryModel parentEntry, TmaBundledProductOfferingModel bundledProductOffering, TmaBundledProdOfferOptionModel parentCardinalityRule) -
verifyBpoCardinality
protected Map<AbstractOrderEntryModel,List<String>> verifyBpoCardinality(Collection<AbstractOrderEntryModel> entries, AbstractOrderEntryModel parentEntry, TmaBundledProductOfferingModel bundledProductOffering, TmaBundledProdOfferOptionModel rule) Validates the cardinality rules for the provided entries and bundled product offering.- Parameters:
entries- The child entriesparentEntry- The parent entry of the child entriesbundledProductOffering- The bundled product offeringrule- The cardinality rule applied- Returns:
- List of validation messages for the entries
-
getPoService
-
getEntryGroupService
Deprecated.since 2102 -
getAbstractOrderEntryService
-
getValidationMessagesStrategy
-
getL10NService
protected de.hybris.platform.servicelayer.i18n.L10NService getL10NService()
-