Class Category
- java.lang.Object
-
- com.broadleafcommerce.catalogbrowse.domain.Category
-
- All Implemented Interfaces:
Serializable
public class Category extends Object implements Serializable
A structure containing all the info necessary for a category details page or section shown in a commerce-facing app (as opposed to a PIM UI).- Author:
- Nathan Moore (nathandmoore)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Category()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAttribute(String name, Object value)Takes in any additional attributes passed in the request not matching any defined properties.protected booleancanEqual(Object other)booleanequals(Object o)Map<String,Object>getAttribute()Return any additional attributes passed in the request not matching any defined properties.Map<String,Object>getAttributes()Map holding any additional attributes passed in the request not matching any defined properties.StringgetId()The context ID of the category.SimplePage<Product>getProducts()A page ofProductsbelonging to the category.inthashCode()voidsetAttributes(Map<String,Object> attributes)Map holding any additional attributes passed in the request not matching any defined properties.voidsetId(String id)The context ID of the category.voidsetProducts(SimplePage<Product> products)A page ofProductsbelonging to the category.StringtoString()
-
-
-
Method Detail
-
addAttribute
public void addAttribute(String name, Object value)
Takes in any additional attributes passed in the request not matching any defined properties.- Parameters:
name- Name of the additional attributevalue- Value of the additional attribute
-
getAttribute
public Map<String,Object> getAttribute()
Return any additional attributes passed in the request not matching any defined properties.- Returns:
- any additional attributes passed in the request not matching any defined properties.
-
getId
public String getId()
The context ID of the category.- Returns:
- the context ID of the category
-
getProducts
public SimplePage<Product> getProducts()
A page ofProductsbelonging to the category. To configure the page pass paging params to the endpoint.- Returns:
- A page of
Productsbelonging to the category.
-
getAttributes
public Map<String,Object> getAttributes()
Map holding any additional attributes passed in the request not matching any defined properties.
-
setId
public void setId(String id)
The context ID of the category.- Parameters:
id- the context ID of the category
-
setProducts
public void setProducts(SimplePage<Product> products)
A page ofProductsbelonging to the category. To configure the page pass paging params to the endpoint.- Parameters:
products- A page ofProductsbelonging to the category.
-
setAttributes
public void setAttributes(Map<String,Object> attributes)
Map holding any additional attributes passed in the request not matching any defined properties.
-
canEqual
protected boolean canEqual(Object other)
-
-