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()
Deprecated.
Use getActiveProductXrefs() instead.
|
List<CategoryProductXref> |
getActiveProductXrefs() |
Date |
getActiveStartDate()
Gets the active start date.
|
List<Category> |
getAllChildCategories()
Deprecated.
use getAllChildCategoryXrefs() instead.
|
List<CategoryXref> |
getAllChildCategoryXrefs() |
List<Category> |
getAllParentCategories()
Deprecated.
Use getAllParentCategoryXrefs() instead.
|
List<CategoryXref> |
getAllParentCategoryXrefs() |
List<Product> |
getAllProducts()
Deprecated.
Use getAllProductXrefs() instead.
|
List<CategoryProductXref> |
getAllProductXrefs() |
CategoryAttribute |
getCategoryAttributeByName(String name)
Deprecated.
This will be removed in 3.1.0
|
List<CategoryAttribute> |
getCategoryAttributes()
Deprecated.
This will be replaced with
getCategoryAttributesMap() in 3.1.0. |
Map<String,CategoryAttribute> |
getCategoryAttributesMap()
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()
Deprecated.
Use getChildCategoryXrefs() instead.
|
List<Long> |
getChildCategoryIds()
Gets the child category ids.
|
Map<String,List<Long>> |
getChildCategoryURLMap()
Deprecated.
This approach is inherently inefficient and should no longer be used
|
List<CategoryXref> |
getChildCategoryXrefs() |
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()
Used to determine availability for all of the products/skus in this category
|
String |
getLongDescription()
Gets the long description.
|
Map<String,CategoryAttribute> |
getMappedCategoryAttributes()
Deprecated.
This will be removed in 3.1.0
|
String |
getName()
Gets the name.
|
List<CategorySearchFacet> |
getSearchFacets()
Returns all of the SearchFacets that are directly associated with this Category
|
String |
getTaxCode()
Returns the tax code of 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)
Deprecated.
Use setAllChildCategoryXrefs() instead.
|
void |
setAllChildCategoryXrefs(List<CategoryXref> childCategories) |
void |
setAllParentCategories(List<Category> allParentCategories)
Deprecated.
Use setAllParentCategoryXrefs() instead.
|
void |
setAllParentCategoryXrefs(List<CategoryXref> allParentCategories) |
void |
setAllProducts(List<Product> allProducts)
Deprecated.
Use setAllProductXrefs() instead.
|
void |
setAllProductXrefs(List<CategoryProductXref> allProducts) |
void |
setCategoryAttributes(List<CategoryAttribute> categoryAttributes)
Deprecated.
This will be replaced with
#setCategoryAttributesMap() in 3.1.0. |
void |
setCategoryAttributesMap(Map<String,CategoryAttribute> categoryAttributes) |
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)
Deprecated.
Use setChildCategoryXrefs() instead.
|
void |
setChildCategoryIds(List<Long> childCategoryIds)
Sets the all child category ids.
|
void |
setChildCategoryURLMap(Map<String,List<Long>> childCategoryURLMap)
Deprecated.
This approach is inherently inefficient and should no longer be used
|
void |
setChildCategoryXrefs(List<CategoryXref> childCategories) |
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 |
setTaxCode(String taxCode)
Sets the tax code of 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@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@Deprecated @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 is inefficient, so its use is highly discouraged.@Deprecated void setChildCategoryURLMap(@Nonnull Map<String,List<Long>> childCategoryURLMap)
childCategoryURLMap - @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<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 - Map<String,CategoryAttribute> getCategoryAttributesMap()
Category. In smaller sites, using these attributes might be preferred to
extending the domain object itself.#getMappedCategoryAttributes()}void setCategoryAttributesMap(Map<String,CategoryAttribute> categoryAttributes)
@Deprecated List<CategoryAttribute> getCategoryAttributes()
getCategoryAttributesMap() in 3.1.0.Category. In smaller sites, using these attributes might be preferred to
extending the domain object itself.#getMappedCategoryAttributes()}@Deprecated void setCategoryAttributes(List<CategoryAttribute> categoryAttributes)
#setCategoryAttributesMap() in 3.1.0.Category. In smaller sites, using these attributes might be preferred to
extending the domain object and creating a new table to store custom properties.@Deprecated CategoryAttribute getCategoryAttributeByName(String name)
CategoryAttribute by namename - #getCategoryAttributes()}, {@link #getMappedCategoryAttributes()}@Deprecated 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 - @Nonnull @Deprecated List<Category> getAllChildCategories()
boolean hasAllChildCategories()
@Deprecated void setAllChildCategories(@Nonnull List<Category> childCategories)
childCategories - the list of child categories@Deprecated @Nonnull List<Category> getChildCategories()
@Nonnull List<Long> getChildCategoryIds()
void setChildCategoryIds(@Nonnull List<Long> childCategoryIds)
childCategoryIds - the list of active child category ids.boolean hasChildCategories()
@Deprecated void setChildCategories(@Nonnull List<Category> childCategories)
childCategories - the list of active child categories.List<CategoryXref> getAllChildCategoryXrefs()
List<CategoryXref> getChildCategoryXrefs()
void setChildCategoryXrefs(List<CategoryXref> childCategories)
void setAllChildCategoryXrefs(List<CategoryXref> childCategories)
List<CategoryXref> getAllParentCategoryXrefs()
void setAllParentCategoryXrefs(List<CategoryXref> allParentCategories)
@Deprecated @Nonnull List<Category> getAllParentCategories()
@Deprecated void setAllParentCategories(@Nonnull List<Category> allParentCategories)
allParentCategories - the list of parent categoriesList<CategoryProductXref> getActiveProductXrefs()
List<CategoryProductXref> getAllProductXrefs()
void setAllProductXrefs(List<CategoryProductXref> allProducts)
@Deprecated List<Product> getActiveProducts()
Category's Products filtered by
active. If you want all of the Products (whether inactive or not) consider using
getAllProducts().@Deprecated @Nonnull List<Product> getAllProducts()
Product instances associated with this
category.
Products are active or not. If
you need this functionality, use getActiveProducts()@Deprecated void setAllProducts(@Nonnull List<Product> allProducts)
Product instances associated with this
category.allProducts - the list of products to associate with this categoryString getTaxCode()
void setTaxCode(String taxCode)
taxCode - Copyright © 2015. All Rights Reserved.