Package de.hybris.platform.catalog.jalo
Class CatalogTools
- java.lang.Object
-
- de.hybris.platform.catalog.jalo.CatalogTools
-
public class CatalogTools extends java.lang.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.
-
-
Constructor Summary
Constructors Constructor Description CatalogTools()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Collection
copyAllCategories(CatalogVersion oldCV, CatalogVersion newCV)
Copies categoriesstatic java.util.Collection
copyAllKeywords(CatalogVersion oldCV, CatalogVersion newCV)
Copies keywordsstatic java.util.Collection
copyAllMedias(CatalogVersion oldCV, CatalogVersion newCV)
Copies mediastatic java.util.Collection
copyAllProducts(CatalogVersion oldCV, CatalogVersion newCV)
Copies productsstatic Category
copyCategory(Category oldCat, CatalogVersion newCV)
Copies a Catgeorystatic java.util.Collection
copyItems(java.util.Collection items, CatalogVersion newCV)
static Keyword
copyKeyword(Keyword oldKeywrd, CatalogVersion newCV)
Copies a keywordstatic Media
copyMedia(Media oldMedia, CatalogVersion newCV)
Copies a mediastatic Product
copyProduct(Product oldProd, CatalogVersion newCV)
Copies a product and assigning it to the given catalog versionstatic SearchResult
getCatalogVersionItems(java.lang.Class itemclass, CatalogVersion catalogVersion, int start, int count)
Returns items of specified type which belong to a given catalog version
-
-
-
Field Detail
-
ERROR
public static final int ERROR
- See Also:
- Constant Field Values
-
SOURCE
public static final java.lang.String SOURCE
- See Also:
- Constant Field Values
-
-
Method Detail
-
copyProduct
public static Product copyProduct(Product oldProd, CatalogVersion newCV)
Copies a product and assigning it to the given catalog version- Parameters:
oldProd
- old productnewCV
- new catalog version- Returns:
- copied Product
-
copyKeyword
public static Keyword copyKeyword(Keyword oldKeywrd, CatalogVersion newCV)
Copies a keyword- Parameters:
oldKeywrd
- old keywordnewCV
- new catalog version- Returns:
- copied keyword
-
copyMedia
public static Media copyMedia(Media oldMedia, CatalogVersion newCV)
Copies a media- Parameters:
oldMedia
- old medianewCV
- new catalog version- Returns:
- copied media
-
copyCategory
public static Category copyCategory(Category oldCat, CatalogVersion newCV)
Copies a Catgeory- Parameters:
oldCat
- old category versionnewCV
- new catalog version- Returns:
- copied category
-
copyAllProducts
public static java.util.Collection copyAllProducts(CatalogVersion oldCV, CatalogVersion newCV)
Copies products- Parameters:
oldCV
- old catalog versionnewCV
- new catalog version- Returns:
- a collection of copied products
-
copyAllCategories
public static java.util.Collection copyAllCategories(CatalogVersion oldCV, CatalogVersion newCV)
Copies categories- Parameters:
oldCV
- old catalog versionnewCV
- new catalog version- Returns:
- a collection of copied categories
-
copyAllKeywords
public static java.util.Collection copyAllKeywords(CatalogVersion oldCV, CatalogVersion newCV)
Copies keywords- Parameters:
oldCV
- old catalog versionnewCV
- new catalog version- Returns:
- collection of copied keywords
-
copyAllMedias
public static java.util.Collection copyAllMedias(CatalogVersion oldCV, CatalogVersion newCV)
Copies media- Parameters:
oldCV
- old catalog versionnewCV
- new catalog version- Returns:
- collection of copied media
-
getCatalogVersionItems
public static SearchResult getCatalogVersionItems(java.lang.Class itemclass, CatalogVersion catalogVersion, int start, int count)
Returns items of specified type which belong to a given catalog version- Parameters:
itemclass
- the item classcatalogVersion
- catalog versionstart
- the range startcount
- the range count- Returns:
- searchresult which contains a collection of items of the specified itemclass
-
copyItems
public static java.util.Collection copyItems(java.util.Collection items, CatalogVersion newCV)
- Parameters:
items
- collection with itemsnewCV
- new catalog version- Returns:
- collection of copied items
-
-