org.apache.lenya.cms.site.simple
Class SimpleSiteManager

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.lenya.cms.site.AbstractSiteManager
          extended by org.apache.lenya.cms.site.simple.SimpleSiteManager
All Implemented Interfaces:
org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, org.apache.lenya.cms.site.SiteManager

public class SimpleSiteManager
extends org.apache.lenya.cms.site.AbstractSiteManager
implements org.apache.avalon.framework.service.Serviceable

Simple site manager which does not imply structural information. The documents are stored in collections.

Version:
$Id: SimpleSiteManager.java 527520 2007-04-11 15:22:11Z andreas $

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.lenya.cms.site.AbstractSiteManager
org.apache.lenya.cms.site.AbstractSiteManager.NodeComparator
 
Field Summary
protected static java.lang.String DOCUMENT_PATH
           
 
Fields inherited from interface org.apache.lenya.cms.site.SiteManager
ROLE
 
Constructor Summary
SimpleSiteManager()
           
 
Method Summary
 void add(java.lang.String path, org.apache.lenya.cms.publication.Document document)
           
 boolean contains(org.apache.lenya.cms.publication.Document resource)
           
 boolean containsInAnyLanguage(org.apache.lenya.cms.publication.Document resource)
           
 void copy(org.apache.lenya.cms.publication.Document sourceDocument, org.apache.lenya.cms.publication.Document destinationDocument)
           
 org.apache.lenya.cms.publication.DocumentLocator getAvailableLocator(org.apache.lenya.cms.publication.DocumentFactory factory, org.apache.lenya.cms.publication.DocumentLocator document)
           
protected  java.lang.String getCollectionUuid(org.apache.lenya.cms.publication.Publication pub)
           
 org.apache.lenya.cms.publication.Document[] getDocuments(org.apache.lenya.cms.publication.DocumentFactory identityMap, org.apache.lenya.cms.publication.Publication publication, java.lang.String area)
           
protected  java.lang.String getKey(org.apache.lenya.cms.publication.Publication publication, java.lang.String area)
           
 org.apache.lenya.cms.publication.DocumentLocator[] getRequiredResources(org.apache.lenya.cms.publication.DocumentFactory map, org.apache.lenya.cms.publication.DocumentLocator locator)
           
 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  DocumentStore getStore(org.apache.lenya.cms.publication.DocumentFactory map, org.apache.lenya.cms.publication.Publication publication, java.lang.String area)
           
 boolean isVisibleInNav(org.apache.lenya.cms.publication.Document document)
           
 boolean requires(org.apache.lenya.cms.publication.DocumentFactory map, org.apache.lenya.cms.site.SiteNode dependingResource, org.apache.lenya.cms.site.SiteNode requiredResource)
           
 void service(org.apache.avalon.framework.service.ServiceManager manager)
           
 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, 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
 

Field Detail

DOCUMENT_PATH

protected static final java.lang.String DOCUMENT_PATH
See Also:
Constant Field Values
Constructor Detail

SimpleSiteManager

public SimpleSiteManager()
Method Detail

service

public void service(org.apache.avalon.framework.service.ServiceManager manager)
             throws org.apache.avalon.framework.service.ServiceException
Specified by:
service in interface org.apache.avalon.framework.service.Serviceable
Overrides:
service in class org.apache.lenya.cms.site.AbstractSiteManager
Throws:
org.apache.avalon.framework.service.ServiceException
See Also:
Serviceable.service(org.apache.avalon.framework.service.ServiceManager)

requires

public boolean requires(org.apache.lenya.cms.publication.DocumentFactory map,
                        org.apache.lenya.cms.site.SiteNode dependingResource,
                        org.apache.lenya.cms.site.SiteNode requiredResource)
                 throws org.apache.lenya.cms.site.SiteException
Specified by:
requires in interface org.apache.lenya.cms.site.SiteManager
Throws:
org.apache.lenya.cms.site.SiteException
See Also:
SiteManager.requires(org.apache.lenya.cms.publication.DocumentFactory, org.apache.lenya.cms.site.SiteNode, org.apache.lenya.cms.site.SiteNode)

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
Specified by:
getRequiringResources in interface org.apache.lenya.cms.site.SiteManager
Throws:
org.apache.lenya.cms.site.SiteException
See Also:
SiteManager.getRequiringResources(org.apache.lenya.cms.publication.DocumentFactory, org.apache.lenya.cms.site.SiteNode)

add

public void add(java.lang.String path,
                org.apache.lenya.cms.publication.Document document)
         throws org.apache.lenya.cms.site.SiteException
Specified by:
add in interface org.apache.lenya.cms.site.SiteManager
Throws:
org.apache.lenya.cms.site.SiteException

getStore

protected DocumentStore getStore(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
Parameters:
map - The identity map.
publication - The publication.
area - The area.
Returns:
A document store.
Throws:
org.apache.lenya.cms.site.SiteException - if an error occurs.

getCollectionUuid

protected java.lang.String getCollectionUuid(org.apache.lenya.cms.publication.Publication pub)

getKey

protected java.lang.String getKey(org.apache.lenya.cms.publication.Publication publication,
                                  java.lang.String area)
Parameters:
publication - The publication.
area - The area.
Returns:
The key to store sitetree objects in the identity map.

contains

public boolean contains(org.apache.lenya.cms.publication.Document resource)
                 throws org.apache.lenya.cms.site.SiteException
Specified by:
contains in interface org.apache.lenya.cms.site.SiteManager
Throws:
org.apache.lenya.cms.site.SiteException
See Also:
SiteManager.contains(org.apache.lenya.cms.publication.Document)

containsInAnyLanguage

public boolean containsInAnyLanguage(org.apache.lenya.cms.publication.Document resource)
                              throws org.apache.lenya.cms.site.SiteException
Specified by:
containsInAnyLanguage in interface org.apache.lenya.cms.site.SiteManager
Throws:
org.apache.lenya.cms.site.SiteException
See Also:
SiteManager.containsInAnyLanguage(org.apache.lenya.cms.publication.Document)

copy

public void copy(org.apache.lenya.cms.publication.Document sourceDocument,
                 org.apache.lenya.cms.publication.Document destinationDocument)
          throws org.apache.lenya.cms.site.SiteException
Specified by:
copy in interface org.apache.lenya.cms.site.SiteManager
Throws:
org.apache.lenya.cms.site.SiteException
See Also:
SiteManager.copy(org.apache.lenya.cms.publication.Document, org.apache.lenya.cms.publication.Document)

setVisibleInNav

public void setVisibleInNav(org.apache.lenya.cms.publication.Document document,
                            boolean visibleInNav)
                     throws org.apache.lenya.cms.site.SiteException
Specified by:
setVisibleInNav in interface org.apache.lenya.cms.site.SiteManager
Throws:
org.apache.lenya.cms.site.SiteException
See Also:
SiteManager.setVisibleInNav(org.apache.lenya.cms.publication.Document, boolean)

getDocuments

public org.apache.lenya.cms.publication.Document[] getDocuments(org.apache.lenya.cms.publication.DocumentFactory identityMap,
                                                                org.apache.lenya.cms.publication.Publication publication,
                                                                java.lang.String area)
                                                         throws org.apache.lenya.cms.site.SiteException
Specified by:
getDocuments in interface org.apache.lenya.cms.site.SiteManager
Throws:
org.apache.lenya.cms.site.SiteException
See Also:
SiteManager.getDocuments(org.apache.lenya.cms.publication.DocumentFactory, org.apache.lenya.cms.publication.Publication, java.lang.String)

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
Specified by:
getSiteStructure in interface org.apache.lenya.cms.site.SiteManager
Throws:
org.apache.lenya.cms.site.SiteException
See Also:
SiteManager.getSiteStructure(org.apache.lenya.cms.publication.DocumentFactory, org.apache.lenya.cms.publication.Publication, java.lang.String)

getAvailableLocator

public org.apache.lenya.cms.publication.DocumentLocator getAvailableLocator(org.apache.lenya.cms.publication.DocumentFactory factory,
                                                                            org.apache.lenya.cms.publication.DocumentLocator document)
                                                                     throws org.apache.lenya.cms.site.SiteException
Specified by:
getAvailableLocator in interface org.apache.lenya.cms.site.SiteManager
Throws:
org.apache.lenya.cms.site.SiteException
See Also:
SiteManager.getAvailableLocator(DocumentFactory, DocumentLocator)

isVisibleInNav

public boolean isVisibleInNav(org.apache.lenya.cms.publication.Document document)
                       throws org.apache.lenya.cms.site.SiteException
Specified by:
isVisibleInNav in interface org.apache.lenya.cms.site.SiteManager
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
Specified by:
set in interface org.apache.lenya.cms.site.SiteManager
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 locator)
                                                                        throws org.apache.lenya.cms.site.SiteException
Specified by:
getRequiredResources in interface org.apache.lenya.cms.site.SiteManager
Throws:
org.apache.lenya.cms.site.SiteException


Copyright © $ Apache Software Foundation. All Rights Reserved.