Package org.opencms.ade.detailpage
Class CmsPermissiveDetailPageHandler
java.lang.Object
org.opencms.ade.detailpage.CmsPermissiveDetailPageHandler
- All Implemented Interfaces:
I_CmsDetailPageHandler
,I_CmsConfigurationParameterHandler
Original detail page handler implementing the detail page logic from OpenCms versions up to 11.0.
Disregards the 'exclude external detail contents' option, allows all combinations of detail page / detail content on the same site.
-
Field Summary
Fields inherited from interface org.opencms.configuration.I_CmsConfigurationParameterHandler
ADD_PARAMETER_METHOD, INIT_CONFIGURATION_METHOD
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addConfigurationParameter
(String paramName, String paramValue) Adds a configuration parameter to this parameter configurable class instance.getAllDetailPages
(CmsObject cms, int resType) Finds all detail pages for a given resource.Returns the parameters of this configurable class instance, ornull
if the class does not need any parameters.static String
getDetailPage
(CmsADEManager manager, CmsObject cms, String pageRootPath, String originPath, String targetDetailPage) Gets the detail page for a content element.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
Initializes a configuration after all parameters have been added.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.
-
Constructor Details
-
CmsPermissiveDetailPageHandler
public CmsPermissiveDetailPageHandler()
-
-
Method Details
-
getDetailPage
public static String getDetailPage(CmsADEManager manager, CmsObject cms, String pageRootPath, String originPath, String targetDetailPage) Gets the detail page for a content element.- Parameters:
manager
- the ADE manager instance.cms
- the CMS contextpageRootPath
- the element's root pathoriginPath
- the path in which the the detail page is being requestedtargetDetailPage
- the target detail page to use- Returns:
- the detail page for the content element
-
addConfigurationParameter
Description copied from interface:I_CmsConfigurationParameterHandler
Adds a configuration parameter to this parameter configurable class instance.- Specified by:
addConfigurationParameter
in interfaceI_CmsConfigurationParameterHandler
- Parameters:
paramName
- the name of the parameterparamValue
- the value for the parameter- See Also:
-
getAllDetailPages
Description copied from interface:I_CmsDetailPageHandler
Finds all detail pages for a given resource.- Specified by:
getAllDetailPages
in interfaceI_CmsDetailPageHandler
- 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- See Also:
-
getConfiguration
Description copied from interface:I_CmsConfigurationParameterHandler
Returns the parameters of this configurable class instance, ornull
if the class does not need any parameters.- Specified by:
getConfiguration
in interfaceI_CmsConfigurationParameterHandler
- Returns:
- the parameters of this configurable class instance,
or
null
if the class does not need any parameters - See Also:
-
getDetailPage
public String getDetailPage(CmsObject cms, String rootPath, String linkSource, String targetDetailPage) Description copied from interface:I_CmsDetailPageHandler
Returns the detail page link for the given resource, or null if there is no detail page for the resource.- Specified by:
getDetailPage
in interfaceI_CmsDetailPageHandler
- 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
- See Also:
-
initConfiguration
Description copied from interface:I_CmsConfigurationParameterHandler
Initializes a configuration after all parameters have been added.- Specified by:
initConfiguration
in interfaceI_CmsConfigurationParameterHandler
- See Also:
-
initialize
Description copied from interface:I_CmsDetailPageHandler
Initializes the detail page handler.- Specified by:
initialize
in interfaceI_CmsDetailPageHandler
- Parameters:
offlineCms
- offline CMS contextonlineCms
- online CMS context- See Also:
-
isValidDetailPage
Checks whether the given detail page is valid for the given resource.- Specified by:
isValidDetailPage
in interfaceI_CmsDetailPageHandler
- Parameters:
cms
- the CMS contextpage
- the detail pagedetailRes
- the detail resource- Returns:
- true if the given detail page is valid
-