CmsSitemapEntryBean internalCreateSitemapEntryBean(CmsObject cms, CmsResource resource) throws CmsException {

        cms = OpenCms.initCmsObject(cms);
        cms.getRequestContext().setSiteRoot("");
        CmsJspNavBuilder navBuilder = new CmsJspNavBuilder(cms);
        CmsJspNavElement entry = navBuilder.getNavigationForResource(resource.getRootPath());
        if (entry == null) {
            // may be null for expired resources
            return null;
        }
        return prepareSitemapEntry(cms, entry, false, true);
    }
CmsSitemapEntryBean internalCreateSitemapEntryBean ( CmsObject cms , CmsResource resource ) throws CmsException { cms = OpenCms . initCmsObject ( cms ) ; cms . getRequestContext ( ) . setSiteRoot ( "" ) ; CmsJspNavBuilder navBuilder = new CmsJspNavBuilder ( cms ) ; CmsJspNavElement entry = navBuilder . getNavigationForResource ( resource . getRootPath ( ) ) ; if ( entry == null ) { return null ; } return prepareSitemapEntry ( cms , entry , false , true ) ; }
Creates the sitemap entry bean for a resource.<p>

@param cms the current CMS context
@param resource the resource for which the sitemap entry bean should be created

@return the created sitemap entry bean

@throws CmsException if something goes wrong