Class AbstractSearchModelMapper

java.lang.Object
com.skava.search.mapper.AbstractSearchModelMapper

public abstract class AbstractSearchModelMapper extends Object

The Abstract class AbstractSearchModelMapper

An abstract class to define the search related models mapping.
Author:
Infosys Equinox
  • Constructor Details

    • AbstractSearchModelMapper

      public AbstractSearchModelMapper()
  • Method Details

    • transformToSFCategory

      public abstract Category transformToSFCategory(CategoryHierarchyResponse categoryHierarchy)
      This method is used to transform the Search - Category model into orchestration category model.
      Parameters:
      categoryHierarchy - Indicates the CategoryHierarchyResponse model for converting
      Returns:
      Returns a Category, contains the response of parent, sub category etc.
    • transformToSFPLPResponse

      public abstract PLPResponse transformToSFPLPResponse(ProductLoadResponse productLoadResponse)
      This method is used to transform the Search - PLP model into orchestration PLP model.
      Parameters:
      productLoadResponse - Indicates the ProductLoadResponse model for converting
      Returns:
      Returns orchestration PLPResponse model object
    • transformToSFPDPResponse

      public abstract PDPResponse transformToSFPDPResponse(ProductResponse productLoadResponse)
      This method is used to transform the catalog product response model into orchestration PDP response model
      Parameters:
      productLoadResponse - Indicates a ProductResponse, contains the response of a product.
      Returns:
      Returns a PDPResponse, contains the response of product, such as identifier, status etc.
    • transformToSFProduct

      public abstract SFProduct transformToSFProduct(Product productRequest)
      This method is used to transform the catalog sku model into orchestration catalog sku model
      Parameters:
      productRequest - Indicates a Product, contains the response of a Product info such as identifier, status, etc.
      Returns:
      Returns a SFProduct, contains the response of Product, such as identifier, status etc.
    • transformToSFProduct

      public abstract PriceModel transformToSFProduct(PriceRange priceRange)
      This method is used to convert price range model into orchestration price model
      Parameters:
      priceRange - Indicates a PriceRange, contains the price range for the product
      Returns:
      Returns a PriceModel, contains the Price range of the product.
    • skuPropertyToMap

      public abstract SkuOrchestration skuPropertyToMap(Sku sku)
      This method is used to transform the catalog sku model into orchestration catalog sku model
      Parameters:
      sku - Indicates a Sku, contains the response of a SKU, such as identifier, status, etc.
      Returns:
      Returns a SkuOrchestration, contains the response of Sku, such as identifier, status etc.
    • transformToSFSuggestionResponse

      public abstract SuggestionAPIResponse transformToSFSuggestionResponse(SuggestionResponse suggestion)
      This method is used to transform search suggestion model to orchestration suggestion model
      Parameters:
      suggestion - Indicates a SuggestionResponse, contains the response of a search suggestions.
      Returns:
      Returns a SuggestionAPIResponse, contains the response of Suggestions,
    • updatePrice

      protected void updatePrice(SkuOrchestration sku)
      Updates the price in the sku
      Parameters:
      sku - Indicates a SkuOrchestration, contains the response of a SKU, such as identifier, status, etc.
    • updateChildrenProperty

      protected void updateChildrenProperty(SFProduct sfProduct)
    • updateChildrenPropertyForSkus

      protected void updateChildrenPropertyForSkus(SFSku sfSku)
    • updateAllSkuPriceInProduct

      protected void updateAllSkuPriceInProduct(SFProduct sfProduct)
      Updates all the prices in the product level
      Parameters:
      sfProduct - Indicates a SFProduct, contains the response of Product, such as identifier, status etc.
    • updateCategoriesInProduct

      protected void updateCategoriesInProduct(PDPResponse pdpResponse, ProductResponse productLoadResponse)
      Updates Categories in the product level
      Parameters:
      pdpResponse - Indicates a PDPResponse, contains the response of Product, such as identifier, status etc.
      productLoadResponse - Indicates a ProductResponse, obtains response of a product and category hierarchy.
    • updateCategoryPropertiesInCategory

      protected void updateCategoryPropertiesInCategory(Category categoryResponse, CategoryHierarchyResponse categoryHierarchy)
      Updates name after category properties has been completed
      Parameters:
      categoryResponse - Indicates a Category, contains the mapped response of category.
      categoryHierarchy - Indicates a CategoryHierarchyResponse, obtains response of a category hierarchy.