Class CmsDetailPageFilter

java.lang.Object
org.opencms.ade.detailpage.CmsDetailPageFilter

public class CmsDetailPageFilter extends Object
Filters and sorts a list of detail pages based on whether they are suitable detail pages for a fixed detail content.

Note: Filtering on detail page types is already handled elsewhere, so this class only handles detail pages for a single type.

  • Field Details

  • Constructor Details

    • CmsDetailPageFilter

      public CmsDetailPageFilter(CmsObject cms, CmsResource resource)
      Creates a new instance based on an actual detail resource.
      Parameters:
      cms - the CMS context
      resource - the detail resource
    • CmsDetailPageFilter

      public CmsDetailPageFilter(CmsObject cms, String rootPath)
      Creates a new instance based on the root path of a detail resource.
      Parameters:
      cms - the CMS context
      rootPath - the detail resource root path
  • Method Details

    • filterDetailPages

      Produces a filtered and sorted result stream of candidate detail pages for the detail resource.
      Parameters:
      infos - the base list of detail page beans to filter/sort
      Returns:
      the result stream
    • checkQualifier

      protected boolean checkQualifier(CmsDetailPageInfo info)
      Checks that a detail page qualifier matches the detail resource.
      Parameters:
      info - the qualifier to check
      Returns:
      true if the qualifier matches the detail resource
    • getCategories

      protected Set<CmsPath> getCategories()
      Gets the category paths, lazily initializing them first if necessary.
      Returns:
      the set of category paths
    • readCategories

      protected Set<CmsPath> readCategories()
      Reads the categories for the resource.
      Returns:
      the categories for the resource