info.magnolia.module.googlesitemap.service
Class SiteMapService

java.lang.Object
  extended by info.magnolia.module.googlesitemap.service.SiteMapService

@Singleton
public class SiteMapService
extends Object

Main SiteMapService. This service is responsible for: Searching the appropriate nodes (pages or VirtualUri) that should be displayed (for XML rendering or Editing). From the search nodes, create SiteMapEntrys (POJO containing preformated infos used for the rendering).

Version:
$Id$

Constructor Summary
SiteMapService(info.magnolia.module.templatingkit.sites.SiteManager siteManager, GoogleSiteMapConfiguration configuration, QueryUtil queryUtil)
          Constructor for injection.
 
Method Summary
 List<SiteMapEntry> getSiteMapBeanForSite(javax.jcr.Node rootNode, boolean isForEdit)
          Create the SiteMapEntry for all child's of the rootNode that are of type MgnlNodeType.NT_CONTENT.
 List<SiteMapEntry> getSiteMapBeanForVirtualUri(boolean isForEdit)
          Create the SiteMapEntry List corresponding to the uriMapping.
 Iterator<SiteMapEntry> getSiteMapBeans(javax.jcr.Node content)
          Get Site and virtualUri informations if they are defined as components.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SiteMapService

@Inject
public SiteMapService(info.magnolia.module.templatingkit.sites.SiteManager siteManager,
                             GoogleSiteMapConfiguration configuration,
                             QueryUtil queryUtil)
Constructor for injection.

Parameters:
siteManager: - Injected.
Method Detail

getSiteMapBeanForVirtualUri

public List<SiteMapEntry> getSiteMapBeanForVirtualUri(boolean isForEdit)
                                               throws javax.jcr.RepositoryException
Create the SiteMapEntry List corresponding to the uriMapping.

Throws:
javax.jcr.RepositoryException

getSiteMapBeanForSite

public List<SiteMapEntry> getSiteMapBeanForSite(javax.jcr.Node rootNode,
                                                boolean isForEdit)
                                         throws javax.jcr.RepositoryException
Create the SiteMapEntry for all child's of the rootNode that are of type MgnlNodeType.NT_CONTENT.

Throws:
javax.jcr.RepositoryException

getSiteMapBeans

public Iterator<SiteMapEntry> getSiteMapBeans(javax.jcr.Node content)
                                       throws javax.jcr.RepositoryException
Get Site and virtualUri informations if they are defined as components. Notice that by using a HashSet, a single object will be keeped in case of equality of the location.

Throws:
javax.jcr.RepositoryException


Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.