Class CatalogVersionLevelComparator

  • All Implemented Interfaces:
    java.util.Comparator<CatalogVersionModel>

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

      • CatalogVersionLevelComparator

        public CatalogVersionLevelComparator()
    • Method Detail

      • 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
      • setCmsCatalogLevelService

        public void setCmsCatalogLevelService​(CatalogLevelService cmsCatalogLevelService)