Interface ProductFacade
- All Known Implementing Classes:
DefaultProductFacade,DefaultProductVariantFacade
public interface ProductFacade
Product facade interface. Its main purpose is to retrieve product related DTOs using existing services.
-
Method Summary
Modifier and TypeMethodDescriptionCollect product configurator settings by product code.getProductForCodeAndOptions(String code, Collection<ProductOption> options) Gets the product by code.getProductForOptions(ProductModel productModel, Collection<ProductOption> options) Deprecated, for removal: This API element is subject to removal in a future version.Since 6.0.getProductReferencesForCode(String code, ProductReferenceTypeEnum referenceType, List<ProductOption> options, Integer limit) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.0.getProductReferencesForCode(String code, List<ProductReferenceTypeEnum> referenceTypes, List<ProductOption> options, Integer limit) Retrieves product references of a product given its code.getReviews(String productCode) Gets the reviews for specified product.getReviews(String productCode, Integer numberOfReviews) Gets the first X reviews for specified product.postReview(String productCode, ReviewData reviewData) Post review for specified product code.
-
Method Details
-
getProductForOptions
@Deprecated(since="6.0", forRemoval=true) ProductData getProductForOptions(ProductModel productModel, Collection<ProductOption> options) Deprecated, for removal: This API element is subject to removal in a future version.Since 6.0. UsegetProductForCodeAndOptions(String, Collection)instead.Gets the product data. The current session data (catalog versions, user) are used, so the valid product for the current session parameters will be returned. UsegetProductForCodeAndOptions(String, Collection)if you only have the code.- Parameters:
productModel- the productModeloptions- options set that determines amount of information that will be attached to the returned product. If empty or null default BASIC option is assumed- Returns:
- the
ProductData
-
getProductForCodeAndOptions
Gets the product by code. The current session data (catalog versions, user) are used, so the valid product for the current session parameters will be returned. UsegetProductForOptions(ProductModel, Collection)if you have the model already.- Parameters:
code- the code of the product to be foundoptions- options set that determines amount of information that will be attached to the returned product. If empty or null default BASIC option is assumed- Returns:
- the
ProductData
-
postReview
ReviewData postReview(String productCode, ReviewData reviewData) throws UnknownIdentifierException, IllegalArgumentException Post review for specified product code. Current session catalog version is used to retrieve proper product. NewCustomerReviewModelentry will be created.- Parameters:
productCode- the product code that given review will be assigned toreviewData- the review data to be created in the system- Returns:
- the created review converted into
ReviewDataobject - Throws:
IllegalArgumentException- when given review data is nullUnknownIdentifierException- when product with the given code is not found
-
getReviews
Gets the reviews for specified product. Current session catalog version is used to retrieve reviews from proper product.- Parameters:
productCode- the product code- Returns:
- the reviews that are assigned to specified product
- Throws:
UnknownIdentifierException- when product with the given code is not found
-
getReviews
Gets the first X reviews for specified product. Current session catalog version is used to retrieve reviews from proper product.- Parameters:
productCode- the product codenumberOfReviews- the number of reviews to show, if null shows all reviews, if exceeds the total number of reviews, shows all available reviews- Returns:
- the first X reviews that are assigned to specified product
-
getProductReferencesForCode
@Deprecated(since="5.0", forRemoval=true) List<ProductReferenceData> getProductReferencesForCode(String code, ProductReferenceTypeEnum referenceType, List<ProductOption> options, Integer limit) Deprecated, for removal: This API element is subject to removal in a future version.Since 5.0. Use {getProductReferencesForCode(String, List, List, Integer)instead.Retrieves product references of a product given its code.- Parameters:
code- the product codereferenceType- the product reference typeoptions- options set that determines amount of information that will be attached to the returned productlimit- maximum number of references to retrieve. If null, all available references will be retrieved- Returns:
- the product references
-
getProductReferencesForCode
List<ProductReferenceData> getProductReferencesForCode(String code, List<ProductReferenceTypeEnum> referenceTypes, List<ProductOption> options, Integer limit) Retrieves product references of a product given its code.- Parameters:
code- the product codereferenceTypes- the product reference types to return.options- options set that determines amount of information that will be attached to the returned product.limit- maximum number of references to retrieve. If null, all available references will be retrieved.- Returns:
- the product references
-
getConfiguratorSettingsForCode
Collect product configurator settings by product code.- Parameters:
code- product code- Returns:
- list of configurator settings
-