final class ProductServiceEP6Rest extends java.lang.Object implements ProductService
Modifier and Type | Field and Description |
---|---|
private CategoryService |
categoryService |
private org.springframework.core.convert.converter.Converter<java.util.List<org.springframework.hateoas.Link>,java.util.List<org.springframework.hateoas.Link>> |
converter |
private org.springframework.core.convert.converter.Converter<java.util.List<Link>,java.util.List<Link>> |
extConverter |
private InvocationBuilderFactory |
invocationBuilderFactory |
private Searcher |
searcher |
Constructor and Description |
---|
ProductServiceEP6Rest(InvocationBuilderFactory invocationBuilderFactory,
org.springframework.core.convert.converter.Converter<java.util.List<org.springframework.hateoas.Link>,java.util.List<org.springframework.hateoas.Link>> converter,
org.springframework.core.convert.converter.Converter<java.util.List<Link>,java.util.List<Link>> extConverter,
CategoryService categoryService,
Searcher searcher) |
Modifier and Type | Method and Description |
---|---|
private void |
cleanupHtml(ProductApi products,
java.lang.String baseUri) |
private void |
cleanupHtml(Products products,
java.lang.String baseUri) |
private void |
convertProductLinks(ProductApi result) |
private void |
convertProductsLinks(Products products) |
private <T> T |
doRestCall(javax.ws.rs.client.Invocation invocation,
java.lang.Class<T> class1) |
ProductApi |
get(ShopRequestContext shopReqCtx,
GUID productGuid)
Provides a product in a given shop request context
|
Products |
getAll(ShopRequestContext reqCtx,
ProductApi.SortAttribute attribute,
SortDirection direction,
java.lang.String query,
GUID categoryId)
Provides all products in a given shop request context
|
Products |
getByIds(ShopRequestContext shopReqCtx,
java.util.List<GUID> guids) |
CustomAttributes |
getCustomAttributes(ShopRequestContext shopRequestContext,
GUID productGuid) |
SimpleVariation |
getLowestPriceVariation(ShopRequestContext shopReqCtx,
GUID productId) |
private ProductApi |
getProduct(javax.ws.rs.client.Invocation invocation,
ShopRequestContext shopReqCtx) |
private Products |
getProducts(javax.ws.rs.client.Invocation invocation,
ShopRequestContext shopReqCtx) |
private static java.util.List<GUID> |
getResultGuids(SearchResponse response) |
Products |
getRootCategoryProducts(ShopRequestContext shopReqCtx) |
private final InvocationBuilderFactory invocationBuilderFactory
private final org.springframework.core.convert.converter.Converter<java.util.List<org.springframework.hateoas.Link>,java.util.List<org.springframework.hateoas.Link>> converter
private final org.springframework.core.convert.converter.Converter<java.util.List<Link>,java.util.List<Link>> extConverter
private final CategoryService categoryService
private final Searcher searcher
@Inject public ProductServiceEP6Rest(InvocationBuilderFactory invocationBuilderFactory, org.springframework.core.convert.converter.Converter<java.util.List<org.springframework.hateoas.Link>,java.util.List<org.springframework.hateoas.Link>> converter, org.springframework.core.convert.converter.Converter<java.util.List<Link>,java.util.List<Link>> extConverter, CategoryService categoryService, Searcher searcher)
public ProductApi get(ShopRequestContext shopReqCtx, GUID productGuid)
ProductService
get
in interface ProductService
public Products getByIds(ShopRequestContext shopReqCtx, java.util.List<GUID> guids)
getByIds
in interface ProductService
public Products getRootCategoryProducts(ShopRequestContext shopReqCtx)
getRootCategoryProducts
in interface ProductService
private ProductApi getProduct(javax.ws.rs.client.Invocation invocation, ShopRequestContext shopReqCtx)
private Products getProducts(javax.ws.rs.client.Invocation invocation, ShopRequestContext shopReqCtx)
private <T> T doRestCall(javax.ws.rs.client.Invocation invocation, java.lang.Class<T> class1)
private void convertProductsLinks(Products products)
private void convertProductLinks(ProductApi result)
private void cleanupHtml(ProductApi products, java.lang.String baseUri)
private void cleanupHtml(Products products, java.lang.String baseUri)
public Products getAll(ShopRequestContext reqCtx, ProductApi.SortAttribute attribute, SortDirection direction, java.lang.String query, GUID categoryId)
ProductService
getAll
in interface ProductService
private static java.util.List<GUID> getResultGuids(SearchResponse response)
public CustomAttributes getCustomAttributes(ShopRequestContext shopRequestContext, GUID productGuid)
getCustomAttributes
in interface ProductService
public SimpleVariation getLowestPriceVariation(ShopRequestContext shopReqCtx, GUID productId)
getLowestPriceVariation
in interface ProductService