Package org.opencms.ade.detailpage
Interface I_CmsDetailPageHandler
- All Superinterfaces:
I_CmsConfigurationParameterHandler
- All Known Implementing Classes:
CmsDefaultDetailPageHandler
,CmsPermissiveDetailPageHandler
Interface for classes which can find the detail page for a given resource,
and determine whether a given detail page / detail content combination is valid.
- Since:
- 8.0.0
-
Field Summary
Fields inherited from interface org.opencms.configuration.I_CmsConfigurationParameterHandler
ADD_PARAMETER_METHOD, INIT_CONFIGURATION_METHOD
-
Method Summary
Modifier and TypeMethodDescriptiongetAllDetailPages
(CmsObject cms, int restype) Finds all detail pages for a given resource.getDetailPage
(CmsObject cms, String rootPath, String linkSource, String targetDetailPage) Returns the detail page link for the given resource, or null if there is no detail page for the resource.void
initialize
(CmsObject offlineCms, CmsObject onlineCms) Initializes the detail page handler.boolean
isValidDetailPage
(CmsObject cms, CmsResource page, CmsResource detailRes) Checks whether the given detail page is valid for the given resource.Methods inherited from interface org.opencms.configuration.I_CmsConfigurationParameterHandler
addConfigurationParameter, getConfiguration, initConfiguration
-
Method Details
-
isValidDetailPage
Checks whether the given detail page is valid for the given resource.- Parameters:
cms
- the CMS contextpage
- the detail pagedetailRes
- the detail resource- Returns:
- true if the given detail page is valid
-
getAllDetailPages
Finds all detail pages for a given resource.- Parameters:
cms
- the current CMS contextrestype
- the resource type for which the detail pages should be found- Returns:
- the list of detail page
- Throws:
CmsException
- in case reading the resource type fails
-
getDetailPage
Returns the detail page link for the given resource, or null if there is no detail page for the resource.- Parameters:
cms
- the CMS contextrootPath
- the root path of the resource for which the detail page should be looked uplinkSource
- the uri in the context of which the detail page link is being generated (relative to the site)targetDetailPage
- the target detail page to use- Returns:
- the detail page link, or null
-
initialize
Initializes the detail page handler.- Parameters:
offlineCms
- offline CMS contextonlineCms
- online CMS context
-