Class CategoryManager

java.lang.Object
de.hybris.platform.category.jalo.CategoryManager

public class CategoryManager extends Object
This is the extension manager of the category extension.
  • Constructor Details

    • CategoryManager

      public CategoryManager()
  • Method Details

    • getInstance

      public static CategoryManager getInstance()
      Returns:
      instance of this manager
    • createCategory

      public Category createCategory(String code)
      Creates a new Category with the given code. This new category will not be a root category.
      Parameters:
      code - code for the new category
      Returns:
      the newly created category
    • createCategory

      @Deprecated(since="ages", forRemoval=false) public Category createCategory(String code, boolean root)
      Deprecated.
      since ages - the root flag is calculated dynamically now
      Creates a new Category with the given code.
      Parameters:
      code - code for the new category
      root - not used any more
      Returns:
      the newly created category
    • getAllRootCategories

      public Collection<Category> getAllRootCategories()
      Returns all root categories.
      Returns:
      all root categories
    • getCategoriesByCode

      public Collection<Category> getCategoriesByCode(String code)
      Searches for categories with the given code.
      Parameters:
      code - categories with this code will be found; you can use SQL wildcards in the code ('%')
      Returns:
      found categories
    • getCategoryByCode

      @Deprecated(since="ages", forRemoval=false) public Category getCategoryByCode(String code)
      Deprecated.
      since ages - please use getCategoriesByCode instead as the value of code depends on the session context
      Searches for category with the given code. Warning: If one or more categories with that code are found, one of them will be returned randomly, otherwise this method returns null.
      Parameters:
      code - code of the category to be found
      Returns:
      one of found categories or null if no categories found
    • getCategoriesByProduct

      public Collection<Category> getCategoriesByProduct(Product product)
      Returns all categories the given product is in.
      Returns:
      all categories the given product is in
    • getCategoriesByProduct

      public Collection<Category> getCategoriesByProduct(Product product, SessionContext ctx)
      Returns all categories the given product is in. The same as getSupercategories(SessionContext, Product)
      Returns:
      all categories the given product is in
    • isCreatorDisabled

      @Deprecated(since="ages", forRemoval=false) public boolean isCreatorDisabled()
      Deprecated.
      since ages
      Part of DataCreator interface. Returns false
      Returns:
      false
    • createEssentialData

      @Deprecated(since="ages", forRemoval=false) public void createEssentialData(Map params, JspContext jspc) throws Exception
      Deprecated.
      since ages
      Creates a saved query for finding all root categories.
      Throws:
      Exception
      Since:
      1.31
    • getSupercategories

      public Collection<Category> getSupercategories(Product item)
    • getSupercategories

      public Collection<Category> getSupercategories(SessionContext ctx, Product item)
    • createCategory

      public Category createCategory(SessionContext ctx, Map attributeValues)
      Generated methods from old GenGeneratedCategoryManager starts
    • createCategory

      public Category createCategory(Map attributeValues)
    • getSupercategoriesCount

      public long getSupercategoriesCount(SessionContext ctx, Product item)
    • getSupercategoriesCount

      public long getSupercategoriesCount(Product item)
    • setSupercategories

      public void setSupercategories(SessionContext ctx, Product item, Collection<Category> value)
    • setSupercategories

      public void setSupercategories(Product item, Collection<Category> value)
    • addToSupercategories

      public void addToSupercategories(SessionContext ctx, Product item, Category value)
    • addToSupercategories

      public void addToSupercategories(Product item, Category value)
    • removeFromSupercategories

      public void removeFromSupercategories(SessionContext ctx, Product item, Category value)
    • removeFromSupercategories

      public void removeFromSupercategories(Product item, Category value)
    • getSupercategories

      public Collection<Category> getSupercategories(SessionContext ctx, Media item)
    • getSupercategories

      public Collection<Category> getSupercategories(Media item)
    • getSupercategoriesCount

      public long getSupercategoriesCount(SessionContext ctx, Media item)
    • getSupercategoriesCount

      public long getSupercategoriesCount(Media item)
    • setSupercategories

      public void setSupercategories(SessionContext ctx, Media item, Collection<Category> value)
    • setSupercategories

      public void setSupercategories(Media item, Collection<Category> value)
    • addToSupercategories

      public void addToSupercategories(SessionContext ctx, Media item, Category value)
    • addToSupercategories

      public void addToSupercategories(Media item, Category value)
    • removeFromSupercategories

      public void removeFromSupercategories(SessionContext ctx, Media item, Category value)
    • removeFromSupercategories

      public void removeFromSupercategories(Media item, Category value)