Package com.skava.search.mapper
Class AbstractSearchModelMapper
java.lang.Object
com.skava.search.mapper.AbstractSearchModelMapper
The Abstract class AbstractSearchModelMapper
An abstract class to define the search related models mapping.- Author:
- Infosys Equinox
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract SkuOrchestration
skuPropertyToMap
(Sku sku) This method is used to transform the catalog sku model into orchestration catalog sku modelabstract Category
transformToSFCategory
(CategoryHierarchyResponse categoryHierarchy) This method is used to transform the Search - Category model into orchestration category model.abstract PDPResponse
transformToSFPDPResponse
(ProductResponse productLoadResponse) This method is used to transform the catalog product response model into orchestration PDP response modelabstract PLPResponse
transformToSFPLPResponse
(ProductLoadResponse productLoadResponse) This method is used to transform the Search - PLP model into orchestration PLP model.abstract PriceModel
transformToSFProduct
(PriceRange priceRange) This method is used to convert price range model into orchestration price modelabstract SFProduct
transformToSFProduct
(Product productRequest) This method is used to transform the catalog sku model into orchestration catalog sku modelabstract SuggestionAPIResponse
transformToSFSuggestionResponse
(SuggestionResponse suggestion) This method is used to transform search suggestion model to orchestration suggestion modelprotected void
updateAllSkuPriceInProduct
(SFProduct sfProduct) Updates all the prices in the product levelprotected void
updateCategoriesInProduct
(PDPResponse pdpResponse, ProductResponse productLoadResponse) Updates Categories in the product levelprotected void
updateCategoryPropertiesInCategory
(Category categoryResponse, CategoryHierarchyResponse categoryHierarchy) Updates name after category properties has been completedprotected void
updateChildrenProperty
(SFProduct sfProduct) protected void
protected void
Updates the price in the sku
-
Constructor Details
-
AbstractSearchModelMapper
public AbstractSearchModelMapper()
-
-
Method Details
-
transformToSFCategory
This method is used to transform the Search - Category model into orchestration category model.- Parameters:
categoryHierarchy
- Indicates theCategoryHierarchyResponse
model for converting- Returns:
- Returns a
Category
, contains the response of parent, sub category etc.
-
transformToSFPLPResponse
This method is used to transform the Search - PLP model into orchestration PLP model.- Parameters:
productLoadResponse
- Indicates theProductLoadResponse
model for converting- Returns:
- Returns orchestration
PLPResponse
model object
-
transformToSFPDPResponse
This method is used to transform the catalog product response model into orchestration PDP response model- Parameters:
productLoadResponse
- Indicates aProductResponse
, contains the response of a product.- Returns:
- Returns a
PDPResponse
, contains the response of product, such as identifier, status etc.
-
transformToSFProduct
This method is used to transform the catalog sku model into orchestration catalog sku model -
transformToSFProduct
This method is used to convert price range model into orchestration price model- Parameters:
priceRange
- Indicates aPriceRange
, contains the price range for the product- Returns:
- Returns a
PriceModel
, contains the Price range of the product.
-
skuPropertyToMap
This method is used to transform the catalog sku model into orchestration catalog sku model- Parameters:
sku
- Indicates aSku
, 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 aSuggestionResponse
, contains the response of a search suggestions.- Returns:
- Returns a
SuggestionAPIResponse
, contains the response of Suggestions,
-
updatePrice
Updates the price in the sku- Parameters:
sku
- Indicates aSkuOrchestration
, contains the response of a SKU, such as identifier, status, etc.
-
updateChildrenProperty
-
updateChildrenPropertyForSkus
-
updateAllSkuPriceInProduct
Updates all the prices in the product level- Parameters:
sfProduct
- Indicates aSFProduct
, 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 aPDPResponse
, contains the response of Product, such as identifier, status etc.productLoadResponse
- Indicates aProductResponse
, 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 aCategory
, contains the mapped response of category.categoryHierarchy
- Indicates aCategoryHierarchyResponse
, obtains response of a category hierarchy.
-