public interface Category extends Serializable
CategoryImpl.CategoryImpl}| Modifier and Type | Method and Description |
|---|---|
List<Category> |
buildCategoryHierarchy(List<Category> currentHierarchy)
Build category hierarchy by walking the default category tree up to the root category.
|
List<Category> |
buildFullCategoryHierarchy(List<Category> currentHierarchy)
Build the full category hierarchy by walking up the default category tree and the all parent
category tree.
|
Date |
getActiveEndDate()
Gets the active end date.
|
List<Product> |
getActiveProducts()
|
Date |
getActiveStartDate()
Gets the active start date.
|
List<Category> |
getAllChildCategories()
Gets the child categories.
|
List<Category> |
getAllParentCategories()
Retrieve all parent categories
|
List<Product> |
getAllProducts()
Retrieve all the
Product instances associated with this
category. |
CategoryAttribute |
getCategoryAttributeByName(String name)
Convenience method to get a
CategoryAttribute by name |
List<CategoryAttribute> |
getCategoryAttributes()
Gets the attributes for this
Category. |
String |
getCategoryImage(String imageKey)
Deprecated.
replaced by
getCategoryMedia() |
Map<String,String> |
getCategoryImages()
Deprecated.
replaced by
getCategoryMedia() |
Map<String,Media> |
getCategoryMedia()
Gets the category media map.
|
List<Category> |
getChildCategories()
Gets the child categories.
|
Map<String,List<Long>> |
getChildCategoryURLMap()
Gets the child category url map.
|
List<RelatedProduct> |
getCrossSaleProducts()
Returns a list of cross sale products that are related to this category.
|
List<RelatedProduct> |
getCumulativeCrossSaleProducts()
Returns a list of the cross sale products in this category as well as
all cross sale products in all parent categories of this category.
|
List<FeaturedProduct> |
getCumulativeFeaturedProducts()
Returns a list of the featured products in this category as well as
all featured products in all parent categories of this category.
|
List<CategorySearchFacet> |
getCumulativeSearchFacets()
Returns a list of CategorySearchFacets that takes into consideration the search facets for this Category,
the search facets for all parent categories, and the search facets that should be excluded from this
Category.
|
List<RelatedProduct> |
getCumulativeUpSaleProducts()
Returns a list of the upsale products in this category as well as
all upsale products in all parent categories of this category.
|
Category |
getDefaultParentCategory()
Gets the default parent category.
|
String |
getDescription()
Gets the description.
|
String |
getDisplayTemplate()
Gets the display template.
|
List<SearchFacet> |
getExcludedSearchFacets()
Gets the excluded SearchFacets
|
List<FeaturedProduct> |
getFeaturedProducts()
Gets the featured products.
|
FulfillmentType |
getFulfillmentType()
Returns the default fulfillment type for skus in this category.
|
String |
getGeneratedUrl()
Creates the SEO url starting from this category and recursing up the
hierarchy of default parent categories until the topmost category is
reached.
|
Long |
getId()
Gets the primary key.
|
InventoryType |
getInventoryType()
Returns the type of inventory for this category
|
String |
getLongDescription()
Gets the long description.
|
Map<String,CategoryAttribute> |
getMappedCategoryAttributes()
Convenience method to return the
CategoryAttributes for the Category in an easily-consumable
form |
String |
getName()
Gets the name.
|
List<CategorySearchFacet> |
getSearchFacets()
Returns all of the SearchFacets that are directly associated with this Category
|
List<RelatedProduct> |
getUpSaleProducts()
Returns a list of cross sale products that are related to this category.
|
String |
getUrl()
Gets the url.
|
String |
getUrlKey()
Gets the url key.
|
boolean |
hasAllChildCategories()
Checks for child categories.
|
boolean |
hasChildCategories()
Checks for child categories.
|
boolean |
isActive()
Checks if is active.
|
void |
setActiveEndDate(Date activeEndDate)
Sets the active end date.
|
void |
setActiveStartDate(Date activeStartDate)
Sets the active start date.
|
void |
setAllChildCategories(List<Category> childCategories)
Sets the list of child categories (active and inactive)
|
void |
setAllParentCategories(List<Category> allParentCategories)
Sets the list of parent categories
|
void |
setAllProducts(List<Product> allProducts)
Set all the
Product instances associated with this
category. |
void |
setCategoryAttributes(List<CategoryAttribute> categoryAttributes)
Sets the attributes for this
Category. |
void |
setCategoryImages(Map<String,String> categoryImages)
Deprecated.
replaced by
setCategoryMedia(java.util.Map) |
void |
setCategoryMedia(Map<String,Media> categoryMedia)
Sets the category media.
|
void |
setChildCategories(List<Category> childCategories)
Sets the all child categories.
|
void |
setChildCategoryURLMap(Map<String,List<Long>> childCategoryURLMap)
Included to support the
HydratedCacheJPAListener |
void |
setCrossSaleProducts(List<RelatedProduct> crossSaleProducts)
Sets the cross sale products that are related to this category.
|
void |
setDefaultParentCategory(Category defaultParentCategory)
Sets the default parent category.
|
void |
setDescription(String description)
Sets the description.
|
void |
setDisplayTemplate(String displayTemplate)
Sets the display template.
|
void |
setExcludedSearchFacets(List<SearchFacet> excludedSearchFacets)
Sets the SearchFacets that should not be rendered by this Category.
|
void |
setFeaturedProducts(List<FeaturedProduct> featuredProducts)
Sets the featured products.
|
void |
setFulfillmentType(FulfillmentType fulfillmentType)
Sets the default fulfillment type for skus in this category.
|
void |
setId(Long id)
Sets the primary key.
|
void |
setInventoryType(InventoryType inventoryType)
Sets the type of inventory for this category
|
void |
setLongDescription(String longDescription)
Sets the long description.
|
void |
setName(String name)
Sets the name.
|
void |
setSearchFacets(List<CategorySearchFacet> searchFacets)
Sets the SearchFacets that are directly associated with this Category
|
void |
setUpSaleProducts(List<RelatedProduct> upSaleProducts)
Sets the upsale products that are related to this category.
|
void |
setUrl(String url)
Sets the url.
|
void |
setUrlKey(String urlKey)
Sets the url key.
|
@Nullable Category getDefaultParentCategory()
void setDefaultParentCategory(@Nullable Category defaultParentCategory)
defaultParentCategory - the new default parent category@Nonnull List<Category> getAllParentCategories()
void setAllParentCategories(@Nonnull List<Category> allParentCategories)
allParentCategories - the list of parent categories@Nullable String getUrl()
"redirect:"+currentCategory.getUrl();
from a controller.void setUrl(@Nullable String url)
"redirect:"+currentCategory.getUrl();
from a controller.url - the new url for the presentation layer component for this category@Nullable String getUrlKey()
@Nullable String getGeneratedUrl()
void setUrlKey(@Nullable String urlKey)
urlKey - the new url key for this category to appear in the SEO urlvoid setDescription(@Nullable String description)
description - the new description@Nullable Date getActiveStartDate()
void setActiveStartDate(@Nullable Date activeStartDate)
activeStartDate - the new active start date@Nullable Date getActiveEndDate()
void setActiveEndDate(@Nullable Date activeEndDate)
activeEndDate - the new active end dateboolean isActive()
@Nullable String getDisplayTemplate()
view = categoryTemplatePrefix + currentCategory.getDisplayTemplate();void setDisplayTemplate(@Nullable String displayTemplate)
view = categoryTemplatePrefix + currentCategory.getDisplayTemplate();displayTemplate - the new display template@Nonnull Map<String,List<Long>> getChildCategoryURLMap()
getGeneratedUrl() values
for this category and all of its child categories. By calling get on this map using the
generated url for a given category, you will receive the list of immediate child categories.
This lifecycle for this map is maintained via the HydratedCacheJPAListener. This listener
keeps this map in a separate cache from the normal Hibernate level 2 cache, but will honor
cache region settings for this entity, resulting in this map being evicted from its cache
when this entity is removed from the Hibernate level 2 cache.HydratedSetupvoid setChildCategoryURLMap(@Nonnull Map<String,List<Long>> childCategoryURLMap)
HydratedCacheJPAListenerchildCategoryURLMap - HydratedSetup@Nonnull List<Category> getAllChildCategories()
boolean hasAllChildCategories()
void setAllChildCategories(@Nonnull List<Category> childCategories)
childCategories - the list of child categories@Nonnull List<Category> getChildCategories()
boolean hasChildCategories()
void setChildCategories(@Nonnull List<Category> childCategories)
childCategories - the list of active child categories.@Deprecated @Nonnull Map<String,String> getCategoryImages()
getCategoryMedia()@Deprecated @Nullable String getCategoryImage(@Nonnull String imageKey)
getCategoryMedia()imageKey - the image key@Deprecated void setCategoryImages(@Nonnull Map<String,String> categoryImages)
setCategoryMedia(java.util.Map)categoryImages - the category images@Nonnull Map<String,Media> getCategoryMedia()
Media instance stores information about the
media itself (image url, etc...)void setCategoryMedia(@Nonnull Map<String,Media> categoryMedia)
Media instance stores information about the
media itself (image url, etc...)categoryMedia - the category media@Nullable String getLongDescription()
void setLongDescription(@Nullable String longDescription)
longDescription - the new long description@Nonnull List<FeaturedProduct> getFeaturedProducts()
void setFeaturedProducts(@Nonnull List<FeaturedProduct> featuredProducts)
featuredProducts - the featured productsList<Product> getActiveProducts()
Category's Products filtered by
active. If you want all of the Products (whether inactive or not) consider using
getAllProducts().@Nonnull List<Product> getAllProducts()
Product instances associated with this
category.
Products are active or not. If
you need this functionality, use getActiveProducts()void setAllProducts(@Nonnull List<Product> allProducts)
Product instances associated with this
category.allProducts - the list of products to associate with this categoryList<RelatedProduct> getCrossSaleProducts()
void setCrossSaleProducts(List<RelatedProduct> crossSaleProducts)
crossSaleProducts - getCrossSaleProducts()List<RelatedProduct> getUpSaleProducts()
void setUpSaleProducts(List<RelatedProduct> upSaleProducts)
upSaleProducts - getUpSaleProducts()List<RelatedProduct> getCumulativeCrossSaleProducts()
List<RelatedProduct> getCumulativeUpSaleProducts()
List<FeaturedProduct> getCumulativeFeaturedProducts()
List<CategorySearchFacet> getSearchFacets()
void setSearchFacets(List<CategorySearchFacet> searchFacets)
searchFacets - void setExcludedSearchFacets(List<SearchFacet> excludedSearchFacets)
excludedSearchFacets - List<SearchFacet> getExcludedSearchFacets()
List<CategorySearchFacet> getCumulativeSearchFacets()
CategorySearchFacet#getPosition()
method for each category level. That is, the facets on this Category will be ordered by their position
relative to each other with the ordered parent facets after that, etc.List<Category> buildCategoryHierarchy(List<Category> currentHierarchy)
currentHierarchy - List<Category> buildFullCategoryHierarchy(List<Category> currentHierarchy)
currentHierarchy - List<CategoryAttribute> getCategoryAttributes()
Category. In smaller sites, using these attributes might be preferred to
extending the domain object itself.#getMappedCategoryAttributes()}void setCategoryAttributes(List<CategoryAttribute> categoryAttributes)
Category. In smaller sites, using these attributes might be preferred to
extending the domain object and creating a new table to store custom properties.CategoryAttribute getCategoryAttributeByName(String name)
CategoryAttribute by namename - #getCategoryAttributes()}, {@link #getMappedCategoryAttributes()}Map<String,CategoryAttribute> getMappedCategoryAttributes()
CategoryAttributes for the Category in an easily-consumable
formInventoryType getInventoryType()
InventoryType for this categoryvoid setInventoryType(InventoryType inventoryType)
inventoryType - the InventoryType for this categoryFulfillmentType getFulfillmentType()
void setFulfillmentType(FulfillmentType fulfillmentType)
fulfillmentType - Copyright © 2014. All Rights Reserved.