Package org.opencms.ade.detailpage
Class CmsDefaultDetailPageHandler
java.lang.Object
org.opencms.ade.detailpage.CmsDefaultDetailPageHandler
- All Implemented Interfaces:
I_CmsDetailPageHandler,I_CmsConfigurationParameterHandler
This class uses information from the detail page information stored in the sitemap to find/recognize the detail pages for
a given resource.
- Since:
- 8.0.0
-
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 the configuration parameter.getAllDetailPages(CmsObject cms, int resType) Gets the all detail pages.Gets the configuration.getDetailPage(CmsADEManager manager, CmsObject cms, String contentRootPath, String originPath, String targetDetailPage) Gets the detail page for a content element.getDetailPage(CmsObject cms, String rootPath, String linkSource, String targetDetailPage) Gets the detail page to use for a detail resource.voidInits the configuration.voidinitialize(CmsObject offlineCms, CmsObject onlineCms) Initialize.booleanisValidDetailPage(CmsObject cms, CmsResource page, CmsResource detailRes) Checks whether the given detail page is valid for the given resource.
-
Constructor Details
-
CmsDefaultDetailPageHandler
public CmsDefaultDetailPageHandler()Constructor.
-
-
Method Details
-
addConfigurationParameter
Adds the configuration parameter.- Specified by:
addConfigurationParameterin interfaceI_CmsConfigurationParameterHandler- Parameters:
paramName- the param nameparamValue- the param value- See Also:
-
getAllDetailPages
Gets the all detail pages.- Specified by:
getAllDetailPagesin interfaceI_CmsDetailPageHandler- Parameters:
cms- the cmsresType- the res type- Returns:
- the all detail pages
- Throws:
CmsException- the cms exception- See Also:
-
getConfiguration
Gets the configuration.- Specified by:
getConfigurationin interfaceI_CmsConfigurationParameterHandler- Returns:
- the configuration
- See Also:
-
getDetailPage
public String getDetailPage(CmsADEManager manager, CmsObject cms, String contentRootPath, String originPath, String targetDetailPage) Gets the detail page for a content element.- Parameters:
manager- the ADE manager instance.cms- the CMS contextcontentRootPath- the element's root pathoriginPath- the site path from which the detail content is being linkedtargetDetailPage- the target detail page to use- Returns:
- the detail page for the content element
-
getDetailPage
public String getDetailPage(CmsObject cms, String rootPath, String linkSource, String targetDetailPage) Gets the detail page to use for a detail resource.- Specified by:
getDetailPagein interfaceI_CmsDetailPageHandler- Parameters:
cms- the cmsrootPath- the root pathlinkSource- the link sourcetargetDetailPage- the target detail page- Returns:
- the detail page
- See Also:
-
initConfiguration
Inits the configuration.- Specified by:
initConfigurationin interfaceI_CmsConfigurationParameterHandler- See Also:
-
initialize
Initialize.- Specified by:
initializein interfaceI_CmsDetailPageHandler- Parameters:
offlineCms- the offline cmsonlineCms- the online cms- 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
-