Package de.hybris.platform.catalog.jalo
Class CatalogTools
java.lang.Object
de.hybris.platform.catalog.jalo.CatalogTools
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CollectioncopyAllCategories(CatalogVersion oldCV, CatalogVersion newCV) Copies categoriesstatic CollectioncopyAllKeywords(CatalogVersion oldCV, CatalogVersion newCV) Copies keywordsstatic CollectioncopyAllMedias(CatalogVersion oldCV, CatalogVersion newCV) Copies mediastatic CollectioncopyAllProducts(CatalogVersion oldCV, CatalogVersion newCV) Copies productsstatic CategorycopyCategory(Category oldCat, CatalogVersion newCV) Copies a Catgeorystatic CollectioncopyItems(Collection items, CatalogVersion newCV) static KeywordcopyKeyword(Keyword oldKeywrd, CatalogVersion newCV) Copies a keywordstatic MediacopyMedia(Media oldMedia, CatalogVersion newCV) Copies a mediastatic ProductcopyProduct(Product oldProd, CatalogVersion newCV) Copies a product and assigning it to the given catalog versionstatic SearchResultgetCatalogVersionItems(Class itemclass, CatalogVersion catalogVersion, int start, int count) Returns items of specified type which belong to a given catalog version
-
Field Details
-
ERROR
public static final int ERROR- See Also:
-
SOURCE
- See Also:
-
-
Constructor Details
-
CatalogTools
public CatalogTools()
-
-
Method Details
-
copyProduct
Copies a product and assigning it to the given catalog version- Parameters:
oldProd- old productnewCV- new catalog version- Returns:
- copied Product
-
copyKeyword
Copies a keyword- Parameters:
oldKeywrd- old keywordnewCV- new catalog version- Returns:
- copied keyword
-
copyMedia
Copies a media- Parameters:
oldMedia- old medianewCV- new catalog version- Returns:
- copied media
-
copyCategory
Copies a Catgeory- Parameters:
oldCat- old category versionnewCV- new catalog version- Returns:
- copied category
-
copyAllProducts
Copies products- Parameters:
oldCV- old catalog versionnewCV- new catalog version- Returns:
- a collection of copied products
-
copyAllCategories
Copies categories- Parameters:
oldCV- old catalog versionnewCV- new catalog version- Returns:
- a collection of copied categories
-
copyAllKeywords
Copies keywords- Parameters:
oldCV- old catalog versionnewCV- new catalog version- Returns:
- collection of copied keywords
-
copyAllMedias
Copies media- Parameters:
oldCV- old catalog versionnewCV- 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 classcatalogVersion- catalog versionstart- the range startcount- the range count- Returns:
- searchresult which contains a collection of items of the specified itemclass
-
copyItems
- Parameters:
items- collection with itemsnewCV- new catalog version- Returns:
- collection of copied items
-