private void init(Node siteMapNode) throws RepositoryException { for(NodeIterator nodeIt = siteMapNode.getNodes(); nodeIt.hasNext();) { Node child = nodeIt.nextNode(); if(child == null) { log.warn("skipping null node"); continue; } if(child.isNodeType(HstNodeTypes.NODETYPE_HST_SITEMAPITEM)) { try { HstSiteMapItemService siteMapItemService = new HstSiteMapItemService(child, siteMapRootNodePath, siteMapItemHandlersConfiguration , null, this, 1); rootSiteMapItems.put(siteMapItemService.getValue(), siteMapItemService); } catch (ServiceException e) { if (log.isDebugEnabled()) { log.warn("Skipping root sitemap '{}'", child.getPath(), e); } else if (log.isWarnEnabled()) { log.warn("Skipping root sitemap '{}'", child.getPath()); } } } else { if (log.isWarnEnabled()) { log.warn("Skipping node '{}' because is not of type {}", child.getPath(), HstNodeTypes.NODETYPE_HST_SITEMAPITEM); } } } }
private void init(Node node) { try{ for(NodeIterator nodeIt = node.getNodes(); nodeIt.hasNext();) { Node child = nodeIt.nextNode(); if(child == null) { log.warn("skipping null node"); continue; } if(child.isNodeType(HstNodeTypes.NODETYPE_HST_SITEMAPITEM)) { try { HstSiteMapItemService siteMapItemService = new HstSiteMapItemService(child, siteMapRootNodePath, siteMapItemHandlersConfiguration , this, this.hstSiteMap, ++depth); childSiteMapItems.put(siteMapItemService.getValue(), siteMapItemService); } catch (ServiceException e) { if (log.isDebugEnabled()) { log.warn("Skipping root sitemap '{}'", child.getPath(), e); } else if (log.isWarnEnabled()) { log.warn("Skipping root sitemap '{}'", child.getPath()); } } } else { if (log.isWarnEnabled()) { log.warn("Skipping node '{}' because is not of type '{}'", child.getPath(), HstNodeTypes.NODETYPE_HST_SITEMAPITEM); } } } } catch (RepositoryException e) { log.warn("Skipping SiteMap structure due to Repository Exception ", e); } }
if(HstNodeTypes.NODETYPE_HST_SITEMAPITEM.equals(child.getNodeTypeName())) { try { HstSiteMapItemService siteMapItemService = new HstSiteMapItemService(child, mountSiteMapConfiguration, siteMapItemHandlersConfiguration , null, this, 1); rootSiteMapItems.put(siteMapItemService.getValue(), siteMapItemService); } catch (ModelLoadingException e) {
if(NODETYPE_HST_SITEMAPITEM.equals(child.getNodeTypeName())) { try { HstSiteMapItemService siteMapItemService = new HstSiteMapItemService(child, mountSiteMapConfiguration, siteMapItemHandlersConfiguration , this, this.hstSiteMap, depth + 1); childSiteMapItems.put(siteMapItemService.getValue(), siteMapItemService); } catch (ModelLoadingException e) {