org.broadleafcommerce.core.web.api.endpoint.catalog
Class CatalogEndpoint
java.lang.Object
org.broadleafcommerce.core.web.api.endpoint.BaseEndpoint
org.broadleafcommerce.core.web.api.endpoint.catalog.CatalogEndpoint
- All Implemented Interfaces:
- org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.context.MessageSourceAware
public abstract class CatalogEndpoint
- extends BaseEndpoint
This class exposes catalog services as RESTful APIs. It is dependent on
a JAX-RS implementation such as Jersey. This class must be extended, with appropriate JAX-RS
annotations, such as:
javax.ws.rs.@Scope
javax.ws.rs.@Path
javax.ws.rs.@Produces
javax.ws.rs.@Consumes
javax.ws.rs.@Context
etc...
... in the subclass. The subclass must also be a Spring Bean. The subclass can then override
the methods, and specify custom inputs and outputs. It will also specify
javax.ws.rs.@Path annotations, javax.ws.rs.@Context,
javax.ws.rs.@PathParam, javax.ws.rs.@QueryParam,
javax.ws.rs.@GET, javax.ws.rs.@POST, etc... Essentially, the subclass
will override and extend the methods of this class, add new methods, and control the JAX-RS behavior
using annotations according to the JAX-RS specification.
User: Kelly Tisdell
|
Method Summary |
CategoriesWrapper |
findActiveSubCategories(javax.servlet.http.HttpServletRequest request,
Long id,
int limit,
int offset)
|
CategoriesWrapper |
findAllCategories(javax.servlet.http.HttpServletRequest request,
String name,
int limit,
int offset)
|
List<CategoryAttributeWrapper> |
findCategoryAttributesForCategory(javax.servlet.http.HttpServletRequest request,
Long id)
|
CategoryWrapper |
findCategoryById(javax.servlet.http.HttpServletRequest request,
Long id,
int productLimit,
int productOffset,
int subcategoryLimit,
int subcategoryOffset,
int subcategoryDepth)
|
List<RelatedProductWrapper> |
findCrossSaleProductsByProduct(javax.servlet.http.HttpServletRequest request,
Long id,
int limit,
int offset)
|
SkuWrapper |
findDefaultSkuByProductId(javax.servlet.http.HttpServletRequest request,
Long id)
|
List<MediaWrapper> |
findMediaForCategory(javax.servlet.http.HttpServletRequest request,
Long id)
|
List<MediaWrapper> |
findMediaForProduct(javax.servlet.http.HttpServletRequest request,
Long id)
|
List<MediaWrapper> |
findMediaForSku(javax.servlet.http.HttpServletRequest request,
Long id)
|
CategoriesWrapper |
findParentCategoriesForProduct(javax.servlet.http.HttpServletRequest request,
Long id)
|
List<ProductAttributeWrapper> |
findProductAttributesForProduct(javax.servlet.http.HttpServletRequest request,
Long id)
|
ProductWrapper |
findProductById(javax.servlet.http.HttpServletRequest request,
Long id)
Search for Product by product id |
List<ProductWrapper> |
findProductsByName(javax.servlet.http.HttpServletRequest request,
String name,
int limit,
int offset)
Search for Product instances whose name starts with
or is equal to the passed in product name. |
List<ProductWrapper> |
findProductsForCategory(javax.servlet.http.HttpServletRequest request,
Long id,
int limit,
int offset,
boolean activeOnly)
|
List<SkuAttributeWrapper> |
findSkuAttributesForSku(javax.servlet.http.HttpServletRequest request,
Long id)
|
SkuWrapper |
findSkuById(javax.servlet.http.HttpServletRequest request,
Long id)
|
List<SkuWrapper> |
findSkusByProductById(javax.servlet.http.HttpServletRequest request,
Long id)
Search for Sku instances for a given product |
CategoriesWrapper |
findSubCategories(javax.servlet.http.HttpServletRequest request,
Long id,
int limit,
int offset,
boolean active)
|
List<RelatedProductWrapper> |
findUpSaleProductsByProduct(javax.servlet.http.HttpServletRequest request,
Long id,
int limit,
int offset)
|
protected StaticAssetService |
getStaticAssetService()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
catalogService
protected CatalogService catalogService
staticAssetService
protected StaticAssetService staticAssetService
CatalogEndpoint
public CatalogEndpoint()
findProductById
public ProductWrapper findProductById(javax.servlet.http.HttpServletRequest request,
Long id)
- Search for
Product by product id
- Parameters:
id - the product id
- Returns:
- the product instance with the given product id
findProductsByName
public List<ProductWrapper> findProductsByName(javax.servlet.http.HttpServletRequest request,
String name,
int limit,
int offset)
- Search for
Product instances whose name starts with
or is equal to the passed in product name.
- Parameters:
name - limit - the maximum number of results, defaults to 20offset - the starting point in the record set, defaults to 0
- Returns:
- the list of product instances that fit the search criteria
findSkusByProductById
public List<SkuWrapper> findSkusByProductById(javax.servlet.http.HttpServletRequest request,
Long id)
- Search for
Sku instances for a given product
- Parameters:
id -
- Returns:
- the list of sku instances for the product
findDefaultSkuByProductId
public SkuWrapper findDefaultSkuByProductId(javax.servlet.http.HttpServletRequest request,
Long id)
findAllCategories
public CategoriesWrapper findAllCategories(javax.servlet.http.HttpServletRequest request,
String name,
int limit,
int offset)
findSubCategories
public CategoriesWrapper findSubCategories(javax.servlet.http.HttpServletRequest request,
Long id,
int limit,
int offset,
boolean active)
findActiveSubCategories
public CategoriesWrapper findActiveSubCategories(javax.servlet.http.HttpServletRequest request,
Long id,
int limit,
int offset)
findCategoryById
public CategoryWrapper findCategoryById(javax.servlet.http.HttpServletRequest request,
Long id,
int productLimit,
int productOffset,
int subcategoryLimit,
int subcategoryOffset,
int subcategoryDepth)
findCategoryAttributesForCategory
public List<CategoryAttributeWrapper> findCategoryAttributesForCategory(javax.servlet.http.HttpServletRequest request,
Long id)
findProductsForCategory
public List<ProductWrapper> findProductsForCategory(javax.servlet.http.HttpServletRequest request,
Long id,
int limit,
int offset,
boolean activeOnly)
findUpSaleProductsByProduct
public List<RelatedProductWrapper> findUpSaleProductsByProduct(javax.servlet.http.HttpServletRequest request,
Long id,
int limit,
int offset)
findCrossSaleProductsByProduct
public List<RelatedProductWrapper> findCrossSaleProductsByProduct(javax.servlet.http.HttpServletRequest request,
Long id,
int limit,
int offset)
findProductAttributesForProduct
public List<ProductAttributeWrapper> findProductAttributesForProduct(javax.servlet.http.HttpServletRequest request,
Long id)
findSkuAttributesForSku
public List<SkuAttributeWrapper> findSkuAttributesForSku(javax.servlet.http.HttpServletRequest request,
Long id)
findMediaForSku
public List<MediaWrapper> findMediaForSku(javax.servlet.http.HttpServletRequest request,
Long id)
findSkuById
public SkuWrapper findSkuById(javax.servlet.http.HttpServletRequest request,
Long id)
findMediaForProduct
public List<MediaWrapper> findMediaForProduct(javax.servlet.http.HttpServletRequest request,
Long id)
findMediaForCategory
public List<MediaWrapper> findMediaForCategory(javax.servlet.http.HttpServletRequest request,
Long id)
findParentCategoriesForProduct
public CategoriesWrapper findParentCategoriesForProduct(javax.servlet.http.HttpServletRequest request,
Long id)
getStaticAssetService
protected StaticAssetService getStaticAssetService()
Copyright © 2013. All Rights Reserved.