Class CatalogVersionLevelComparator
- java.lang.Object
-
- de.hybris.platform.cms2.multicountry.comparator.CatalogVersionLevelComparator
-
- All Implemented Interfaces:
java.util.Comparator<CatalogVersionModel>
public class CatalogVersionLevelComparator extends java.lang.Object implements java.util.Comparator<CatalogVersionModel>
CompareCatalogVersionModelby catalog level where the catalog version was defined. This is used in the context of multi-country.
-
-
Constructor Summary
Constructors Constructor Description CatalogVersionLevelComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(CatalogVersionModel catalogVersion1, CatalogVersionModel catalogVersion2)protected intcompareSameLevelCatalogVersions(CatalogVersionModel catalogVersion1, CatalogVersionModel catalogVersion2)Determines the ordering of catalog versions that are on the same catalog level.protected CatalogLevelServicegetCmsCatalogLevelService()voidsetCmsCatalogLevelService(CatalogLevelService cmsCatalogLevelService)
-
-
-
Method Detail
-
compare
public int compare(CatalogVersionModel catalogVersion1, CatalogVersionModel catalogVersion2)
- Specified by:
comparein interfacejava.util.Comparator<CatalogVersionModel>
-
compareSameLevelCatalogVersions
protected int compareSameLevelCatalogVersions(CatalogVersionModel catalogVersion1, CatalogVersionModel catalogVersion2)
Determines the ordering of catalog versions that are on the same catalog level. The catalog version that is active takes precedence.- Parameters:
catalogVersion1- - the first catalog version to be comparedcatalogVersion2- - the second catalog version to be compared- Returns:
- The ordering of the catalog versions
-
getCmsCatalogLevelService
protected CatalogLevelService getCmsCatalogLevelService()
-
setCmsCatalogLevelService
public void setCmsCatalogLevelService(CatalogLevelService cmsCatalogLevelService)
-
-