| org.apache.lenya.cms.site.SiteManager
All known Subclasses: org.apache.lenya.cms.site.AbstractSiteManager,
SiteManager | public interface SiteManager (Code) | |
A site structure management component.
A site manager has a dependence relation, which is always applied to documents of a single
language. This means a document may not require a document of another language. Dependence on a
set of resources must be a strict partial order < :
- irreflexive: d < d does not hold for any resource d
- antisymmetric: d < e and e < d implies
d=e
- transitive: d < e and e < f implies d
< f
version: $Id: SiteManager.java 475069 2006-11-15 00:01:13Z andreas $ |
Method Summary | |
void | add(String path, Document document) Adds a document to the site structure. | boolean | contains(Document resource) Checks if the site structure contains a certain resource in a certain area.
Parameters: resource - The resource. | boolean | containsInAnyLanguage(Document resource) Checks if the site structure contains any language version of a certain resource in a certain
area.
Parameters: resource - The resource. | void | copy(Document sourceDocument, Document destinationDocument) Copies a document in the site structure. | DocumentLocator | getAvailableLocator(DocumentFactory factory, DocumentLocator locator) Checks if the document does already exist. | Document[] | getDocuments(DocumentFactory identityMap, Publication publication, String area) Returns all documents in a certain area.
Parameters: identityMap - The identityMap to use. Parameters: publication - The publication. Parameters: area - The area. | DocumentLocator[] | getRequiredResources(DocumentFactory map, DocumentLocator locator) Returns the resources which are required by a certain resource.
Parameters: map - The identity map to operate on. Parameters: locator - The depending locator. | SiteNode[] | getRequiringResources(DocumentFactory map, SiteNode resource) Returns the resources which require a certain resource.
Parameters: map - The identity map to operate on. Parameters: resource - The required resource. | SiteStructure | getSiteStructure(DocumentFactory map, Publication publication, String area) Parameters: map - The identity map. Parameters: publication - The publication. Parameters: area - The area. | boolean | isVisibleInNav(Document document) Returns the visibility of a node in the navigation.
Parameters: document - The document. | boolean | requires(DocumentFactory map, SiteNode dependingResource, SiteNode requiredResource) Checks if a resource requires another one.
Parameters: map - The identity map to operate on. Parameters: dependingResource - The depending resource. Parameters: requiredResource - The required resource. | void | set(String path, Document document) Sets a document to the site structure. | void | setVisibleInNav(Document document, boolean visibleInNav) Sets the visibility of a node in the navigation. | SiteNode[] | sortAscending(SiteNode[] nodes) Sorts a set of nodes using the "requires" relation.
Parameters: nodes - The set. |
add | void add(String path, Document document) throws SiteException(Code) | | Adds a document to the site structure.
Parameters: path - The path. Parameters: document - The document to add. throws: SiteException - if the document is already contained. |
contains | boolean contains(Document resource) throws SiteException(Code) | | Checks if the site structure contains a certain resource in a certain area.
Parameters: resource - The resource. A boolean value. throws: SiteException - if an error occurs. |
containsInAnyLanguage | boolean containsInAnyLanguage(Document resource) throws SiteException(Code) | | Checks if the site structure contains any language version of a certain resource in a certain
area.
Parameters: resource - The resource. A boolean value. throws: SiteException - if an error occurs. |
copy | void copy(Document sourceDocument, Document destinationDocument) throws SiteException(Code) | | Copies a document in the site structure.
Parameters: sourceDocument - The source document. Parameters: destinationDocument - The destination document. throws: SiteException - when something went wrong. |
getAvailableLocator | DocumentLocator getAvailableLocator(DocumentFactory factory, DocumentLocator locator) throws SiteException(Code) | | Checks if the document does already exist. If it does, returns a non-existing document with a
similar document ID. If it does not, the original document is returned.
Parameters: factory - The document factory. Parameters: locator - The locator. A locator. throws: SiteException - if the new document could not be built. |
getRequiringResources | SiteNode[] getRequiringResources(DocumentFactory map, SiteNode resource) throws SiteException(Code) | | Returns the resources which require a certain resource.
Parameters: map - The identity map to operate on. Parameters: resource - The required resource. An array of resources. throws: SiteException - if an error occurs. |
isVisibleInNav | boolean isVisibleInNav(Document document) throws SiteException(Code) | | Returns the visibility of a node in the navigation.
Parameters: document - The document. A boolean value. throws: SiteException - if an error occurs. |
requires | boolean requires(DocumentFactory map, SiteNode dependingResource, SiteNode requiredResource) throws SiteException(Code) | | Checks if a resource requires another one.
Parameters: map - The identity map to operate on. Parameters: dependingResource - The depending resource. Parameters: requiredResource - The required resource. A boolean value. throws: SiteException - if an error occurs. |
set | void set(String path, Document document) throws SiteException(Code) | | Sets a document to the site structure.
Parameters: path - The path. Parameters: document - The document to add. throws: SiteException - if the document is already contained or if the path doesn't exist. |
setVisibleInNav | void setVisibleInNav(Document document, boolean visibleInNav) throws SiteException(Code) | | Sets the visibility of a node in the navigation. It is meant to hide specific nodes within
the "public" navigation whereas the node is visible within the info/site area.
Parameters: document - The document. Parameters: visibleInNav - The visibility. throws: SiteException - if an error occurs. |
|
|