Class CatalogTools

java.lang.Object
de.hybris.platform.catalog.jalo.CatalogTools

public class CatalogTools extends Object
This is tools class of the Catalog extension. It mainly provides methods to copy the items of the Catalog extension from one catalogvserion to a another.
  • Field Details

  • Constructor Details

    • CatalogTools

      public CatalogTools()
  • Method Details

    • copyProduct

      public static Product copyProduct(Product oldProd, CatalogVersion newCV)
      Copies a product and assigning it to the given catalog version
      Parameters:
      oldProd - old product
      newCV - new catalog version
      Returns:
      copied Product
    • copyKeyword

      public static Keyword copyKeyword(Keyword oldKeywrd, CatalogVersion newCV)
      Copies a keyword
      Parameters:
      oldKeywrd - old keyword
      newCV - new catalog version
      Returns:
      copied keyword
    • copyMedia

      public static Media copyMedia(Media oldMedia, CatalogVersion newCV)
      Copies a media
      Parameters:
      oldMedia - old media
      newCV - new catalog version
      Returns:
      copied media
    • copyCategory

      public static Category copyCategory(Category oldCat, CatalogVersion newCV)
      Copies a Catgeory
      Parameters:
      oldCat - old category version
      newCV - new catalog version
      Returns:
      copied category
    • copyAllProducts

      public static Collection copyAllProducts(CatalogVersion oldCV, CatalogVersion newCV)
      Copies products
      Parameters:
      oldCV - old catalog version
      newCV - new catalog version
      Returns:
      a collection of copied products
    • copyAllCategories

      public static Collection copyAllCategories(CatalogVersion oldCV, CatalogVersion newCV)
      Copies categories
      Parameters:
      oldCV - old catalog version
      newCV - new catalog version
      Returns:
      a collection of copied categories
    • copyAllKeywords

      public static Collection copyAllKeywords(CatalogVersion oldCV, CatalogVersion newCV)
      Copies keywords
      Parameters:
      oldCV - old catalog version
      newCV - new catalog version
      Returns:
      collection of copied keywords
    • copyAllMedias

      public static Collection copyAllMedias(CatalogVersion oldCV, CatalogVersion newCV)
      Copies media
      Parameters:
      oldCV - old catalog version
      newCV - new catalog version
      Returns:
      collection of copied media
    • getCatalogVersionItems

      public static SearchResult getCatalogVersionItems(Class itemclass, CatalogVersion catalogVersion, int start, int count)
      Returns items of specified type which belong to a given catalog version
      Parameters:
      itemclass - the item class
      catalogVersion - catalog version
      start - the range start
      count - the range count
      Returns:
      searchresult which contains a collection of items of the specified itemclass
    • copyItems

      public static Collection copyItems(Collection items, CatalogVersion newCV)
      Parameters:
      items - collection with items
      newCV - new catalog version
      Returns:
      collection of copied items