Class CMSItemCatalogLevelComparator<T extends CMSItemModel>
java.lang.Object
de.hybris.platform.cms2.multicountry.comparator.CMSItemCatalogLevelComparator<T>
- All Implemented Interfaces:
Comparator<T>
public class CMSItemCatalogLevelComparator<T extends CMSItemModel>
extends Object
implements Comparator<T>
Compare
CMSItemModel by catalog level where the cms item was defined. This is used in the context of
multi-country.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompare(CMSItemModel item1, CMSItemModel item2) protected intcompareItemsByCatalogVersions(CMSItemModel item1, CMSItemModel item2) Determines the ordering of the given cms items by comparing the catalog versions where the items are defined.protected CatalogLevelServicevoidsetCmsCatalogLevelService(CatalogLevelService cmsCatalogLevelService) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
CMSItemCatalogLevelComparator
public CMSItemCatalogLevelComparator()
-
-
Method Details
-
compare
- Specified by:
comparein interfaceComparator<T extends CMSItemModel>
-
compareItemsByCatalogVersions
Determines the ordering of the given cms items by comparing the catalog versions where the items are defined. The item defined in the active catalog takes precedence.- Parameters:
item1- - the first catalog version to be compareditem2- - the second catalog version to be compared- Returns:
- The ordering of the cms item based on their catalog versions
-
getCmsCatalogLevelService
-
setCmsCatalogLevelService
-