Interface TmaProductOfferFacade
- All Known Implementing Classes:
DefaultTmaProductOfferFacade,TmaProductOfferCpFacade
public interface TmaProductOfferFacade
Facade that handles operations related to
TmaProductOfferingModel.- Since:
- 6.7
-
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.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.voidupdateProductOffering(ProductData productOfferingData) Updates the givenProductData.
-
Method Details
-
getPoForCode
Retrieves 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.- 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- Throws:
IllegalArgumentException- when given product code is nullde.hybris.platform.servicelayer.exceptions.UnknownIdentifierException- when product with the given code is not found
-
getParentsForCodeAndOptions
List<ProductData> getParentsForCodeAndOptions(String poCode, Collection<ProductOption> productOptions) Retrieves theTmaBundledProductOfferingModels representing direct and indirect parents of theTmaProductOfferingModelwith the code given.- 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
Verifies 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.- Parameters:
poCode- product offering codebpoCode- parent bundled product offering code- Returns:
- true if the parent is valid, false otherwise
-
getOffers
List<TmaOfferData> getOffers(String processType, String affectedProductCode, String bpoCode, Set<String> requiredProductCodes) Returns product offers for given parameters.- 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
-
getPoForCode
ProductData getPoForCode(String poCode, Collection<ProductOption> productOptions, TmaPriceContextData priceContextData) Retrieves theProductDatawith the given code, with additional information provided as and prices of theTmaProductOfferingModelbased on theTmaPriceContextData.- 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
-
getOffers
Returns product offers filtered by parameters provided in offerContextData.- Parameters:
offerContextData- contains the parameters for the offer- Returns:
ListofTmaOfferData
-
isServiceRequestAction
This method verifies if the action from the parameter is a service request action- Parameters:
action- The input action.- Returns:
- True if the action is a service request action.
-
isBpo
This method checks if the product offering is of type BPO.- Parameters:
productData- the product offering.- Returns:
- true if BPO, false otherwise.
-
createProductOffering
Creates aTmaProductOfferingModelfrom the givenProductData- Parameters:
productData- the product data.- Returns:
- true if successful, false otherwise.
-
removeProductOffering
Removes the product offering by id.- Parameters:
id- the id of the Product Offering.
-
updateProductOffering
Updates the givenProductData.- Parameters:
productOfferingData- the product offering data
-