Interface CMSRestrictionService

    • Method Detail

      • evaluateCMSComponent

        boolean evaluateCMSComponent​(AbstractCMSComponentModel component,
                                     RestrictionData data)
        Evaluate cms component for RestrictionData context object.
        Parameters:
        component - the component
        data - the data
        Returns:
        true, if successful
      • evaluatePages

        java.util.Collection<AbstractPageModel> evaluatePages​(java.util.Collection<AbstractPageModel> pages,
                                                              RestrictionData data)
        Evaluate pages for RestrictionData context object.
        Parameters:
        pages - the pages
        data - the data
        Returns:
        the collection
      • getCategoryCodesForRestriction

        java.util.Collection<java.lang.String> getCategoryCodesForRestriction​(CMSCategoryRestrictionModel restriction)
        Gets the category codes for restriction.
        Parameters:
        restriction - the restriction
        Returns:
        the category codes for restriction
      • getProductCodesForRestriction

        java.util.Collection<java.lang.String> getProductCodesForRestriction​(CMSProductRestrictionModel restriction)
        Gets the product codes for restriction.
        Parameters:
        restriction - the restriction
        Returns:
        the product codes for restriction
      • getOwnRestrictionsForPage

        default java.util.Collection<AbstractRestrictionModel> getOwnRestrictionsForPage​(AbstractPageModel pageModel,
                                                                                         CatalogVersionModel catalogVersion)
        Find restrictions for page by page and catalog version.
        Parameters:
        pageModel - the page
        catalogVersion - the catalog version
        Returns:
        the collection of found AbstractRestrictionModel objects or empty list when not found.
      • getOwnRestrictionsForComponents

        default java.util.Collection<AbstractRestrictionModel> getOwnRestrictionsForComponents​(java.util.Collection<AbstractCMSComponentModel> components,
                                                                                               CatalogVersionModel catalogVersion)
        Find restrictions for components by components and catalog version.
        Parameters:
        components - the components
        catalogVersion - the catalog version
        Returns:
        the collection of found AbstractRestrictionModel objects or empty list when not found.
      • relatedSharedSlots

        default boolean relatedSharedSlots​(AbstractRestrictionModel restrictionModel)
        Check if a restriction is related to a shared slot or not.
        Parameters:
        restrictionModel - The CMS Restriction.
        Returns:
        boolean