this.getDeliveryContext().addUsedSiteNode(CacheController.getPooledString(3, siteNodeVO.getId()));
if((!hideUnauthorizedPages || getHasUserPageAccess(siteNodeVO.getId())) && (showHidden || !siteNodeVO.getIsHidden()))
{
try
{
WebPage webPage = new WebPage();
webPage.setSiteNodeId(siteNodeVO.getSiteNodeId());
webPage.setLanguageId(this.languageId);
webPage.setContentId(null);
LanguageVO masterLanguageVO = LanguageDeliveryController.getLanguageDeliveryController().getMasterLanguageForRepository(getDatabase(), siteNodeVO.getRepositoryId());
webPage.setNavigationTitle(this.nodeDeliveryController.getPageNavigationTitle(getDatabase(), this.getPrincipal(), siteNodeVO.getId(), siteNodeVO.getRepositoryId(), this.languageId, siteNodeVO.getMetaInfoContentId(), META_INFO_BINDING_NAME, NAV_TITLE_ATTRIBUTE_NAME, USE_LANGUAGE_FALLBACK, this.deliveryContext, escapeHTML));
//System.out.println("Populating nav title for " + siteNodeVO.getName());
if(siteNodeVO.getMetaInfoContentId() != null)
{
if(deliveryContext != null)
deliveryContext.addUsedContent(CacheController.getPooledString(1, siteNodeVO.getMetaInfoContentId()));
webPage.setMetaInfoContentId(siteNodeVO.getMetaInfoContentId());
}
else
{
logger.warn("IT CAN REALLY HAPPEN.....");
webPage.setMetaInfoContentId(this.nodeDeliveryController.getMetaInfoContentId(getDatabase(), this.getPrincipal(), siteNodeVO.getSiteNodeId(), META_INFO_BINDING_NAME, USE_INHERITANCE, this.deliveryContext));
}
if(siteNodeVO.getSortOrder() == null)
{
SiteNodeVersionVO siteNodeVersionVO = this.nodeDeliveryController.getLatestActiveSiteNodeVersionVO(getDatabase(), siteNodeVO.getSiteNodeId());
webPage.setSortOrder(siteNodeVersionVO.getSortOrder());
webPage.setIsHidden(siteNodeVersionVO.getIsHidden());
}
else
{
webPage.setSortOrder(siteNodeVO.getSortOrder());
webPage.setIsHidden(siteNodeVO.getIsHidden());
}
webPage.setUrl(this.nodeDeliveryController.getPageUrl(getDatabase(), this.getPrincipal(), siteNodeVO.getSiteNodeId(), this.languageId, null, this.deliveryContext));
childPages.add(webPage);
}
catch(Exception e)
{
logger.info("An error occurred when looking up one of the childPages:" + e.getMessage(), e);