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 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.
      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. Use getProductForCodeAndOptions(String, Collection) if you only have the code.
      Parameters:
      productModel - the productModel
      options - 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

      ProductData getProductForCodeAndOptions(String code, Collection<ProductOption> options)
      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. Use getProductForOptions(ProductModel, Collection) if you have the model already.
      Parameters:
      code - the code of the product to be found
      options - 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. New CustomerReviewModel entry will be created.
      Parameters:
      productCode - the product code that given review will be assigned to
      reviewData - the review data to be created in the system
      Returns:
      the created review converted into ReviewData object
      Throws:
      IllegalArgumentException - when given review data is null
      UnknownIdentifierException - when product with the given code is not found
    • getReviews

      List<ReviewData> getReviews(String productCode) throws UnknownIdentifierException
      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

      List<ReviewData> getReviews(String productCode, Integer numberOfReviews)
      Gets the first X reviews for specified product. Current session catalog version is used to retrieve reviews from proper product.
      Parameters:
      productCode - the product code
      numberOfReviews - 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.
      Retrieves product references of a product given its code.
      Parameters:
      code - the product code
      referenceType - the product reference type
      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
    • 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 code
      referenceTypes - 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

      @Nonnull List<ConfigurationInfoData> getConfiguratorSettingsForCode(@Nonnull String code)
      Collect product configurator settings by product code.
      Parameters:
      code - product code
      Returns:
      list of configurator settings