org.opencms.ade.detailpage
Class CmsSitemapDetailPageFinder

java.lang.Object
  extended by org.opencms.ade.detailpage.CmsSitemapDetailPageFinder
All Implemented Interfaces:
I_CmsDetailPageFinder

public class CmsSitemapDetailPageFinder
extends Object
implements I_CmsDetailPageFinder

This class uses information from the detail page information stored in the sitemap to find the detail page for a given resource.

Since:
8.0.0

Constructor Summary
CmsSitemapDetailPageFinder()
           
 
Method Summary
 Collection<String> getAllDetailPages(CmsObject cms, int resType)
          Finds all detail pages for a given resource.
 String getDetailPage(CmsObject cms, String rootPath, String linkSource)
          Returns the detail page link for the given resource, or null if there is no detail page for the resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsSitemapDetailPageFinder

public CmsSitemapDetailPageFinder()
Method Detail

getAllDetailPages

public Collection<String> getAllDetailPages(CmsObject cms,
                                            int resType)
                                     throws CmsException
Description copied from interface: I_CmsDetailPageFinder
Finds all detail pages for a given resource.

Specified by:
getAllDetailPages in interface I_CmsDetailPageFinder
Parameters:
cms - the current CMS context
resType - the resource type for which the detail pages should be found
Returns:
the list of detail page
Throws:
CmsException
See Also:
I_CmsDetailPageFinder.getAllDetailPages(org.opencms.file.CmsObject, int)

getDetailPage

public String getDetailPage(CmsObject cms,
                            String rootPath,
                            String linkSource)
Description copied from interface: I_CmsDetailPageFinder
Returns the detail page link for the given resource, or null if there is no detail page for the resource.

Specified by:
getDetailPage in interface I_CmsDetailPageFinder
Parameters:
cms - the CMS context
rootPath - the root path of the resource for which the detail page should be looked up
linkSource - the uri in the context of which the detail page link is being generated (relative to the site)
Returns:
the detail page link, or null
See Also:
I_CmsDetailPageFinder.getDetailPage(org.opencms.file.CmsObject, java.lang.String, java.lang.String)