Lightweight, template-friendly view of a Category, used to render category names, titles and images on category and product listing pages. Instances are produced from a Category entity by the toBean factory methods and are not persisted themselves.
Properties
| Property | Returns | Description |
|---|---|---|
| id | long | Database id of the underlying category. |
| imageHref | String | URL for the category's main image under the content-addressed file store, or null if the category has no main image set. |
| name | String | Path-safe, organisation-unique identifier of the category, used as the lookup key when searching for it by name. |
| notes | String | Free-text description of the category. May be null or empty if none has been set. |
| parentTitle | String | Titles of this category's ancestors, from the top-most parent down, joined with " / ". Returns an empty string if the category has no parent category. |
| title | String | Display title of the category, shown to shop visitors. When the bean was built with toBean(Category, int) the title is prefixed with a run of dashes reflecting how deeply the category is nested. |
Methods
getId()
Returns: long
Database id of the underlying category.
getName()
Returns: String
Path-safe, organisation-unique identifier of the category, used as the lookup key when searching for it by name.
getTitle()
Returns: String
Display title of the category, shown to shop visitors. When the bean was built with toBean(Category, int) the title is prefixed with a run of dashes reflecting how deeply the category is nested.
getNotes()
Returns: String
Free-text description of the category. May be null or empty if none has been set.
getImageHref()
Returns: String
URL for the category's main image under the content-addressed file store, or null if the category has no main image set.
getParentTitle()
Returns: String
Titles of this category's ancestors, from the top-most parent down, joined with " / ". Returns an empty string if the category has no parent category.