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 InvocationBuilder |
invocationBuilder |
private static java.lang.String |
RESOURCE_UPDATED_PRODUCTS_PATH |
private Searcher |
searcher |
private javax.ws.rs.core.SecurityContext |
secCtx |
private static java.lang.String |
STARTPAGE_RESOURCE_PATH |
RESOURCE_ID_URI_BUILDER, RESOURCE_PATH, RESOURCE_URI_BUILDER, SUBRESOURCE_URI_BUILDER
Constructor and Description |
---|
ProductReadServiceEP6(InvocationBuilder invocationBuilder,
Converter<java.util.List<Link>,java.util.List<Link>> converter,
CategoryService categoryService,
Searcher searcher,
javax.ws.rs.core.SecurityContext secCtx) |
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) |
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) |
private java.time.LocalDateTime |
getChangeAfterValue(java.time.LocalDateTime after) |
CustomAttributes |
getCustomAttributes(ShopRequestContext shopReqCtx,
GUID productId) |
private java.lang.String |
getKey(LastChangedProductProperty set) |
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<UpdatedProduct> |
getUpdated(ShopRequestContext shopRequestContext,
LastChangedProductProperty property,
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> responseType) |
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> responseType) |
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<UpdatedProduct> |
invokeGetUpdatedProducts(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 PageEP6<UpdatedProduct> |
postProcessUpdatedProducts(PageEP6<UpdatedProduct> products,
ShopRequestContext shopReqCtx) |
private static final java.lang.String STARTPAGE_RESOURCE_PATH
private static final java.lang.String RESOURCE_UPDATED_PRODUCTS_PATH
private final InvocationBuilder invocationBuilder
private final CategoryService categoryService
private final Searcher searcher
private final javax.ws.rs.core.SecurityContext secCtx
@Inject public ProductReadServiceEP6(InvocationBuilder invocationBuilder, Converter<java.util.List<Link>,java.util.List<Link>> converter, CategoryService categoryService, Searcher searcher, javax.ws.rs.core.SecurityContext secCtx)
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> 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
public PageEP6<UpdatedProduct> getUpdated(ShopRequestContext shopRequestContext, @Nonnull LastChangedProductProperty property, @Nullable java.time.LocalDateTime after)
getUpdated
in interface ProductReadService
private java.lang.String getKey(LastChangedProductProperty set)
private java.time.LocalDateTime getChangeAfterValue(java.time.LocalDateTime after)
private PageEP6<UpdatedProduct> invokeGetUpdatedProducts(ShopRequestContext shopReqCtx, java.lang.String path, java.util.Map<java.lang.String,java.lang.Object[]> params)
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> responseType)
private <T> T invokeGetObject(ShopRequestContext shopReqCtx, java.lang.String path, java.util.Map<java.lang.String,java.lang.Object[]> params, java.lang.Class<T> responseType)
private ProductApi postProcessProducts(ProductApi product, ShopRequestContext shopReqCtx)
private PageEP6<ProductApi> postProcessProducts(PageEP6<ProductApi> products, ShopRequestContext shopReqCtx)
private PageEP6<UpdatedProduct> postProcessUpdatedProducts(PageEP6<UpdatedProduct> products, ShopRequestContext shopReqCtx)
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)