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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConfigurationParameter(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, ornullif the class does not need any parameters.static StringgetDetailPage(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.voidInitializes a configuration after all parameters have been added.voidinitialize(CmsObject offlineCms, CmsObject onlineCms) Initializes the detail page handler.booleanisValidDetailPage(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_CmsConfigurationParameterHandlerAdds a configuration parameter to this parameter configurable class instance.- Specified by:
addConfigurationParameterin interfaceI_CmsConfigurationParameterHandler- Parameters:
paramName- the name of the parameterparamValue- the value for the parameter- See Also:
-
getAllDetailPages
Description copied from interface:I_CmsDetailPageHandlerFinds all detail pages for a given resource.- Specified by:
getAllDetailPagesin 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_CmsConfigurationParameterHandlerReturns the parameters of this configurable class instance, ornullif the class does not need any parameters.- Specified by:
getConfigurationin interfaceI_CmsConfigurationParameterHandler- Returns:
- the parameters of this configurable class instance,
or
nullif 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_CmsDetailPageHandlerReturns the detail page link for the given resource, or null if there is no detail page for the resource.- Specified by:
getDetailPagein 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_CmsConfigurationParameterHandlerInitializes a configuration after all parameters have been added.- Specified by:
initConfigurationin interfaceI_CmsConfigurationParameterHandler- See Also:
-
initialize
Description copied from interface:I_CmsDetailPageHandlerInitializes the detail page handler.- Specified by:
initializein 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:
isValidDetailPagein interfaceI_CmsDetailPageHandler- Parameters:
cms- the CMS contextpage- the detail pagedetailRes- the detail resource- Returns:
- true if the given detail page is valid
-