Interface ProductFacade

    • Method Detail

      • getProductForCodeAndOptions

        ProductData getProductForCodeAndOptions​(java.lang.String code,
                                                java.util.Collection<ProductOption> options)
                                         throws UnknownIdentifierException,
                                                java.lang.IllegalArgumentException
        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
        Throws:
        java.lang.IllegalArgumentException - when given product code is null
        UnknownIdentifierException - when product with the given code is not found
      • postReview

        ReviewData postReview​(java.lang.String productCode,
                              ReviewData reviewData)
                       throws UnknownIdentifierException,
                              java.lang.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:
        java.lang.IllegalArgumentException - when given review data is null
        UnknownIdentifierException - when product with the given code is not found
      • getReviews

        java.util.List<ReviewData> getReviews​(java.lang.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

        java.util.List<ReviewData> getReviews​(java.lang.String productCode,
                                              java.lang.Integer numberOfReviews)
                                       throws UnknownIdentifierException,
                                              java.lang.IllegalArgumentException
        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
        Throws:
        UnknownIdentifierException - when product with the given code is not found
        java.lang.IllegalArgumentException - when the quantity of numberOfReviews is negative
      • getProductReferencesForCode

        @Deprecated(since="5.0")
        java.util.List<ProductReferenceData> getProductReferencesForCode​(java.lang.String code,
                                                                         ProductReferenceTypeEnum referenceType,
                                                                         java.util.List<ProductOption> options,
                                                                         java.lang.Integer limit)
        Deprecated.
        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

        java.util.List<ProductReferenceData> getProductReferencesForCode​(java.lang.String code,
                                                                         java.util.List<ProductReferenceTypeEnum> referenceTypes,
                                                                         java.util.List<ProductOption> options,
                                                                         java.lang.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
        java.util.List<ConfigurationInfoData> getConfiguratorSettingsForCode​(@Nonnull
                                                                             java.lang.String code)
        Collect product configurator settings by product code.
        Parameters:
        code - product code
        Returns:
        list of configurator settings