Interface ProductService
-
- All Known Implementing Classes:
ProductServiceImpl
public interface ProductService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Product
addProductToCategory(java.lang.String categoryId, java.lang.String productId)
This method does a relationship between entities.Product
addProductToCategory(java.lang.String categoryId, java.util.LinkedHashMap<java.lang.String,java.lang.Object> productAsMap)
This method does a relationship between entities.java.util.Optional<Product>
createProduct(java.util.LinkedHashMap<java.lang.String,java.lang.Object> productAsMap)
This method creates a database entity.java.util.HashSet<EmbeddedBean>
getFallIntoProducts(java.lang.String[] productIds)
This method returns data as set.java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
getProductsByCategoryAndFirstLetter(java.lang.String categoryId, java.lang.String firstLetter)
This method retrieves a map, which can be processed in a templates.ProductRepository
getRepository()
java.util.List<java.util.Map<java.lang.String,java.lang.String>>
getSortedProductsByCategory(java.lang.String categoryId)
This method retrieves a map, which can be processed in a templates.ProductDTO
mapProductToDto(Product product)
This method does map product entity to dto objectvoid
removeProductAndClean(java.lang.String productId)
This method removes a database entity and clean all relationships from another entities.void
removeProductFromAttribute(java.lang.String productId, java.lang.String attrId)
This method removes relationship between database entities.void
removeProductFromAttributes(java.lang.String productId)
This method removes relationship between database entities.void
removeProductFromCategories(java.lang.String productId)
This method removes relationship between database entities.void
removeProductFromCategory(java.lang.String productId, java.lang.String categoryId)
This method removes relationship between database entities.void
removeProductFromSKU(java.lang.String productId, java.lang.String skuId)
This method removes relationship between database entities.void
removeProductFromSKUs(java.lang.String productId)
This method removes relationship between database entities.void
removeProductFromTranslation(java.lang.String productId, java.lang.String tranId)
This method removes relationship between database entities.void
removeProductFromTranslations(java.lang.String productId)
This method removes relationship between database entities.void
removeProductsByIds(java.util.ArrayList<java.lang.String> productsIds)
This method removes a list of database entities.Product
saveProduct(Product product)
This method saves a database entity.Product
saveProduct(java.util.LinkedHashMap<java.lang.String,java.lang.Object> productAsMap)
This method save an updates of database entity.java.util.List<ProductDTO>
searchProducts(java.lang.String requestJson)
This method does search requests and returns data as list.java.util.List<Product>
searchProducts(java.lang.String query, java.lang.String offset, java.lang.String limit)
This method does search requests and returns data as list.
-
-
-
Method Detail
-
getRepository
ProductRepository getRepository()
-
searchProducts
java.util.List<ProductDTO> searchProducts(java.lang.String requestJson)
This method does search requests and returns data as list.- Parameters:
requestJson
- search request- Returns:
- data transport entities as list
-
searchProducts
java.util.List<Product> searchProducts(java.lang.String query, java.lang.String offset, java.lang.String limit)
This method does search requests and returns data as list.- Parameters:
query
- search queryoffset
- offset for returned itemslimit
- limit for returned items- Returns:
- database entities as list
-
createProduct
java.util.Optional<Product> createProduct(java.util.LinkedHashMap<java.lang.String,java.lang.Object> productAsMap)
This method creates a database entity.- Parameters:
productAsMap
- map-representation of database entity- Returns:
- database entity
-
addProductToCategory
Product addProductToCategory(java.lang.String categoryId, java.util.LinkedHashMap<java.lang.String,java.lang.Object> productAsMap)
This method does a relationship between entities.- Parameters:
categoryId
- identification for database entity which will be updatedproductAsMap
- map-representation of database entity- Returns:
- database entity
-
addProductToCategory
Product addProductToCategory(java.lang.String categoryId, java.lang.String productId)
This method does a relationship between entities.- Parameters:
categoryId
- identification for database entity which will be updatedproductId
- identification for database entity which will be updated- Returns:
- database entity
-
saveProduct
Product saveProduct(java.util.LinkedHashMap<java.lang.String,java.lang.Object> productAsMap)
This method save an updates of database entity.- Parameters:
productAsMap
- map-representation of database entity- Returns:
- saved instance of database entity
-
saveProduct
Product saveProduct(Product product)
This method saves a database entity.- Parameters:
product
- database entity- Returns:
- saved instance of database entity
-
removeProductFromCategory
void removeProductFromCategory(java.lang.String productId, java.lang.String categoryId)
This method removes relationship between database entities.- Parameters:
productId
- identification for database entity which will be removedcategoryId
- identification for database entity which will be updated
-
removeProductFromSKU
void removeProductFromSKU(java.lang.String productId, java.lang.String skuId)
This method removes relationship between database entities.- Parameters:
productId
- identification for database entity which will be removedskuId
- identification for database entity which will be updated
-
removeProductFromAttribute
void removeProductFromAttribute(java.lang.String productId, java.lang.String attrId)
This method removes relationship between database entities.- Parameters:
productId
- identification for database entity which will be removedattrId
- identification for database entity which will be updated
-
removeProductFromTranslation
void removeProductFromTranslation(java.lang.String productId, java.lang.String tranId)
This method removes relationship between database entities.- Parameters:
productId
- identification for database entity which will be removedtranId
- identification for database entity which will be updated
-
removeProductFromCategories
void removeProductFromCategories(java.lang.String productId)
This method removes relationship between database entities.- Parameters:
productId
- identification for database entity which will be removed
-
removeProductFromSKUs
void removeProductFromSKUs(java.lang.String productId)
This method removes relationship between database entities.- Parameters:
productId
- identification for database entity which will be removed
-
removeProductFromAttributes
void removeProductFromAttributes(java.lang.String productId)
This method removes relationship between database entities.- Parameters:
productId
- identification for database entity which will be removed
-
removeProductFromTranslations
void removeProductFromTranslations(java.lang.String productId)
This method removes relationship between database entities.- Parameters:
productId
- identification for database entity which will be removed
-
removeProductAndClean
void removeProductAndClean(java.lang.String productId)
This method removes a database entity and clean all relationships from another entities.- Parameters:
productId
- identification for database entity which will be removed
-
removeProductsByIds
void removeProductsByIds(java.util.ArrayList<java.lang.String> productsIds)
This method removes a list of database entities.- Parameters:
productsIds
- the list of database entities which will be removed
-
getFallIntoProducts
java.util.HashSet<EmbeddedBean> getFallIntoProducts(java.lang.String[] productIds)
This method returns data as set.- Parameters:
productIds
- the list of database entities which will be retrieved- Returns:
- database entities as list
-
getSortedProductsByCategory
java.util.List<java.util.Map<java.lang.String,java.lang.String>> getSortedProductsByCategory(java.lang.String categoryId)
This method retrieves a map, which can be processed in a templates.- Parameters:
categoryId
- identification for database entity which will be retrieved- Returns:
- map-representation of data
-
getProductsByCategoryAndFirstLetter
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getProductsByCategoryAndFirstLetter(java.lang.String categoryId, java.lang.String firstLetter)
This method retrieves a map, which can be processed in a templates.- Parameters:
categoryId
- identification for database entity which will be retrievedfirstLetter
- first letter of the name for the product- Returns:
- map-representation of data
-
mapProductToDto
ProductDTO mapProductToDto(Product product)
This method does map product entity to dto object- Parameters:
product
- database entity which be used to map to dto- Returns:
- data transport object
-
-