Interface TmaProductOfferFacade

All Known Implementing Classes:
DefaultTmaProductOfferFacade, TmaProductOfferCpFacade

public interface TmaProductOfferFacade
Facade that handles operations related to TmaProductOfferingModel.
Since:
6.7
  • Method Details

    • getPoForCode

      ProductData getPoForCode(String poCode, Collection<ProductOption> productOptions)
      Retrieves the ProductData with the code given populated with information depending on the provided . The current session data (catalog versions, user) are used, so a valid TmaProductOfferingModel for the current session parameters will be returned.
      Parameters:
      poCode - unique identifier of the TmaProductOfferingModel to be retrieved
      productOptions - product options determining the attributes of the ProductData to be populated
      Returns:
      ProductData populated with the given options for the provided code
      Throws:
      IllegalArgumentException - when given product code is null
      de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException - when product with the given code is not found
    • getParentsForCodeAndOptions

      List<ProductData> getParentsForCodeAndOptions(String poCode, Collection<ProductOption> productOptions)
      Retrieves the TmaBundledProductOfferingModels representing direct and indirect parents of the TmaProductOfferingModel with the code given.
      Parameters:
      poCode - unique identifier of the TmaProductOfferingModel for which to retrieve the parent bpos
      productOptions - product options determining the attributes of the ProductData to be populated
      Returns:
      List<ProductData> all bpo parents for the TmaProductOfferingModel with the code given
    • isValidParent

      boolean isValidParent(String poCode, String bpoCode)
      Verifies if the given parent code represents a valid TmaBundledProductOfferingModel parent 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 code
      bpoCode - 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 process
      affectedProductCode - code of the product that is currently selected
      bpoCode - code of the bpo assigned to the main tariff service in CPI
      requiredProductCodes - main tariff codes assigned in CPI
      Returns:
      List of TmaOfferData
    • getPoForCode

      ProductData getPoForCode(String poCode, Collection<ProductOption> productOptions, TmaPriceContextData priceContextData)
      Retrieves the ProductData with the given code, with additional information provided as and prices of the TmaProductOfferingModel based on the TmaPriceContextData.
      Parameters:
      poCode - unique identifier of the TmaProductOfferingModel to be retrieved
      productOptions - product options determining the attributes of the ProductData to be populated
      priceContextData - TmaPriceContextData to create price context data
      Returns:
      ProductData populated with the given options for the provided code
    • getOffers

      List<TmaOfferData> getOffers(TmaOfferContextData offerContextData)
      Returns product offers filtered by parameters provided in offerContextData.
      Parameters:
      offerContextData - contains the parameters for the offer
      Returns:
      List of TmaOfferData
    • isServiceRequestAction

      boolean isServiceRequestAction(TmaSubscribedProductAction action)
      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

      boolean isBpo(ProductData productData)
      This method checks if the product offering is of type BPO.
      Parameters:
      productData - the product offering.
      Returns:
      true if BPO, false otherwise.
    • createProductOffering

      boolean createProductOffering(ProductData productData)
      Creates a TmaProductOfferingModel from the given ProductData
      Parameters:
      productData - the product data.
      Returns:
      true if successful, false otherwise.
    • removeProductOffering

      void removeProductOffering(String id)
      Removes the product offering by id.
      Parameters:
      id - the id of the Product Offering.
    • updateProductOffering

      void updateProductOffering(ProductData productOfferingData)
      Updates the given ProductData.
      Parameters:
      productOfferingData - the product offering data