Class CatalogVersionLevelComparator

java.lang.Object
de.hybris.platform.cms2.multicountry.comparator.CatalogVersionLevelComparator
All Implemented Interfaces:
Comparator<CatalogVersionModel>

public class CatalogVersionLevelComparator extends Object implements Comparator<CatalogVersionModel>
Compare CatalogVersionModel by catalog level where the catalog version was defined. This is used in the context of multi-country.
  • Constructor Details

    • CatalogVersionLevelComparator

      public CatalogVersionLevelComparator()
  • Method Details

    • compare

      public int compare(CatalogVersionModel catalogVersion1, CatalogVersionModel catalogVersion2)
      Specified by:
      compare in interface 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 compared
      catalogVersion2 - - the second catalog version to be compared
      Returns:
      The ordering of the catalog versions
    • getCmsCatalogLevelService

      protected CatalogLevelService getCmsCatalogLevelService()
    • setCmsCatalogLevelService

      public void setCmsCatalogLevelService(CatalogLevelService cmsCatalogLevelService)