Class DefaultTmaProductOfferFacade
java.lang.Object
de.hybris.platform.b2ctelcofacades.product.impl.DefaultTmaProductOfferFacade
- All Implemented Interfaces:
TmaProductOfferFacade
- Direct Known Subclasses:
TmaProductOfferCpFacade
Default implementation of
TmaProductOfferFacade.- Since:
- 6.7
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultTmaProductOfferFacade(Map<String, de.hybris.platform.servicelayer.dto.converter.Converter<ProductData, TmaProductOfferingModel>> tmaProductOfferingTypeReverseConvertersMapping, Map<String, Class<? extends TmaProductOfferingModel>> tmaProductOfferingTypeReverseMapping, TmaGenericItemService tmaGenericItemService) -
Method Summary
Modifier and TypeMethodDescriptionbooleancreateProductOffering(ProductData productData) Creates aTmaProductOfferingModelfrom the givenProductDatagetOffers(TmaOfferContextData offerContextData) Returns product offers filtered by parameters provided in offerContextData.getOffers(String processType, String affectedProductCode, String bpoCode, Set<String> requiredProductCodes) Returns product offers for given parameters.getParentsForCodeAndOptions(String poCode, Collection<ProductOption> productOptions) Retrieves theTmaBundledProductOfferingModels representing direct and indirect parents of theTmaProductOfferingModelwith the code given.getPoForCode(String poCode, Collection<ProductOption> productOptions) Retrieves theProductDatawith the code given populated with information depending on the provided .getPoForCode(String poCode, Collection<ProductOption> productOptions, TmaPriceContextData priceContextData) Retrieves theProductDatawith the given code, with additional information provided as and prices of theTmaProductOfferingModelbased on theTmaPriceContextData.protected de.hybris.platform.servicelayer.dto.converter.Converter<TmaPriceContextData,TmaPriceContext> protected TmaPriceDataFactoryprotected TmaPriceFacadeprotected List<PriceRowModel>getPriceRowModels(String poCode, TmaPriceContextData priceContext, TmaProductOfferingModel productOffering) protected de.hybris.platform.converters.ConfigurablePopulator<ProductModel,ProductData, ProductOption> protected de.hybris.platform.servicelayer.dto.converter.Converter<ProductModel,ProductData> protected TmaProcessFlowStrategyMappingprotected TmaCommercePriceServiceprotected TmaGenericItemServiceprotected TmaPoServiceprotected Map<String,de.hybris.platform.servicelayer.dto.converter.Converter<ProductData, TmaProductOfferingModel>> protected Map<String,Class<? extends TmaProductOfferingModel>> protected de.hybris.platform.servicelayer.dto.converter.Converter<PriceRowModel,SubscriptionPricePlanData> booleanisBpo(ProductData productData) This method checks if the product offering is of type BPO.booleanThis method verifies if the action from the parameter is a service request actionbooleanisValidParent(String poCode, String bpoCode) Verifies if the given parent code represents a validTmaBundledProductOfferingModelparent for the given product offering code.voidRemoves the product offering by id.protected voidsetPoPriceOverrideOnBpo(TmaProductOfferingModel po, TmaBundledProductOfferingModel bpoModel, ProductData bpoData) Sets the price override of theTmaProductOfferingModelon the BPO provided, price representing the starting price of the if bought as part of thevoidsetPriceContextDataReverseConverter(de.hybris.platform.servicelayer.dto.converter.Converter<TmaPriceContextData, TmaPriceContext> priceContextDataReverseConverter) voidsetPriceDataFactory(TmaPriceDataFactory priceDataFactory) voidsetPriceFacade(TmaPriceFacade priceFacade) voidsetProductConfiguredPopulator(de.hybris.platform.converters.ConfigurablePopulator<ProductModel, ProductData, ProductOption> productConfiguredPopulator) voidsetProductConverter(de.hybris.platform.servicelayer.dto.converter.Converter<ProductModel, ProductData> productConverter) protected voidsetProductDataPrices(String poCode, TmaPriceContextData priceContext, TmaProductOfferingModel productOffering, ProductData productData) Sets the prices on the product data object as SPP data objects.voidsetStrategyMapping(TmaProcessFlowStrategyMapping strategyMapping) voidsetTmaCommercePriceService(TmaCommercePriceService tmaCommercePriceService) voidsetTmaPoService(TmaPoService tmaPoService) voidsetTmaSubscriptionPricePlanConverter(de.hybris.platform.servicelayer.dto.converter.Converter<PriceRowModel, SubscriptionPricePlanData> tmaSubscriptionPricePlanConverter) voidupdateProductOffering(ProductData productOfferingData) Updates the givenProductData.
-
Constructor Details
-
DefaultTmaProductOfferFacade
public DefaultTmaProductOfferFacade(Map<String, de.hybris.platform.servicelayer.dto.converter.Converter<ProductData, TmaProductOfferingModel>> tmaProductOfferingTypeReverseConvertersMapping, Map<String, Class<? extends TmaProductOfferingModel>> tmaProductOfferingTypeReverseMapping, TmaGenericItemService tmaGenericItemService)
-
-
Method Details
-
getPoForCode
Description copied from interface:TmaProductOfferFacadeRetrieves theProductDatawith the code given populated with information depending on the provided . The current session data (catalog versions, user) are used, so a validTmaProductOfferingModelfor the current session parameters will be returned.- Specified by:
getPoForCodein interfaceTmaProductOfferFacade- Parameters:
poCode- unique identifier of theTmaProductOfferingModelto be retrievedproductOptions- product options determining the attributes of theProductDatato be populated- Returns:
ProductDatapopulated with the given options for the provided code
-
getPoForCode
public ProductData getPoForCode(String poCode, Collection<ProductOption> productOptions, TmaPriceContextData priceContextData) Description copied from interface:TmaProductOfferFacadeRetrieves theProductDatawith the given code, with additional information provided as and prices of theTmaProductOfferingModelbased on theTmaPriceContextData.- Specified by:
getPoForCodein interfaceTmaProductOfferFacade- Parameters:
poCode- unique identifier of theTmaProductOfferingModelto be retrievedproductOptions- product options determining the attributes of theProductDatato be populatedpriceContextData-TmaPriceContextDatato create price context data- Returns:
ProductDatapopulated with the given options for the provided code
-
getParentsForCodeAndOptions
public List<ProductData> getParentsForCodeAndOptions(String poCode, Collection<ProductOption> productOptions) Description copied from interface:TmaProductOfferFacadeRetrieves theTmaBundledProductOfferingModels representing direct and indirect parents of theTmaProductOfferingModelwith the code given.- Specified by:
getParentsForCodeAndOptionsin interfaceTmaProductOfferFacade- Parameters:
poCode- unique identifier of theTmaProductOfferingModelfor which to retrieve the parent bposproductOptions- product options determining the attributes of theProductDatato be populated- Returns:
List<ProductData>all bpo parents for theTmaProductOfferingModelwith the code given
-
isValidParent
Description copied from interface:TmaProductOfferFacadeVerifies if the given parent code represents a validTmaBundledProductOfferingModelparent for the given product offering code. A valid parent it not necessary a first direct parent, it can also be a parent of one of product parents.- Specified by:
isValidParentin interfaceTmaProductOfferFacade- Parameters:
poCode- product offering codebpoCode- parent bundled product offering code- Returns:
- true if the parent is valid, false otherwise
-
getOffers
public List<TmaOfferData> getOffers(String processType, String affectedProductCode, String bpoCode, Set<String> requiredProductCodes) Description copied from interface:TmaProductOfferFacadeReturns product offers for given parameters.- Specified by:
getOffersin interfaceTmaProductOfferFacade- Parameters:
processType- type of the processaffectedProductCode- code of the product that is currently selectedbpoCode- code of the bpo assigned to the main tariff service in CPIrequiredProductCodes- main tariff codes assigned in CPI- Returns:
ListofTmaOfferData
-
getOffers
Description copied from interface:TmaProductOfferFacadeReturns product offers filtered by parameters provided in offerContextData.- Specified by:
getOffersin interfaceTmaProductOfferFacade- Parameters:
offerContextData- contains the parameters for the offer- Returns:
ListofTmaOfferData
-
isServiceRequestAction
Description copied from interface:TmaProductOfferFacadeThis method verifies if the action from the parameter is a service request action- Specified by:
isServiceRequestActionin interfaceTmaProductOfferFacade- Parameters:
action- The input action.- Returns:
- True if the action is a service request action.
-
isBpo
Description copied from interface:TmaProductOfferFacadeThis method checks if the product offering is of type BPO.- Specified by:
isBpoin interfaceTmaProductOfferFacade- Parameters:
productData- the product offering.- Returns:
- true if BPO, false otherwise.
-
removeProductOffering
Description copied from interface:TmaProductOfferFacadeRemoves the product offering by id.- Specified by:
removeProductOfferingin interfaceTmaProductOfferFacade- Parameters:
id- the id of the Product Offering.
-
updateProductOffering
Description copied from interface:TmaProductOfferFacadeUpdates the givenProductData.- Specified by:
updateProductOfferingin interfaceTmaProductOfferFacade- Parameters:
productOfferingData- the product offering data
-
setProductDataPrices
protected void setProductDataPrices(String poCode, TmaPriceContextData priceContext, TmaProductOfferingModel productOffering, ProductData productData) Sets the prices on the product data object as SPP data objects.- Parameters:
poCode- the product offering codepriceContext- the price contextproductOffering- the PO modelproductData- the product data ot be populated with prices
-
getPriceRowModels
protected List<PriceRowModel> getPriceRowModels(String poCode, TmaPriceContextData priceContext, TmaProductOfferingModel productOffering) -
setPoPriceOverrideOnBpo
protected void setPoPriceOverrideOnBpo(TmaProductOfferingModel po, TmaBundledProductOfferingModel bpoModel, ProductData bpoData) Sets the price override of theTmaProductOfferingModelon the BPO provided, price representing the starting price of the if bought as part of the- Parameters:
po- product offering which is the affected product of the price overridebpoModel- bpo as part of which the product will be bought, to retrieve information frombpoData- bpo to be populated with the price of the if bought as part of the
-
createProductOffering
Description copied from interface:TmaProductOfferFacadeCreates aTmaProductOfferingModelfrom the givenProductData- Specified by:
createProductOfferingin interfaceTmaProductOfferFacade- Parameters:
productData- the product data.- Returns:
- true if successful, false otherwise.
-
getTmaPoService
-
setTmaPoService
-
getProductConverter
protected de.hybris.platform.servicelayer.dto.converter.Converter<ProductModel,ProductData> getProductConverter() -
setProductConverter
public void setProductConverter(de.hybris.platform.servicelayer.dto.converter.Converter<ProductModel, ProductData> productConverter) -
getProductConfiguredPopulator
protected de.hybris.platform.converters.ConfigurablePopulator<ProductModel,ProductData, getProductConfiguredPopulator()ProductOption> -
setProductConfiguredPopulator
public void setProductConfiguredPopulator(de.hybris.platform.converters.ConfigurablePopulator<ProductModel, ProductData, ProductOption> productConfiguredPopulator) -
getPriceFacade
-
setPriceFacade
-
getPriceDataFactory
-
setPriceDataFactory
-
getStrategyMapping
-
setStrategyMapping
-
getPriceContextDataReverseConverter
protected de.hybris.platform.servicelayer.dto.converter.Converter<TmaPriceContextData,TmaPriceContext> getPriceContextDataReverseConverter() -
setPriceContextDataReverseConverter
public void setPriceContextDataReverseConverter(de.hybris.platform.servicelayer.dto.converter.Converter<TmaPriceContextData, TmaPriceContext> priceContextDataReverseConverter) -
getTmaCommercePriceService
-
setTmaCommercePriceService
-
getTmaSubscriptionPricePlanConverter
protected de.hybris.platform.servicelayer.dto.converter.Converter<PriceRowModel,SubscriptionPricePlanData> getTmaSubscriptionPricePlanConverter() -
setTmaSubscriptionPricePlanConverter
public void setTmaSubscriptionPricePlanConverter(de.hybris.platform.servicelayer.dto.converter.Converter<PriceRowModel, SubscriptionPricePlanData> tmaSubscriptionPricePlanConverter) -
getTmaProductOfferingTypeReverseConvertersMapping
protected Map<String,de.hybris.platform.servicelayer.dto.converter.Converter<ProductData, getTmaProductOfferingTypeReverseConvertersMapping()TmaProductOfferingModel>> -
getTmaGenericItemService
-
getTmaProductOfferingTypeReverseMapping
protected Map<String,Class<? extends TmaProductOfferingModel>> getTmaProductOfferingTypeReverseMapping()
-