Package org.opencms.ade.detailpage
Class CmsDetailPageFilter
java.lang.Object
org.opencms.ade.detailpage.CmsDetailPageFilter
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCmsDetailPageFilter
(CmsObject cms, String rootPath) Creates a new instance based on the root path of a detail resource.CmsDetailPageFilter
(CmsObject cms, CmsResource resource) Creates a new instance based on an actual detail resource. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Checks that a detail page qualifier matches the detail resource.filterDetailPages
(List<CmsDetailPageInfo> infos) Produces a filtered and sorted result stream of candidate detail pages for the detail resource.Gets the category paths, lazily initializing them first if necessary.Reads the categories for the resource.
-
Field Details
-
PREFIX_CATEGORY
Prefix for the category qualifier in a detail page entry.- See Also:
-
QUALIFIER_FOLDERS
'folders' qualifier for detail pages.- See Also:
-
-
Constructor Details
-
CmsDetailPageFilter
Creates a new instance based on an actual detail resource.- Parameters:
cms
- the CMS contextresource
- the detail resource
-
CmsDetailPageFilter
Creates a new instance based on the root path of a detail resource.- Parameters:
cms
- the CMS contextrootPath
- 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
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
Gets the category paths, lazily initializing them first if necessary.- Returns:
- the set of category paths
-
readCategories
Reads the categories for the resource.- Returns:
- the categories for the resource
-