org.apache.lenya.cms.site
Interface SiteStructure

All Superinterfaces:
RepositoryItem

public interface SiteStructure
extends RepositoryItem

Object to hold a site structure information.

Version:
$Id: SiteStructure.java 487598 2006-12-15 17:01:14Z andreas $

Method Summary
 SiteNode add(java.lang.String path)
          Adds a site node.
 Link add(java.lang.String path, Document doc)
          Adds a link to a document.
 SiteNode add(java.lang.String path, java.lang.String followingSiblingPath)
          Adds a site node before a specific other node.
 boolean contains(java.lang.String path)
          Checks if a node is contained for a certain path.
 boolean contains(java.lang.String path, java.lang.String language)
          Checks if a link is contained for a certain path and language.
 boolean containsByUuid(java.lang.String uuid, java.lang.String language)
          Checks if the structure contains a link with a certain UUID and language.
 boolean containsInAnyLanguage(java.lang.String uuid)
          Checks if the structure contains any language version of a document.
 java.lang.String getArea()
           
 Link getByUuid(java.lang.String uuid, java.lang.String language)
          Returns a node for a certain UUID.
 SiteNode getNode(java.lang.String path)
           
 SiteNode[] getNodes()
           
 Publication getPublication()
           
 Node getRepositoryNode()
           
 SiteNode[] getTopLevelNodes()
           
 
Methods inherited from interface org.apache.lenya.cms.repository.RepositoryItem
getSession
 

Method Detail

getRepositoryNode

Node getRepositoryNode()
Returns:
The repository node the site structure is stored in.

getPublication

Publication getPublication()
Returns:
The publication.

getArea

java.lang.String getArea()
Returns:
The area.

getNodes

SiteNode[] getNodes()
Returns:
All nodes in this structure.

getNode

SiteNode getNode(java.lang.String path)
                 throws SiteException
Parameters:
path - The path.
Returns:
A site node.
Throws:
SiteException - if no node is contained for the path.

contains

boolean contains(java.lang.String path)
Checks if a node is contained for a certain path.

Parameters:
path - The path.
Returns:
A boolean value.

contains

boolean contains(java.lang.String path,
                 java.lang.String language)
Checks if a link is contained for a certain path and language.

Parameters:
path - The path.
language - The language.
Returns:
A boolean value.

containsByUuid

boolean containsByUuid(java.lang.String uuid,
                       java.lang.String language)
Checks if the structure contains a link with a certain UUID and language.

Parameters:
uuid - The UUID.
language - The language.
Returns:
A boolean value.

containsInAnyLanguage

boolean containsInAnyLanguage(java.lang.String uuid)
Checks if the structure contains any language version of a document.

Parameters:
uuid - The uuid.
Returns:
A boolean value.

getByUuid

Link getByUuid(java.lang.String uuid,
               java.lang.String language)
               throws SiteException
Returns a node for a certain UUID.

Parameters:
uuid - The UUID.
language - The language.
Returns:
a link.
Throws:
SiteException - if no node is contained for the UUID.

add

Link add(java.lang.String path,
         Document doc)
         throws SiteException
Adds a link to a document.

Parameters:
path - The path.
doc - The document.
Returns:
A link.
Throws:
SiteException - if the document is already contained or the node for this path already contains a link for this language.

add

SiteNode add(java.lang.String path)
             throws SiteException
Adds a site node.

Parameters:
path - The path.
Returns:
A site node.
Throws:
SiteException - if the path is already contained.

add

SiteNode add(java.lang.String path,
             java.lang.String followingSiblingPath)
             throws SiteException
Adds a site node before a specific other node.

Parameters:
path - The path.
followingSiblingPath - The path of the node which will be the following sibling of the node to insert.
Returns:
A site node.
Throws:
SiteException - if the path is already contained.

getTopLevelNodes

SiteNode[] getTopLevelNodes()
Returns:
The top level nodes.


Copyright © 1999-2006 Apache Software Foundation. All Rights Reserved.