org.broadleafcommerce.core.web.api.wrapper
Class CategoryWrapper
java.lang.Object
org.broadleafcommerce.core.web.api.wrapper.BaseWrapper
org.broadleafcommerce.core.web.api.wrapper.CategoryWrapper
- All Implemented Interfaces:
- APIWrapper<Category>, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware
public class CategoryWrapper
- extends BaseWrapper
- implements APIWrapper<Category>
This is a JAXB wrapper for a Broadleaf Category. There may be several reasons to extend this class.
First, you may want to extend Broadleaf's CategroryImpl and expose those extensions via a RESTful
service. You may also want to suppress properties that are being serialized. To expose new properties, or
suppress properties that have been exposed, do the following:
1. Extend this class
2. Override the wrap method.
3. Within the wrap method, either override all properties that you want to set, or call super.wrap(Category)
4. Set additional property values that you have added.
5. Set super properties to null if you do not want them serialized. (e.g. super.name = null;
| Fields inherited from class org.broadleafcommerce.core.web.api.wrapper.BaseWrapper |
context |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
id
protected Long id
name
protected String name
description
protected String description
url
protected String url
urlKey
protected String urlKey
activeStartDate
protected Date activeStartDate
activeEndDate
protected Date activeEndDate
CategoryWrapper
public CategoryWrapper()
wrap
public void wrap(Category category,
javax.servlet.http.HttpServletRequest request)
- Specified by:
wrap in interface APIWrapper<Category>
buildSubcategoryTree
protected List<CategoryWrapper> buildSubcategoryTree(List<CategoryWrapper> wrappers,
Category root,
javax.servlet.http.HttpServletRequest request,
int depth)
Copyright © 2012. All Rights Reserved.