com.ibm.commerce.marketing.dialog.util

Class MarketingUtilCatalog

  • java.lang.Object
    • com.ibm.commerce.marketing.dialog.util.MarketingUtilCatalog


  • public class MarketingUtilCatalog
    extends java.lang.Object
    This class provides utility methods to get catalog data.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.util.List<java.util.LinkedList> findParentBreadcrumbCatgroups(java.util.List<java.util.LinkedList> listOfBreadcrumbs, java.lang.Long catalogId)
      This method returns the parent categories of a list of categories.
      static java.util.List findParentCatgroups(long categoryId, java.util.List categoryList, java.util.List listToMatch)
      This method returns the parent categories of a category.
      static java.util.List<java.util.LinkedList> getParentBreadcrumbs(java.lang.Long catentryId, java.lang.Long catalogId)
      This method gets the parents catalog groups of the specified catalog entry (product or item).
      static java.util.List getParentCategories(java.lang.Long catentryId, java.util.List listToMatch)
      This method gets the parents catalog groups of the specified catalog entry (product or item).
      static java.util.List<java.util.LinkedList> getParentCatgroupBreadcrumbs(java.lang.Long catgroupId, java.lang.Long catalogId)
      This method gets the parents catalog groups of the specified catalog group (category).
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MarketingUtilCatalog

        public MarketingUtilCatalog()
    • Method Detail

      • getParentCategories

        public static java.util.List getParentCategories(java.lang.Long catentryId,
                                                         java.util.List listToMatch)
        This method gets the parents catalog groups of the specified catalog entry (product or item).
        Parameters:
        catentryId - The catalog entry ID.
        listToMatch - The list of categories to match against.
        Returns:
        The list of parent categories.
      • findParentCatgroups

        public static java.util.List findParentCatgroups(long categoryId,
                                                         java.util.List categoryList,
                                                         java.util.List listToMatch)
                                                  throws java.lang.Exception
        This method returns the parent categories of a category.
        Parameters:
        categoryId - The category ID.
        categoryList - The current list of categories.
        listToMatch - The list of categories to match against.
        Returns:
        The list of parent categories appended to the passed in list of categories.
        Throws:
        java.lang.Exception
      • getParentBreadcrumbs

        public static java.util.List<java.util.LinkedList> getParentBreadcrumbs(java.lang.Long catentryId,
                                                                                java.lang.Long catalogId)
        This method gets the parents catalog groups of the specified catalog entry (product or item). A list of breadcrumb trail's are returned representing all the possible paths from the catentry to the root node. In a particular catalog, the catentry will have zero or more breadcrumbs. The list of breadcrumbs are returned in no particular order, however the breadcrumb trails are returned bottom up. The breadcrumb trail is a LinkedList of catgroup ID's. If a product has no parent catalog groups, the returned list will not be NULL and be of size zero.
        Parameters:
        catentryId - The catalog entry ID.
        catalogId - The catalog unique ID to limit search to.
        Returns:
        The list of breadcrumb trail parent categories.
      • getParentCatgroupBreadcrumbs

        public static java.util.List<java.util.LinkedList> getParentCatgroupBreadcrumbs(java.lang.Long catgroupId,
                                                                                        java.lang.Long catalogId)
        This method gets the parents catalog groups of the specified catalog group (category). A list of breadcrumb trail's are returned representing all the possible paths from the catgroup to the root node. The resulting path contains the input catgroupId as the root of each LinkedList. In a particular catalog, the catalog group will have zero or more breadcrumbs. The list of breadcrumbs are returned in no particular order, however the breadcrumb trails are returned bottom up. The breadcrumb trail is a LinkedList of catgroup ID's. If a catgroupId has no parent catalog groups, the returned list will be a single LinkedList containing the specified catgroupId.
        Parameters:
        catgroupId - The catalog group ID.
        catalogId - The catalog unique ID to limit search to.
        Returns:
        The list of breadcrumb trail parent categories.
      • findParentBreadcrumbCatgroups

        public static java.util.List<java.util.LinkedList> findParentBreadcrumbCatgroups(java.util.List<java.util.LinkedList> listOfBreadcrumbs,
                                                                                         java.lang.Long catalogId)
                                                                                  throws java.lang.Exception
        This method returns the parent categories of a list of categories.
        Parameters:
        listOfBreadcrumbs - A list of breadcrumbs. Each breadcrumb should contain at least 1 entry and the entry should be a valid catalog group ID. This list is modified and returned.
        catalogId - The catalog unique ID to limit search to.
        Returns:
        The list of parent categories appended to the passed in list of categories.
        Throws:
        java.lang.Exception