org.apache.lenya.cms.site.tree2
Class TreeSiteManager
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.lenya.cms.site.AbstractSiteManager
org.apache.lenya.cms.site.tree2.TreeSiteManager
- All Implemented Interfaces:
- org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, org.apache.lenya.cms.site.SiteManager
public class TreeSiteManager
- extends org.apache.lenya.cms.site.AbstractSiteManager
Tree-based site manager.
Nested classes/interfaces inherited from class org.apache.lenya.cms.site.AbstractSiteManager |
org.apache.lenya.cms.site.AbstractSiteManager.NodeComparator |
Fields inherited from class org.apache.lenya.cms.site.AbstractSiteManager |
manager |
Fields inherited from interface org.apache.lenya.cms.site.SiteManager |
ROLE |
Method Summary |
void |
add(java.lang.String path,
org.apache.lenya.cms.publication.Document doc)
|
protected java.lang.String |
computeUniquePath(org.apache.lenya.cms.publication.DocumentFactory factory,
org.apache.lenya.cms.publication.DocumentLocator locator)
compute an unique document id |
boolean |
contains(org.apache.lenya.cms.publication.Document doc)
|
boolean |
containsInAnyLanguage(org.apache.lenya.cms.publication.Document doc)
|
void |
copy(org.apache.lenya.cms.publication.Document srcDoc,
org.apache.lenya.cms.publication.Document destDoc)
|
org.apache.lenya.cms.publication.DocumentLocator |
getAvailableLocator(org.apache.lenya.cms.publication.DocumentFactory factory,
org.apache.lenya.cms.publication.DocumentLocator locator)
|
org.apache.lenya.cms.publication.Document[] |
getDocuments(org.apache.lenya.cms.publication.DocumentFactory factory,
org.apache.lenya.cms.publication.Publication pub,
java.lang.String area)
|
protected java.lang.String |
getKey(org.apache.lenya.cms.publication.Area area)
|
org.apache.lenya.cms.publication.DocumentLocator[] |
getRequiredResources(org.apache.lenya.cms.publication.DocumentFactory map,
org.apache.lenya.cms.publication.DocumentLocator loc)
|
org.apache.lenya.cms.site.SiteNode[] |
getRequiringResources(org.apache.lenya.cms.publication.DocumentFactory map,
org.apache.lenya.cms.site.SiteNode resource)
|
org.apache.lenya.cms.site.SiteStructure |
getSiteStructure(org.apache.lenya.cms.publication.DocumentFactory map,
org.apache.lenya.cms.publication.Publication publication,
java.lang.String area)
|
protected SiteTree |
getTree(org.apache.lenya.cms.publication.Area area)
Returns the sitetree for a specific area of this publication. |
boolean |
isVisibleInNav(org.apache.lenya.cms.publication.Document document)
|
boolean |
requires(org.apache.lenya.cms.publication.DocumentFactory map,
org.apache.lenya.cms.site.SiteNode depending,
org.apache.lenya.cms.site.SiteNode required)
|
void |
set(java.lang.String path,
org.apache.lenya.cms.publication.Document document)
|
void |
setVisibleInNav(org.apache.lenya.cms.publication.Document document,
boolean visibleInNav)
|
Methods inherited from class org.apache.lenya.cms.site.AbstractSiteManager |
check, isAntisymmetric, isIrreflexive, isTransitive, service, sortAscending |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TreeSiteManager
public TreeSiteManager()
getTree
protected SiteTree getTree(org.apache.lenya.cms.publication.Area area)
throws org.apache.lenya.cms.site.SiteException
- Returns the sitetree for a specific area of this publication. Sitetrees are created on demand
and are cached.
- Parameters:
area
- The area.
- Returns:
- A site tree.
- Throws:
org.apache.lenya.cms.site.SiteException
- if an error occurs.
getKey
protected java.lang.String getKey(org.apache.lenya.cms.publication.Area area)
- Parameters:
area
- The area.
- Returns:
- The key to store sitetree objects in the identity map.
add
public void add(java.lang.String path,
org.apache.lenya.cms.publication.Document doc)
throws org.apache.lenya.cms.site.SiteException
- Throws:
org.apache.lenya.cms.site.SiteException
contains
public boolean contains(org.apache.lenya.cms.publication.Document doc)
throws org.apache.lenya.cms.site.SiteException
- Throws:
org.apache.lenya.cms.site.SiteException
containsInAnyLanguage
public boolean containsInAnyLanguage(org.apache.lenya.cms.publication.Document doc)
throws org.apache.lenya.cms.site.SiteException
- Throws:
org.apache.lenya.cms.site.SiteException
copy
public void copy(org.apache.lenya.cms.publication.Document srcDoc,
org.apache.lenya.cms.publication.Document destDoc)
throws org.apache.lenya.cms.site.SiteException
- Throws:
org.apache.lenya.cms.site.SiteException
getAvailableLocator
public org.apache.lenya.cms.publication.DocumentLocator getAvailableLocator(org.apache.lenya.cms.publication.DocumentFactory factory,
org.apache.lenya.cms.publication.DocumentLocator locator)
throws org.apache.lenya.cms.site.SiteException
- Throws:
org.apache.lenya.cms.site.SiteException
computeUniquePath
protected java.lang.String computeUniquePath(org.apache.lenya.cms.publication.DocumentFactory factory,
org.apache.lenya.cms.publication.DocumentLocator locator)
throws org.apache.lenya.cms.site.SiteException
- compute an unique document id
- Parameters:
factory
- The factory.locator
- The locator.
- Returns:
- the unique documentid
- Throws:
org.apache.lenya.cms.site.SiteException
- if an error occurs.
getDocuments
public org.apache.lenya.cms.publication.Document[] getDocuments(org.apache.lenya.cms.publication.DocumentFactory factory,
org.apache.lenya.cms.publication.Publication pub,
java.lang.String area)
throws org.apache.lenya.cms.site.SiteException
- Throws:
org.apache.lenya.cms.site.SiteException
getRequiredResources
public org.apache.lenya.cms.publication.DocumentLocator[] getRequiredResources(org.apache.lenya.cms.publication.DocumentFactory map,
org.apache.lenya.cms.publication.DocumentLocator loc)
throws org.apache.lenya.cms.site.SiteException
- Throws:
org.apache.lenya.cms.site.SiteException
getRequiringResources
public org.apache.lenya.cms.site.SiteNode[] getRequiringResources(org.apache.lenya.cms.publication.DocumentFactory map,
org.apache.lenya.cms.site.SiteNode resource)
throws org.apache.lenya.cms.site.SiteException
- Throws:
org.apache.lenya.cms.site.SiteException
getSiteStructure
public org.apache.lenya.cms.site.SiteStructure getSiteStructure(org.apache.lenya.cms.publication.DocumentFactory map,
org.apache.lenya.cms.publication.Publication publication,
java.lang.String area)
throws org.apache.lenya.cms.site.SiteException
- Throws:
org.apache.lenya.cms.site.SiteException
isVisibleInNav
public boolean isVisibleInNav(org.apache.lenya.cms.publication.Document document)
throws org.apache.lenya.cms.site.SiteException
- Throws:
org.apache.lenya.cms.site.SiteException
requires
public boolean requires(org.apache.lenya.cms.publication.DocumentFactory map,
org.apache.lenya.cms.site.SiteNode depending,
org.apache.lenya.cms.site.SiteNode required)
throws org.apache.lenya.cms.site.SiteException
- Throws:
org.apache.lenya.cms.site.SiteException
set
public void set(java.lang.String path,
org.apache.lenya.cms.publication.Document document)
throws org.apache.lenya.cms.site.SiteException
- Throws:
org.apache.lenya.cms.site.SiteException
setVisibleInNav
public void setVisibleInNav(org.apache.lenya.cms.publication.Document document,
boolean visibleInNav)
throws org.apache.lenya.cms.site.SiteException
- Throws:
org.apache.lenya.cms.site.SiteException
Copyright © $ Apache Software Foundation. All Rights Reserved.