|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.lenya.cms.site.tree.DefaultSiteTree
public class DefaultSiteTree
Default sitetree implementation.
| Field Summary | |
|---|---|
protected org.apache.avalon.framework.service.ServiceManager |
manager
|
static java.lang.String |
NAMESPACE_URI
The sitetree namespace. |
static java.lang.String |
SITE_TREE_FILENAME
The name of the sitetree file. |
| Fields inherited from interface org.apache.lenya.cms.site.tree.SiteTree |
|---|
IDENTIFIABLE_TYPE |
| Constructor Summary | |
|---|---|
protected |
DefaultSiteTree(org.apache.lenya.cms.publication.DocumentFactory factory,
org.apache.lenya.cms.publication.Publication publication,
java.lang.String _area,
org.apache.avalon.framework.service.ServiceManager manager,
org.apache.avalon.framework.logger.Logger logger)
Create a DefaultSiteTree |
| Method Summary | |
|---|---|
org.apache.lenya.cms.site.SiteNode |
add(java.lang.String path)
|
org.apache.lenya.cms.site.Link |
add(java.lang.String path,
org.apache.lenya.cms.publication.Document doc)
|
org.apache.lenya.cms.site.SiteNode |
add(java.lang.String path,
java.lang.String followingSiblingPath)
|
protected void |
addLabel(java.lang.String path,
java.lang.String language,
java.lang.String label)
|
protected void |
addNode(SiteTreeNode node)
|
protected void |
addNode(SiteTreeNode node,
java.lang.String refpath)
|
protected SiteTreeNodeImpl |
addNode(java.lang.String path,
java.lang.String uuid,
boolean visibleInNav,
java.lang.String href,
java.lang.String suffix,
boolean link)
|
protected SiteTreeNodeImpl |
addNode(java.lang.String path,
java.lang.String uuid,
boolean visibleInNav,
java.lang.String href,
java.lang.String suffix,
boolean link,
java.lang.String refpath)
|
protected void |
addNode(java.lang.String parentid,
java.lang.String id,
java.lang.String uuid,
boolean visibleInNav)
|
protected SiteTreeNodeImpl |
addNode(java.lang.String parentid,
java.lang.String id,
java.lang.String uuid,
boolean visibleInNav,
java.lang.String href,
java.lang.String suffix,
boolean link)
|
protected SiteTreeNodeImpl |
addNode(java.lang.String parentPath,
java.lang.String name,
java.lang.String uuid,
boolean visibleInNav,
java.lang.String href,
java.lang.String suffix,
boolean link,
java.lang.String refpath)
|
void |
changed()
|
boolean |
contains(java.lang.String path)
|
boolean |
contains(java.lang.String path,
java.lang.String language)
|
boolean |
containsByUuid(java.lang.String uuid,
java.lang.String language)
|
boolean |
containsInAnyLanguage(java.lang.String uuid)
|
protected void |
copyLinks(SiteTreeNode source,
SiteTreeNode target)
|
org.w3c.dom.Document |
createDocument()
Create a new DefaultSiteTree xml document. |
protected void |
createParents(java.lang.String path)
|
protected org.w3c.dom.Node |
findNode(org.w3c.dom.Node node,
java.util.List ids)
Find a node in a subtree. |
java.lang.String |
getArea()
|
org.apache.lenya.cms.site.Link |
getByUuid(java.lang.String uuid,
java.lang.String language)
|
protected org.apache.lenya.cms.site.SiteNode |
getByUuidInternal(java.lang.String uuid,
java.lang.String language)
|
protected org.apache.lenya.cms.publication.DocumentFactory |
getFactory()
|
org.apache.lenya.cms.site.SiteNode |
getNode(java.lang.String path)
|
protected org.apache.lenya.cms.site.SiteNode |
getNodeByXpath(java.lang.String xPath)
|
org.apache.lenya.cms.site.SiteNode[] |
getNodes()
|
protected org.apache.lenya.cms.site.SiteNode[] |
getNodesByXpath(java.lang.String xPath)
|
org.apache.lenya.cms.publication.Publication |
getPublication()
|
org.apache.lenya.cms.repository.Node |
getRepositoryNode()
|
protected SiteTreeNodeImpl |
getRootNode()
|
org.apache.lenya.cms.repository.Session |
getSession()
|
org.apache.lenya.cms.site.SiteNode[] |
getTopLevelNodes()
|
void |
moveDown(java.lang.String path)
Move down the node amongst its siblings. |
void |
moveUp(java.lang.String path)
Move up the node amongst its siblings. |
org.apache.lenya.cms.site.SiteNode[] |
preOrder()
|
protected void |
removeLabel(java.lang.String path,
java.lang.String language)
|
protected SiteTreeNode |
removeNode(java.lang.String path)
|
void |
save()
|
protected void |
saveDocument()
|
protected void |
setLabel(java.lang.String path,
java.lang.String language,
java.lang.String label)
|
| 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 |
| Field Detail |
|---|
public static final java.lang.String NAMESPACE_URI
public static final java.lang.String SITE_TREE_FILENAME
protected org.apache.avalon.framework.service.ServiceManager manager
| Constructor Detail |
|---|
protected DefaultSiteTree(org.apache.lenya.cms.publication.DocumentFactory factory,
org.apache.lenya.cms.publication.Publication publication,
java.lang.String _area,
org.apache.avalon.framework.service.ServiceManager manager,
org.apache.avalon.framework.logger.Logger logger)
throws org.apache.lenya.cms.site.SiteException
factory - The document factory.publication - The publication._area - The area.manager - The service manager.logger - The logger.
org.apache.lenya.cms.site.SiteException - if an error occurs.| Method Detail |
|---|
protected void saveDocument()
throws org.apache.lenya.cms.site.SiteException
org.apache.lenya.cms.site.SiteException
public org.w3c.dom.Document createDocument()
throws javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.ParserConfigurationException - if an error occurs
protected org.w3c.dom.Node findNode(org.w3c.dom.Node node,
java.util.List ids)
node - where to start the searchids - list of node ids
protected void addNode(SiteTreeNode node,
java.lang.String refpath)
throws org.apache.lenya.cms.site.SiteException
org.apache.lenya.cms.site.SiteException
protected void copyLinks(SiteTreeNode source,
SiteTreeNode target)
throws org.apache.lenya.cms.site.SiteException
org.apache.lenya.cms.site.SiteException
protected void addNode(java.lang.String parentid,
java.lang.String id,
java.lang.String uuid,
boolean visibleInNav)
throws org.apache.lenya.cms.site.SiteException
org.apache.lenya.cms.site.SiteException
protected void addNode(SiteTreeNode node)
throws org.apache.lenya.cms.site.SiteException
org.apache.lenya.cms.site.SiteException
protected SiteTreeNodeImpl addNode(java.lang.String path,
java.lang.String uuid,
boolean visibleInNav,
java.lang.String href,
java.lang.String suffix,
boolean link,
java.lang.String refpath)
throws org.apache.lenya.cms.site.SiteException
org.apache.lenya.cms.site.SiteException
protected SiteTreeNodeImpl addNode(java.lang.String path,
java.lang.String uuid,
boolean visibleInNav,
java.lang.String href,
java.lang.String suffix,
boolean link)
throws org.apache.lenya.cms.site.SiteException
org.apache.lenya.cms.site.SiteException
protected SiteTreeNodeImpl addNode(java.lang.String parentid,
java.lang.String id,
java.lang.String uuid,
boolean visibleInNav,
java.lang.String href,
java.lang.String suffix,
boolean link)
throws org.apache.lenya.cms.site.SiteException
org.apache.lenya.cms.site.SiteException
protected void createParents(java.lang.String path)
throws org.apache.lenya.cms.site.SiteException
org.apache.lenya.cms.site.SiteException
protected SiteTreeNodeImpl addNode(java.lang.String parentPath,
java.lang.String name,
java.lang.String uuid,
boolean visibleInNav,
java.lang.String href,
java.lang.String suffix,
boolean link,
java.lang.String refpath)
throws org.apache.lenya.cms.site.SiteException
org.apache.lenya.cms.site.SiteException
protected void addLabel(java.lang.String path,
java.lang.String language,
java.lang.String label)
protected void removeLabel(java.lang.String path,
java.lang.String language)
protected SiteTreeNode removeNode(java.lang.String path)
public org.apache.lenya.cms.site.SiteNode getNode(java.lang.String path)
throws org.apache.lenya.cms.site.SiteException
getNode in interface org.apache.lenya.cms.site.SiteStructureorg.apache.lenya.cms.site.SiteExceptionSiteStructure.getNode(java.lang.String)
public void moveUp(java.lang.String path)
throws org.apache.lenya.cms.site.SiteException
moveUp in interface SiteTreepath - The document id for the node.
org.apache.lenya.cms.site.SiteException - if the moving failed.
public void moveDown(java.lang.String path)
throws org.apache.lenya.cms.site.SiteException
moveDown in interface SiteTreepath - The document id for the node.
org.apache.lenya.cms.site.SiteException - if the moving failed.
protected void setLabel(java.lang.String path,
java.lang.String language,
java.lang.String label)
public org.apache.lenya.cms.repository.Node getRepositoryNode()
getRepositoryNode in interface org.apache.lenya.cms.site.SiteStructureSiteStructure.getRepositoryNode()
public void save()
throws org.apache.lenya.cms.repository.RepositoryException
org.apache.lenya.cms.repository.RepositoryExceptionpublic java.lang.String getArea()
getArea in interface org.apache.lenya.cms.site.SiteStructurepublic org.apache.lenya.cms.publication.Publication getPublication()
getPublication in interface org.apache.lenya.cms.site.SiteStructurepublic boolean contains(java.lang.String path)
contains in interface org.apache.lenya.cms.site.SiteStructure
public boolean containsByUuid(java.lang.String uuid,
java.lang.String language)
containsByUuid in interface org.apache.lenya.cms.site.SiteStructure
protected org.apache.lenya.cms.site.SiteNode getByUuidInternal(java.lang.String uuid,
java.lang.String language)
protected org.apache.lenya.cms.site.SiteNode getNodeByXpath(java.lang.String xPath)
protected org.apache.lenya.cms.site.SiteNode[] getNodesByXpath(java.lang.String xPath)
public org.apache.lenya.cms.site.Link getByUuid(java.lang.String uuid,
java.lang.String language)
throws org.apache.lenya.cms.site.SiteException
getByUuid in interface org.apache.lenya.cms.site.SiteStructureorg.apache.lenya.cms.site.SiteExceptionprotected org.apache.lenya.cms.publication.DocumentFactory getFactory()
public org.apache.lenya.cms.site.Link add(java.lang.String path,
org.apache.lenya.cms.publication.Document doc)
throws org.apache.lenya.cms.site.SiteException
add in interface org.apache.lenya.cms.site.SiteStructureorg.apache.lenya.cms.site.SiteException
public org.apache.lenya.cms.site.SiteNode add(java.lang.String path)
throws org.apache.lenya.cms.site.SiteException
add in interface org.apache.lenya.cms.site.SiteStructureorg.apache.lenya.cms.site.SiteExceptionpublic boolean containsInAnyLanguage(java.lang.String uuid)
containsInAnyLanguage in interface org.apache.lenya.cms.site.SiteStructurepublic org.apache.lenya.cms.site.SiteNode[] getNodes()
getNodes in interface org.apache.lenya.cms.site.SiteStructure
public org.apache.lenya.cms.site.SiteNode add(java.lang.String path,
java.lang.String followingSiblingPath)
throws org.apache.lenya.cms.site.SiteException
add in interface org.apache.lenya.cms.site.SiteStructureorg.apache.lenya.cms.site.SiteExceptionpublic org.apache.lenya.cms.site.SiteNode[] getTopLevelNodes()
getTopLevelNodes in interface org.apache.lenya.cms.site.SiteStructureprotected SiteTreeNodeImpl getRootNode()
public boolean contains(java.lang.String path,
java.lang.String language)
contains in interface org.apache.lenya.cms.site.SiteStructurepublic org.apache.lenya.cms.repository.Session getSession()
getSession in interface org.apache.lenya.cms.repository.RepositoryItempublic org.apache.lenya.cms.site.SiteNode[] preOrder()
preOrder in interface SiteTreepublic void changed()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||