| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.tacos.services.impl.SiteMapImpl
public class SiteMapImpl
This class reads the sitemap configuration, and provides access to basic relationship information, such as page categories, bread crumbs, and other information, that the application may need to ease navigation.
| Constructor Summary | |
|---|---|
| SiteMapImpl()Empty constructor. | |
| Method Summary | |
|---|---|
|  boolean | contains(String parentName,
         String pageName)Check if page name is contained in the page element tree. | 
| protected  org.dom4j.Element | findPageNode(String page)Finds the specified page node in the sitemap, first trying to find it by name and then path. | 
|  List | getBreadCrumbs(String pageName)Get bread crumbs. | 
|  List | getCategories()Get category listing. | 
|  CategoryInfo | getCategoryFromPage(String pageName)Get the category info for the page name. | 
|  CategoryInfo | getCategoryInfo(String name)Get category info for named category. | 
|  List | getCategoryPages(String pageName)Get pages for a specific page names category. | 
|  PageInfo | getDefaultPage(String category)Get the default page. | 
|  String | getDefaultPageDesc(String category)Get the default page description. | 
|  PageInfo | getPageInfo(String name)Get page information. | 
|  boolean | inCategory(String pageName,
           String category)Check if page name is in the specified category. | 
|  void | initialize()Initialize site map from a url (xml document). | 
| protected  void | parseNodeTree(PageInfo page,
              org.dom4j.Node pageNode)Iterates through the category tree represented by this page node and parses all children and parents. | 
| protected  PageInfo | parsePageNode(org.dom4j.Element node)Parses a particular page node, doesn't parse children or parent of PageInfo. | 
| protected  PageInfo | parsePageNodes(org.dom4j.Node parent,
               PageInfo source)Parses all children of specified node and adds them to the page cache. | 
|  void | setResource(Resource resource)Set the sitemap resource (xml). | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public SiteMapImpl()
| Method Detail | 
|---|
public void setResource(Resource resource)
resource - The resource (xml) file
public void initialize()
                throws org.dom4j.DocumentException
document - 
org.dom4j.DocumentException - on error
IllegalStateException - If no resource has been set.
public boolean contains(String parentName,
                        String pageName)
contains in interface SiteMapparentName - The page to look for.pageName - The page to start at (moves bottom-up).
public PageInfo getPageInfo(String name)
getPageInfo in interface SiteMapname - The page name
protected org.dom4j.Element findPageNode(String page)
page - 
protected PageInfo parsePageNode(org.dom4j.Element node)
PageInfo.
node - Node to parse.
protected void parseNodeTree(PageInfo page,
                             org.dom4j.Node pageNode)
page - The page that caused the tree parsepageNode - 
protected PageInfo parsePageNodes(org.dom4j.Node parent,
                                  PageInfo source)
parent - source - Page that caused the original parse.
public List getCategories()
getCategories in interface SiteMappublic CategoryInfo getCategoryInfo(String name)
getCategoryInfo in interface SiteMapname - Category name
SiteMap.getCategoryInfo(java.lang.String)public CategoryInfo getCategoryFromPage(String pageName)
getCategoryFromPage in interface SiteMappageName - The page name.
public boolean inCategory(String pageName,
                          String category)
inCategory in interface SiteMappageName - Page namecategory - Category
public PageInfo getDefaultPage(String category)
getDefaultPage in interface SiteMapcategory - Category
public List getCategoryPages(String pageName)
getCategoryPages in interface SiteMappageName - Page name
public String getDefaultPageDesc(String category)
getDefaultPageDesc in interface SiteMapcategory - Category
public List getBreadCrumbs(String pageName)
getBreadCrumbs in interface SiteMappageName - The page name.
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||