Class CategoryImpl

java.lang.Object
org.broadleafcommerce.core.catalog.domain.CategoryImpl
All Implemented Interfaces:
Serializable, AdminMainEntity, MultiTenantCloneable<Category>, Status, TemplatePathContainer, Locatable, Category, CategoryAdminPresentation

@Entity public class CategoryImpl extends Object implements Category, Status, AdminMainEntity, Locatable, TemplatePathContainer, CategoryAdminPresentation
Author:
bTaylor, Jeff Fischer
See Also:
  • Field Details

  • Constructor Details

    • CategoryImpl

      public CategoryImpl()
  • Method Details

    • getId

      public Long getId()
      Description copied from interface: Category
      Gets the primary key.
      Specified by:
      getId in interface Category
      Returns:
      the primary key
    • setId

      public void setId(Long id)
      Description copied from interface: Category
      Sets the primary key.
      Specified by:
      setId in interface Category
      Parameters:
      id - the new primary key
    • getName

      public String getName()
      Description copied from interface: Category
      Gets the name.
      Specified by:
      getName in interface Category
      Returns:
      the name
    • setName

      public void setName(String name)
      Description copied from interface: Category
      Sets the name.
      Specified by:
      setName in interface Category
      Parameters:
      name - the new name
    • getUrl

      public String getUrl()
      Description copied from interface: Category
      Gets the url. The url represents the presentation layer destination for this category. For example, if using Spring MVC, you could send the user to this destination by returning "redirect:"+currentCategory.getUrl(); from a controller.
      Specified by:
      getUrl in interface Category
      Returns:
      the url for the presentation layer component for this category
    • setUrl

      public void setUrl(String url)
      Description copied from interface: Category
      Sets the url. The url represents the presentation layer destination for this category. For example, if using Spring MVC, you could send the user to this destination by returning "redirect:"+currentCategory.getUrl(); from a controller.
      Specified by:
      setUrl in interface Category
      Parameters:
      url - the new url for the presentation layer component for this category
    • getOverrideGeneratedUrl

      public Boolean getOverrideGeneratedUrl()
      Specified by:
      getOverrideGeneratedUrl in interface Category
      Returns:
      the flag for whether or not the URL should not be generated in the admin
    • setOverrideGeneratedUrl

      public void setOverrideGeneratedUrl(Boolean overrideGeneratedUrl)
      Description copied from interface: Category
      Sets the flag for whether or not the URL should not be generated in the admin
      Specified by:
      setOverrideGeneratedUrl in interface Category
    • getUrlKey

      public String getUrlKey()
      Description copied from interface: Category
      Gets the url key. The url key is used as part of SEO url generation for this category. Each segment of the url leading to a category is comprised of the url keys of the various associated categories in a hierarchy leading to this one. If the url key is null, the the name for the category formatted with dashes for spaces.
      Specified by:
      getUrlKey in interface Category
      Returns:
      the url key for this category to appear in the SEO url
    • setUrlKey

      public void setUrlKey(String urlKey)
      Description copied from interface: Category
      Sets the url key. The url key is used as part of SEO url generation for this category. Each segment of the url leading to a category is comprised of the url keys of the various associated categories in a hierarchy leading to this one.
      Specified by:
      setUrlKey in interface Category
      Parameters:
      urlKey - the new url key for this category to appear in the SEO url
    • getGeneratedUrl

      public String getGeneratedUrl()
      Description copied from interface: Category
      Creates the SEO url starting from this category and recursing up the hierarchy of default parent categories until the topmost category is reached. The url key for each category is used for each segment of the SEO url.
      Specified by:
      getGeneratedUrl in interface Category
      Returns:
      the generated SEO url for this category
    • getDescription

      public String getDescription()
      Description copied from interface: Category
      Gets the description.
      Specified by:
      getDescription in interface Category
      Returns:
      the description
    • setDescription

      public void setDescription(String description)
      Description copied from interface: Category
      Sets the description.
      Specified by:
      setDescription in interface Category
      Parameters:
      description - the new description
    • getActiveStartDate

      public Date getActiveStartDate()
      Description copied from interface: Category
      Gets the active start date. If the current date is before activeStartDate, then this category will not be visible on the site.
      Specified by:
      getActiveStartDate in interface Category
      Returns:
      the active start date
    • setActiveStartDate

      public void setActiveStartDate(Date activeStartDate)
      Description copied from interface: Category
      Sets the active start date. If the current date is before activeStartDate, then this category will not be visible on the site.
      Specified by:
      setActiveStartDate in interface Category
      Parameters:
      activeStartDate - the new active start date
    • getActiveEndDate

      public Date getActiveEndDate()
      Description copied from interface: Category
      Gets the active end date. If the current date is after activeEndDate, the this category will not be visible on the site.
      Specified by:
      getActiveEndDate in interface Category
      Returns:
      the active end date
    • setActiveEndDate

      public void setActiveEndDate(Date activeEndDate)
      Description copied from interface: Category
      Sets the active end date. If the current date is after activeEndDate, the this category will not be visible on the site.
      Specified by:
      setActiveEndDate in interface Category
      Parameters:
      activeEndDate - the new active end date
    • isActive

      public boolean isActive()
      Description copied from interface: Category
      Checks if is active. Returns true if the startDate is null or if the current date is after the start date, or if the endDate is null or if the current date is before the endDate.
      Specified by:
      isActive in interface Category
      Specified by:
      isActive in interface Status
      Returns:
      true, if is active
    • getDisplayTemplate

      public String getDisplayTemplate()
      Description copied from interface: Category
      Gets the display template. The display template can be used to help create a unique key that drives the presentation layer destination for this category. For example, if using Spring MVC, you might derive the view destination in this way:

      view = categoryTemplatePrefix + currentCategory.getDisplayTemplate();

      Specified by:
      getDisplayTemplate in interface Category
      Specified by:
      getDisplayTemplate in interface TemplatePathContainer
      Returns:
      the display template
    • setDisplayTemplate

      public void setDisplayTemplate(String displayTemplate)
      Description copied from interface: Category
      Sets the display template. The display template can be used to help create a unique key that drives the presentation layer destination for this category. For example, if using Spring MVC, you might derive the view destination in this way:

      view = categoryTemplatePrefix + currentCategory.getDisplayTemplate();

      Specified by:
      setDisplayTemplate in interface Category
      Parameters:
      displayTemplate - the new display template
    • getLongDescription

      public String getLongDescription()
      Description copied from interface: Category
      Gets the long description.
      Specified by:
      getLongDescription in interface Category
      Returns:
      the long description
    • setLongDescription

      public void setLongDescription(String longDescription)
      Description copied from interface: Category
      Sets the long description.
      Specified by:
      setLongDescription in interface Category
      Parameters:
      longDescription - the new long description
    • getMetaTitle

      public String getMetaTitle()
      Description copied from interface: Category
      Gets the meta data title of the category
      Specified by:
      getMetaTitle in interface Category
      Returns:
    • setMetaTitle

      public void setMetaTitle(String metaTitle)
      Description copied from interface: Category
      Sets the meta data title of the category
      Specified by:
      setMetaTitle in interface Category
    • getMetaDescription

      public String getMetaDescription()
      Description copied from interface: Category
      Gets the meta data description of the category
      Specified by:
      getMetaDescription in interface Category
      Returns:
    • setMetaDescription

      public void setMetaDescription(String metaDescription)
      Description copied from interface: Category
      Sets the meta data description of the category
      Specified by:
      setMetaDescription in interface Category
    • getProductTitlePatternOverride

      public String getProductTitlePatternOverride()
      Specified by:
      getProductTitlePatternOverride in interface Category
    • setProductTitlePatternOverride

      public void setProductTitlePatternOverride(String productTitlePatternOverride)
      Specified by:
      setProductTitlePatternOverride in interface Category
    • getProductDescriptionPatternOverride

      public String getProductDescriptionPatternOverride()
      Specified by:
      getProductDescriptionPatternOverride in interface Category
    • setProductDescriptionPatternOverride

      public void setProductDescriptionPatternOverride(String productDescriptionPatternOverride)
      Specified by:
      setProductDescriptionPatternOverride in interface Category
    • getDefaultParentCategory

      @Deprecated public Category getDefaultParentCategory()
      Deprecated.
      Description copied from interface: Category
      Gets the default parent category. This method will delegate to Category.getParentCategory() by default, unless the "use.legacy.default.category.mode" property is set to true in the implementation's property file. If set to true, this method will use legacy behavior, which is to return the deprecated defaultParentCategory field.
      Specified by:
      getDefaultParentCategory in interface Category
      Returns:
      the default parent category
    • setDefaultParentCategory

      @Deprecated public void setDefaultParentCategory(Category defaultParentCategory)
      Deprecated.
      Description copied from interface: Category
      Sets the default parent category. This method will delegate to Category.setParentCategory(Category) by default, unless the "use.legacy.default.category.mode" property is set to true in the implementation's property file. If set to true, this method will use legacy behavior, which is to set the deprecated defaultParentCategory field.
      Specified by:
      setDefaultParentCategory in interface Category
      Parameters:
      defaultParentCategory - the new default parent category
    • getParentCategory

      public Category getParentCategory()
      Description copied from interface: Category
      Return the category that is the parent of this category - if applicable
      Specified by:
      getParentCategory in interface Category
      Returns:
    • setParentCategory

      public void setParentCategory(Category category)
      Description copied from interface: Category
      Set the parent category of this category
      Specified by:
      setParentCategory in interface Category
    • getParentCategoryXref

      public CategoryXref getParentCategoryXref()
      Description copied from interface: Category
      Return the parent category xref of the default parent or first applicable parent
      Specified by:
      getParentCategoryXref in interface Category
      Returns:
    • getAllChildCategoryXrefs

      public List<CategoryXref> getAllChildCategoryXrefs()
      Specified by:
      getAllChildCategoryXrefs in interface Category
    • setAllChildCategoryXrefs

      public void setAllChildCategoryXrefs(List<CategoryXref> childCategories)
      Specified by:
      setAllChildCategoryXrefs in interface Category
    • getChildCategoryXrefs

      public List<CategoryXref> getChildCategoryXrefs()
      Specified by:
      getChildCategoryXrefs in interface Category
    • setChildCategoryXrefs

      public void setChildCategoryXrefs(List<CategoryXref> childCategories)
      Specified by:
      setChildCategoryXrefs in interface Category
    • getAllChildCategories

      @Deprecated public List<Category> getAllChildCategories()
      Deprecated.
      Description copied from interface: Category
      Gets the child categories. This list includes all categories, regardless of whether or not they are active.
      Specified by:
      getAllChildCategories in interface Category
      Returns:
      the list of active and inactive child categories.
    • setAllChildCategories

      @Deprecated public void setAllChildCategories(List<Category> childCategories)
      Deprecated.
      Description copied from interface: Category
      Sets the list of child categories (active and inactive)
      Specified by:
      setAllChildCategories in interface Category
      Parameters:
      childCategories - the list of child categories
    • hasAllChildCategories

      public boolean hasAllChildCategories()
      Description copied from interface: Category
      Checks for child categories.
      Specified by:
      hasAllChildCategories in interface Category
      Returns:
      true, if this category has any children (active or not)
    • getChildCategories

      @Deprecated public List<Category> getChildCategories()
      Deprecated.
      Description copied from interface: Category
      Gets the child categories. If child categories has not been previously set, then the list of active only categories will be returned.
      Specified by:
      getChildCategories in interface Category
      Returns:
      the list of active child categories
    • setChildCategories

      @Deprecated public void setChildCategories(List<Category> childCategories)
      Deprecated.
      Description copied from interface: Category
      Sets the all child categories. This should be a list of active only child categories.
      Specified by:
      setChildCategories in interface Category
      Parameters:
      childCategories - the list of active child categories.
    • hasChildCategories

      public boolean hasChildCategories()
      Description copied from interface: Category
      Checks for child categories.
      Specified by:
      hasChildCategories in interface Category
      Returns:
      true, if this category contains any active child categories.
    • getChildCategoryIds

      public List<Long> getChildCategoryIds()
      Description copied from interface: Category
      Gets the child category ids. If child categories has not been previously set, then the list of active only categories will be returned. This method is optimized with Hydrated cache, which means that the algorithm required to harvest active child categories will not need to be rebuilt as long as the parent category (this category) is not evicted from second level cache.
      Specified by:
      getChildCategoryIds in interface Category
      Returns:
      the list of active child category ids
    • setChildCategoryIds

      public void setChildCategoryIds(List<Long> childCategoryIds)
      Description copied from interface: Category
      Sets the all child category ids. This should be a list of active only child categories.
      Specified by:
      setChildCategoryIds in interface Category
      Parameters:
      childCategoryIds - the list of active child category ids.
    • createChildCategoryIds

      public List<Long> createChildCategoryIds()
    • getChildCategoryURLMap

      @Deprecated public Map<String,List<Long>> getChildCategoryURLMap()
      Deprecated.
      Description copied from interface: Category
      Gets the child category url map. This map is keyed off of the Category.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.
      Specified by:
      getChildCategoryURLMap in interface Category
      Returns:
      the child category url map
    • setChildCategoryURLMap

      @Deprecated public void setChildCategoryURLMap(Map<String,List<Long>> childCategoryURLMap)
      Deprecated.
      Description copied from interface: Category
      Set the child category url map. This approach is inefficient, so its use is highly discouraged.
      Specified by:
      setChildCategoryURLMap in interface Category
    • createChildCategoryURLMap

      public Map<String,List<Long>> createChildCategoryURLMap()
    • getParentCategoryHierarchy

      public List<Category> getParentCategoryHierarchy(List<Category> currentPath)
      Description copied from interface: Category
      Build the full category hierarchy by walking up the default category tree and the all parent category tree.
      Specified by:
      getParentCategoryHierarchy in interface Category
      Returns:
      the full hierarchy
    • getParentCategoryHierarchy

      public List<Category> getParentCategoryHierarchy(List<Category> currentPath, Boolean firstParent)
      Description copied from interface: Category
      Build the full category hierarchy by walking up the default category tree and the all parent category tree. Adds the option of only adding the first parent found.
      Specified by:
      getParentCategoryHierarchy in interface Category
      firstParent - determines if ONLY the first parent category should be returned per hierarchy tier
      Returns:
      the full hierarchy
    • buildDefaultParentCategoryPath

      public List<Category> buildDefaultParentCategoryPath(List<Category> currentPath)
      Description copied from interface: Category
      Build category hierarchy by walking the default category tree up to the root category. If the passed in tree is null then create the initial list.
      Specified by:
      buildDefaultParentCategoryPath in interface Category
      Returns:
    • getAllParentCategoryXrefs

      public List<CategoryXref> getAllParentCategoryXrefs()
      Description copied from interface: Category
      Retrieve all the xref entities linking this category to parent categories
      Specified by:
      getAllParentCategoryXrefs in interface Category
    • setAllParentCategoryXrefs

      public void setAllParentCategoryXrefs(List<CategoryXref> allParentCategories)
      Description copied from interface: Category
      Set all the xref entities linking this product to parent categories
      Specified by:
      setAllParentCategoryXrefs in interface Category
    • getAllParentCategories

      @Deprecated public List<Category> getAllParentCategories()
      Deprecated.
      Description copied from interface: Category
      Retrieve all parent categories
      Specified by:
      getAllParentCategories in interface Category
      Returns:
      the list of parent categories
    • setAllParentCategories

      @Deprecated public void setAllParentCategories(List<Category> allParentCategories)
      Deprecated.
      Description copied from interface: Category
      Sets the list of parent categories
      Specified by:
      setAllParentCategories in interface Category
      Parameters:
      allParentCategories - the list of parent categories
    • getRootDisplayOrder

      public BigDecimal getRootDisplayOrder()
      Description copied from interface: Category
      Retrieve the displayOrder that is used if the Category does not have any parents
      Specified by:
      getRootDisplayOrder in interface Category
    • setRootDisplayOrder

      public void setRootDisplayOrder(BigDecimal rootDisplayOrder)
      Description copied from interface: Category
      Set the displayOrder that is used if the Category does not have any parents
      Specified by:
      setRootDisplayOrder in interface Category
    • getFeaturedProducts

      public List<FeaturedProduct> getFeaturedProducts()
      Description copied from interface: Category
      Gets the featured products. Featured products are a special list of products you would like to showcase for this category.
      Specified by:
      getFeaturedProducts in interface Category
      Returns:
      the featured products
    • setFeaturedProducts

      public void setFeaturedProducts(List<FeaturedProduct> featuredProducts)
      Description copied from interface: Category
      Sets the featured products. Featured products are a special list of products you would like to showcase for this category.
      Specified by:
      setFeaturedProducts in interface Category
      Parameters:
      featuredProducts - the featured products
    • getCrossSaleProducts

      public List<RelatedProduct> getCrossSaleProducts()
      Description copied from interface: Category
      Returns a list of cross sale products that are related to this category.
      Specified by:
      getCrossSaleProducts in interface Category
      Returns:
      a list of cross sale products
    • setCrossSaleProducts

      public void setCrossSaleProducts(List<RelatedProduct> crossSaleProducts)
      Description copied from interface: Category
      Sets the cross sale products that are related to this category.
      Specified by:
      setCrossSaleProducts in interface Category
      See Also:
    • getUpSaleProducts

      public List<RelatedProduct> getUpSaleProducts()
      Description copied from interface: Category
      Returns a list of cross sale products that are related to this category.
      Specified by:
      getUpSaleProducts in interface Category
      Returns:
      a list of cross sale products
    • setUpSaleProducts

      public void setUpSaleProducts(List<RelatedProduct> upSaleProducts)
      Description copied from interface: Category
      Sets the upsale products that are related to this category.
      Specified by:
      setUpSaleProducts in interface Category
      See Also:
    • getCumulativeCrossSaleProducts

      public List<RelatedProduct> getCumulativeCrossSaleProducts()
      Description copied from interface: Category
      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.
      Specified by:
      getCumulativeCrossSaleProducts in interface Category
      Returns:
      the cumulative cross sale products
    • getCumulativeUpSaleProducts

      public List<RelatedProduct> getCumulativeUpSaleProducts()
      Description copied from interface: Category
      Returns a list of the upsale products in this category as well as all upsale products in all parent categories of this category.
      Specified by:
      getCumulativeUpSaleProducts in interface Category
      Returns:
      the cumulative upsale products
    • getCumulativeFeaturedProducts

      public List<FeaturedProduct> getCumulativeFeaturedProducts()
      Description copied from interface: Category
      Returns a list of the featured products in this category as well as all featured products in all parent categories of this category.
      Specified by:
      getCumulativeFeaturedProducts in interface Category
      Returns:
      the cumulative featured products
    • getActiveProductXrefs

      public List<CategoryProductXref> getActiveProductXrefs()
      Specified by:
      getActiveProductXrefs in interface Category
    • getAllProductXrefs

      public List<CategoryProductXref> getAllProductXrefs()
      Specified by:
      getAllProductXrefs in interface Category
    • setAllProductXrefs

      public void setAllProductXrefs(List<CategoryProductXref> allProducts)
      Specified by:
      setAllProductXrefs in interface Category
    • getActiveProducts

      @Deprecated public List<Product> getActiveProducts()
      Deprecated.
      Description copied from interface: Category
      Convenience method to retrieve all of this Category's Products filtered by active. If you want all of the Products (whether inactive or not) consider using Category.getAllProducts().
      Specified by:
      getActiveProducts in interface Category
      Returns:
      the list of active Products for this Category
    • getAllProducts

      @Deprecated public List<Product> getAllProducts()
      Deprecated.
      Description copied from interface: Category
      Retrieve all the Product instances associated with this category.
      Note: this method does not take into account whether or not the Products are active or not. If you need this functionality, use Category.getActiveProducts()
      Specified by:
      getAllProducts in interface Category
      Returns:
      the list of products associated with this category.
    • setAllProducts

      @Deprecated public void setAllProducts(List<Product> allProducts)
      Deprecated.
      Description copied from interface: Category
      Set all the Product instances associated with this category.
      Specified by:
      setAllProducts in interface Category
      Parameters:
      allProducts - the list of products to associate with this category
    • getSearchFacets

      public List<CategorySearchFacet> getSearchFacets()
      Description copied from interface: Category
      Returns all of the SearchFacets that are directly associated with this Category
      Specified by:
      getSearchFacets in interface Category
      Returns:
      related SearchFacets
    • setSearchFacets

      public void setSearchFacets(List<CategorySearchFacet> searchFacets)
      Description copied from interface: Category
      Sets the SearchFacets that are directly associated with this Category
      Specified by:
      setSearchFacets in interface Category
    • getExcludedSearchFacets

      public List<CategoryExcludedSearchFacet> getExcludedSearchFacets()
      Description copied from interface: Category
      Gets the excluded SearchFacets
      Specified by:
      getExcludedSearchFacets in interface Category
      Returns:
      the excluded SearchFacets
    • setExcludedSearchFacets

      public void setExcludedSearchFacets(List<CategoryExcludedSearchFacet> excludedSearchFacets)
      Description copied from interface: Category
      Sets the SearchFacets that should not be rendered by this Category. Typically, this will include facets from parent categories that do not apply to this category.
      Specified by:
      setExcludedSearchFacets in interface Category
    • getInventoryType

      public InventoryType getInventoryType()
      Description copied from interface: Category
      Used to determine availability for all of the products/skus in this category
      Specified by:
      getInventoryType in interface Category
      Returns:
      the InventoryType for this category
    • setInventoryType

      public void setInventoryType(InventoryType inventoryType)
      Description copied from interface: Category
      Sets the type of inventory for this category
      Specified by:
      setInventoryType in interface Category
      Parameters:
      inventoryType - the InventoryType for this category
    • getFulfillmentType

      public FulfillmentType getFulfillmentType()
      Description copied from interface: Category
      Returns the default fulfillment type for skus in this category. May be null.
      Specified by:
      getFulfillmentType in interface Category
      Returns:
    • setFulfillmentType

      public void setFulfillmentType(FulfillmentType fulfillmentType)
      Description copied from interface: Category
      Sets the default fulfillment type for skus in this category. May return null.
      Specified by:
      setFulfillmentType in interface Category
    • getParentFacets

      protected List<CategorySearchFacet> getParentFacets(Collection<SearchFacet> facets)
    • getCumulativeSearchFacets

      public List<CategorySearchFacet> getCumulativeSearchFacets()
      Description copied from interface: Category
      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. This method will order the resulting list based on the 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.
      Specified by:
      getCumulativeSearchFacets in interface Category
      Returns:
      the current active search facets for this category and all parent categories
    • getCumulativeSearchFacets

      public List<CategorySearchFacet> getCumulativeSearchFacets(Set<Category> categoryHierarchy)
      Description copied from interface: Category
      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. This method will order the resulting list based on the 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.

      Takes a Set of the categories that have been traversed in order to protect from circular dependencies.

      Specified by:
      getCumulativeSearchFacets in interface Category
      Returns:
      the current active search facets for this category and all parent categories *
    • getCategoryMedia

      @Deprecated public Map<String,Media> getCategoryMedia()
      Deprecated.
      Description copied from interface: Category
      Gets the category media map. The key is of arbitrary meaning and the Media instance stores information about the media itself (image url, etc...)
      Specified by:
      getCategoryMedia in interface Category
      Returns:
      the category Media
    • setCategoryMedia

      @Deprecated public void setCategoryMedia(Map<String,Media> categoryMedia)
      Deprecated.
      Description copied from interface: Category
      Sets the category media. The key is of arbitrary meaning and the Media instance stores information about the media itself (image url, etc...)
      Specified by:
      setCategoryMedia in interface Category
      Parameters:
      categoryMedia - the category media
    • getCategoryMediaXref

      public Map<String,CategoryMediaXref> getCategoryMediaXref()
      Description copied from interface: Category
      Gets the category media map. The key is of arbitrary meaning and the Media instance stores information about the media itself (image url, etc...)
      Specified by:
      getCategoryMediaXref in interface Category
      Returns:
      the category Media
    • setCategoryMediaXref

      public void setCategoryMediaXref(Map<String,CategoryMediaXref> categoryMediaXref)
      Description copied from interface: Category
      Sets the category media. The key is of arbitrary meaning and the Media instance stores information about the media itself (image url, etc...)
      Specified by:
      setCategoryMediaXref in interface Category
      Parameters:
      categoryMediaXref - the category media
    • getCategoryAttributesMap

      public Map<String,CategoryAttribute> getCategoryAttributesMap()
      Description copied from interface: Category
      Gets the attributes for this Category. In smaller sites, using these attributes might be preferred to extending the domain object itself.
      Specified by:
      getCategoryAttributesMap in interface Category
      Returns:
    • setCategoryAttributesMap

      public void setCategoryAttributesMap(Map<String,CategoryAttribute> categoryAttributes)
      Specified by:
      setCategoryAttributesMap in interface Category
    • getCategoryAttributes

      public List<CategoryAttribute> getCategoryAttributes()
      Description copied from interface: Category
      Gets the attributes for this Category. In smaller sites, using these attributes might be preferred to extending the domain object itself.
      Specified by:
      getCategoryAttributes in interface Category
      Returns:
    • setCategoryAttributes

      public void setCategoryAttributes(List<CategoryAttribute> categoryAttributes)
      Description copied from interface: Category
      Sets the attributes for this Category. In smaller sites, using these attributes might be preferred to extending the domain object and creating a new table to store custom properties.
      Specified by:
      setCategoryAttributes in interface Category
    • getCategoryAttributeByName

      public CategoryAttribute getCategoryAttributeByName(String name)
      Description copied from interface: Category
      Convenience method to get a CategoryAttribute by name
      Specified by:
      getCategoryAttributeByName in interface Category
      Returns:
    • getMappedCategoryAttributes

      public Map<String,CategoryAttribute> getMappedCategoryAttributes()
      Description copied from interface: Category
      Convenience method to return the CategoryAttributes for the Category in an easily-consumable form
      Specified by:
      getMappedCategoryAttributes in interface Category
      Returns:
    • getMultiValueCategoryAttributes

      public Map<String,CategoryAttribute> getMultiValueCategoryAttributes()
      Specified by:
      getMultiValueCategoryAttributes in interface Category
    • getArchived

      public Character getArchived()
      Specified by:
      getArchived in interface Status
    • setArchived

      public void setArchived(Character archived)
      Specified by:
      setArchived in interface Status
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • createOrRetrieveCopyInstance

      public <G extends Category> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException
      Specified by:
      createOrRetrieveCopyInstance in interface MultiTenantCloneable<Category>
      Throws:
      CloneNotSupportedException
    • getMainEntityName

      public String getMainEntityName()
      Specified by:
      getMainEntityName in interface AdminMainEntity
    • getTaxCode

      public String getTaxCode()
      Description copied from interface: Category
      Returns the tax code of this category.
      Specified by:
      getTaxCode in interface Category
      Returns:
      taxCode
    • setTaxCode

      public void setTaxCode(String taxCode)
      Description copied from interface: Category
      Sets the tax code of this category.
      Specified by:
      setTaxCode in interface Category
    • getLocation

      public String getLocation()
      Specified by:
      getLocation in interface Locatable
    • getExternalId

      public String getExternalId()
      Description copied from interface: Category
      Intended to hold any unique identifier not tied to the Broadleaf Database Sequence Identifier. For example, many implementations may integrate or import/export data from other systems that manage their own unique identifiers.
      Specified by:
      getExternalId in interface Category
      Returns:
      external ID
    • setExternalId

      public void setExternalId(String externalId)
      Description copied from interface: Category
      Sets a unique external ID
      Specified by:
      setExternalId in interface Category