Skip navigation links
com.adobe.cq.commerce.api.classification

Interface ClassificationCategory

    • Method Detail

      • getTitle

        java.lang.String getTitle()
        Returns the title of the category.
        Returns:
        title of the category.
      • getDescription

        java.lang.String getDescription()
        Returns the description of the category.
        Returns:
        description of the category.
      • getPath

        java.lang.String getPath()
        Returns the path of the category if represented in the repository. Otherwise, it returns an ID uniquely identifying the category to the external commerce engine.
        Returns:
        path/ID of the category.
      • getClassification

        Classification getClassification()
        Returns the classification which this category belongs to.
        Returns:
        classification which this category belongs to.
      • isRootCategory

        boolean isRootCategory()
        Returns true if the category is the root category of the classification.
        Returns:
        true if the category is the root category of the classification. false otherwise
      • getDirectAttributes

        java.util.List<ClassificationAttribute> getDirectAttributes()
        Returns an ordered list of attributes that are directly defined for this category. To get all the attributes (those defined directly for this category and those defined for the ancestor categories), use getAttributes()
        Returns:
        the list of direct attributes.
      • getAttributes

        java.util.List<ClassificationAttribute> getAttributes()
        Returns an ordered list of all the attributes by taking the direct attributes of this category and those defined for the ancestor categories. The list is ordered as follows: first the direct attributes, then the attributes from the parent category, and so on.
        Returns:
        the list of inherited attributes.
      • getAttribute

        ClassificationAttribute getAttribute(java.lang.String name)
        Returns the classification attribute defined by the given name.
        Parameters:
        name - The attribute name
        Returns:
        The ClassificationAttribute or null if it does not exist
      • getParentCategory

        ClassificationCategory getParentCategory()
        Returns the parent category.
        Returns:
        the parent category.
      • getSubCategories

        java.util.List<ClassificationCategory> getSubCategories()
        Returns the sub categories.
        Returns:
        the sub categories.
      • getSubCategory

        ClassificationCategory getSubCategory(java.lang.String name)
        Returns the classification category defined by the given name.
        Parameters:
        name - The category name
        Returns:
        The ClassificationCategory or null if it does not exist
      • getDirectProducts

        java.lang.Iterable<Product> getDirectProducts()
        Returns an iterable of products that are directly assigned to this category.
        Returns:
        iterable of the directly assigned products.
      • getProducts

        java.lang.Iterable<Product> getProducts()
        Returns an iterable of the products belonging to this category. If products are directly assigned to this category, an iterable of those products is returned. Otherwise, this method is applied to all the sub categories and an iterable of the generated list is returned.
        Returns:
        iterable of the belonging products.
      • hasDirectProduct

        boolean hasDirectProduct(Product product)
        Returns true if the product is directly assigned to the category.
        Parameters:
        product - product to be checked
        Returns:
        true if product is directly assigned to the category. false otherwise
      • hasProduct

        boolean hasProduct(Product product)
        Returns true if the product belongs to the category. If products are directly assigned to this category, those products are returned. Otherwise, this method is applied to all the sub categories.
        Parameters:
        product - product to be checked
        Returns:
        true if product belongs to the category. false otherwise

"Copyright © 2010 - 2018 Adobe Systems Incorporated. All Rights Reserved"