final class ProductReadServiceEP6 extends java.lang.Object implements ProductReadService
Modifier and Type | Field and Description |
---|---|
private CategoryService |
categoryService |
private Converter<java.util.List<Link>,java.util.List<Link>> |
converter |
private InvocationBuilderFactory |
invocationBuilderFactory |
private static java.lang.String |
RESOURCE_UPDATED_PRODUCTS_PATH |
private Searcher |
searcher |
private static java.lang.String |
STARTPAGE_RESOURCE_PATH |
RESOURCE_ID_URI_BUILDER, RESOURCE_PATH, SUBRESOURCE_URI_BUILDER
Constructor and Description |
---|
ProductReadServiceEP6(InvocationBuilderFactory invocationBuilderFactory,
Converter<java.util.List<Link>,java.util.List<Link>> converter,
CategoryService categoryService,
Searcher searcher) |
Modifier and Type | Method and Description |
---|---|
private static void |
cleanupHtml(PageEP6<ProductApi> products,
java.lang.String baseUri) |
private static void |
cleanupHtml(ProductApi products,
java.lang.String baseUri) |
<T extends ResourceSupport> |
convertLinks(T obj) |
private void |
convertProductLinks(ProductApi result) |
private void |
convertProductsLinks(PageEP6<ProductApi> products) |
private java.util.Map<java.lang.String,java.lang.Object[]> |
createQueryParamsForLastUpdateFilter(LastChangedProductProperty set,
java.time.LocalDateTime after) |
private <T> T |
doRestCall(javax.ws.rs.client.Invocation invocation,
java.lang.Class<T> class1) |
private static <T> T |
doRestCall(javax.ws.rs.client.Invocation invocation,
javax.ws.rs.core.GenericType<T> class1) |
ProductApi |
get(ShopRequestContext shopReqCtx,
GUID productGuid)
Provides a product in a given shop request context
|
PageEP6<ProductApi> |
getAll(ShopRequestContext reqCtx,
ProductApi.SortAttribute attribute,
SortDirection direction,
java.lang.String query,
GUID categoryId)
Provides all products in a given shop request context
|
PageEP6<ProductApi> |
getByIds(ShopRequestContext shopReqCtx,
java.util.List<GUID> guids) |
CustomAttributes |
getCustomAttributes(ShopRequestContext shopReqCtx,
GUID productId) |
SimpleVariation |
getLowestPriceVariation(ShopRequestContext shopReqCtx,
GUID productId) |
ResourceSupport |
getProductCategories(ShopRequestContext shopReqCtx,
GUID productGuid) |
private static java.util.List<GUID> |
getResultGuids(SearchResponse response) |
PageEP6<ProductApi> |
getRootCategoryProducts(ShopRequestContext shopReqCtx) |
PageEP6<ProductApi> |
getUpdated(ShopRequestContext shopRequestContext,
LastChangedProductProperty set,
java.time.LocalDateTime after) |
private <T> T |
invokeGetObject(ShopRequestContext shopReqCtx,
java.lang.String path,
java.util.Map<java.lang.String,java.lang.Object[]> params,
java.lang.Class<T> returnType) |
private <T> T |
invokeGetObject(ShopRequestContext shopReqCtx,
java.lang.String path,
java.util.Map<java.lang.String,java.lang.Object[]> params,
javax.ws.rs.core.GenericType<T> returnType) |
private ProductApi |
invokeGetProduct(ShopRequestContext shopReqCtx,
java.lang.String path,
java.util.Map<java.lang.String,java.lang.Object[]> params) |
private PageEP6<ProductApi> |
invokeGetProducts(ShopRequestContext shopReqCtx,
java.lang.String path,
java.util.Map<java.lang.String,java.lang.Object[]> params) |
private PageEP6<ProductApi> |
postProcessProducts(PageEP6<ProductApi> products,
ShopRequestContext shopReqCtx) |
private ProductApi |
postProcessProducts(ProductApi product,
ShopRequestContext shopReqCtx) |
private static final java.lang.String STARTPAGE_RESOURCE_PATH
private static final java.lang.String RESOURCE_UPDATED_PRODUCTS_PATH
private final InvocationBuilderFactory invocationBuilderFactory
private final CategoryService categoryService
private final Searcher searcher
@Inject public ProductReadServiceEP6(InvocationBuilderFactory invocationBuilderFactory, Converter<java.util.List<Link>,java.util.List<Link>> converter, CategoryService categoryService, Searcher searcher)
public ProductApi get(ShopRequestContext shopReqCtx, GUID productGuid)
ProductReadService
get
in interface ProductReadService
public PageEP6<ProductApi> getByIds(ShopRequestContext shopReqCtx, java.util.List<GUID> guids)
getByIds
in interface ProductReadService
public PageEP6<ProductApi> getUpdated(ShopRequestContext shopRequestContext, LastChangedProductProperty set, java.time.LocalDateTime after)
getUpdated
in interface ProductReadService
private java.util.Map<java.lang.String,java.lang.Object[]> createQueryParamsForLastUpdateFilter(LastChangedProductProperty set, java.time.LocalDateTime after)
public PageEP6<ProductApi> getRootCategoryProducts(ShopRequestContext shopReqCtx)
getRootCategoryProducts
in interface ProductReadService
public PageEP6<ProductApi> getAll(ShopRequestContext reqCtx, ProductApi.SortAttribute attribute, SortDirection direction, java.lang.String query, GUID categoryId)
ProductReadService
getAll
in interface ProductReadService
private static java.util.List<GUID> getResultGuids(SearchResponse response)
public CustomAttributes getCustomAttributes(ShopRequestContext shopReqCtx, GUID productId)
getCustomAttributes
in interface ProductReadService
public SimpleVariation getLowestPriceVariation(ShopRequestContext shopReqCtx, GUID productId)
getLowestPriceVariation
in interface ProductReadService
public ResourceSupport getProductCategories(ShopRequestContext shopReqCtx, GUID productGuid)
getProductCategories
in interface ProductReadService
private ProductApi invokeGetProduct(ShopRequestContext shopReqCtx, java.lang.String path, java.util.Map<java.lang.String,java.lang.Object[]> params)
private PageEP6<ProductApi> invokeGetProducts(ShopRequestContext shopReqCtx, java.lang.String path, java.util.Map<java.lang.String,java.lang.Object[]> params)
private <T> T invokeGetObject(ShopRequestContext shopReqCtx, java.lang.String path, java.util.Map<java.lang.String,java.lang.Object[]> params, javax.ws.rs.core.GenericType<T> returnType)
private <T> T invokeGetObject(ShopRequestContext shopReqCtx, java.lang.String path, java.util.Map<java.lang.String,java.lang.Object[]> params, java.lang.Class<T> returnType)
private ProductApi postProcessProducts(ProductApi product, ShopRequestContext shopReqCtx)
private PageEP6<ProductApi> postProcessProducts(PageEP6<ProductApi> products, ShopRequestContext shopReqCtx)
private static <T> T doRestCall(javax.ws.rs.client.Invocation invocation, javax.ws.rs.core.GenericType<T> class1)
private <T> T doRestCall(javax.ws.rs.client.Invocation invocation, java.lang.Class<T> class1)
private void convertProductsLinks(PageEP6<ProductApi> products)
public <T extends ResourceSupport> void convertLinks(T obj)
private void convertProductLinks(ProductApi result)
private static void cleanupHtml(ProductApi products, java.lang.String baseUri)
private static void cleanupHtml(PageEP6<ProductApi> products, java.lang.String baseUri)