org.broadleafcommerce.core.web.api.wrapper
Class CategoryWrapper

java.lang.Object
  extended by org.broadleafcommerce.core.web.api.wrapper.BaseWrapper
      extended by 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;


Field Summary
protected  Date activeEndDate
           
protected  Date activeStartDate
           
protected  String description
           
protected  Long id
           
protected  String name
           
protected  String url
           
protected  String urlKey
           
 
Fields inherited from class org.broadleafcommerce.core.web.api.wrapper.BaseWrapper
context
 
Constructor Summary
CategoryWrapper()
           
 
Method Summary
protected  List<CategoryWrapper> buildSubcategoryTree(List<CategoryWrapper> wrappers, Category root, javax.servlet.http.HttpServletRequest request, int depth)
           
 void wrap(Category category, javax.servlet.http.HttpServletRequest request)
           
 
Methods inherited from class org.broadleafcommerce.core.web.api.wrapper.BaseWrapper
setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

CategoryWrapper

public CategoryWrapper()
Method Detail

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 © 2013. All Rights Reserved.