org.apache.cocoon.sitemap
Class Manager

java.lang.Object
  |
  +--org.apache.avalon.framework.logger.AbstractLoggable
        |
        +--org.apache.cocoon.sitemap.Manager
All Implemented Interfaces:
org.apache.avalon.framework.component.Component, org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.logger.Loggable, org.apache.avalon.excalibur.logger.LogKitManageable, org.apache.avalon.framework.thread.ThreadSafe
Direct Known Subclasses:
SitemapManager

public class Manager
extends org.apache.avalon.framework.logger.AbstractLoggable
implements org.apache.avalon.framework.component.Component, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.component.Composable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.thread.ThreadSafe, org.apache.avalon.excalibur.logger.LogKitManageable, org.apache.avalon.framework.activity.Disposable

This class manages all sub Sitemaps of a Sitemap Invokation of sub sitemaps will be done by this instance as well checking regeneration of the sub Sitemap

Version:
CVS $Id: Manager.java,v 1.9 2002/02/22 07:03:55 cziegeler Exp $
Author:
Giacomo Pati

Field Summary
protected  org.apache.avalon.framework.configuration.Configuration conf
          The configuration
protected  org.apache.avalon.framework.context.Context context
           
protected  java.lang.Class handlerClass
           
protected  org.apache.avalon.framework.component.ComponentManager manager
          The component manager
protected  org.apache.avalon.excalibur.logger.LogKitManager sitemapLogKitManager
          The sitemap logkit manager
protected  org.apache.avalon.excalibur.component.RoleManager sitemapRoles
          The sitemap role manager
protected  java.util.HashMap sitemaps
          The vectors of sub sitemaps
 
Constructor Summary
Manager()
           
 
Method Summary
 void compose(org.apache.avalon.framework.component.ComponentManager manager)
          get a component manager
 void configure(org.apache.avalon.framework.configuration.Configuration conf)
          get a configuration
 void contextualize(org.apache.avalon.framework.context.Context context)
          get a context
 void dispose()
          Disposable
protected  void generateSitemap(java.lang.String sitemapFileName, Environment environment)
           
 boolean hasChanged()
          has the sitemap changed
 boolean invoke(org.apache.avalon.framework.component.ComponentManager newManager, Environment environment, java.lang.String uri_prefix, java.lang.String source, boolean check_reload, boolean reload_asynchron)
          invokes the sitemap handler to process a request
 boolean invoke(org.apache.avalon.framework.component.ComponentManager newManager, Environment environment, java.lang.String uri_prefix, java.lang.String source, boolean check_reload, boolean reload_asynchron, StreamPipeline pipeline, EventPipeline eventPipeline)
          invokes the sitemap handler to process a request
 void setLogKitManager(org.apache.avalon.excalibur.logger.LogKitManager logkit)
          Set the logkit manager
 void setRoleManager(org.apache.avalon.excalibur.component.RoleManager roles)
          Set the role manager
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLoggable
getLogger, setLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected org.apache.avalon.framework.context.Context context

sitemaps

protected java.util.HashMap sitemaps
The vectors of sub sitemaps

conf

protected org.apache.avalon.framework.configuration.Configuration conf
The configuration

manager

protected org.apache.avalon.framework.component.ComponentManager manager
The component manager

sitemapRoles

protected org.apache.avalon.excalibur.component.RoleManager sitemapRoles
The sitemap role manager

sitemapLogKitManager

protected org.apache.avalon.excalibur.logger.LogKitManager sitemapLogKitManager
The sitemap logkit manager

handlerClass

protected java.lang.Class handlerClass
Constructor Detail

Manager

public Manager()
Method Detail

setRoleManager

public void setRoleManager(org.apache.avalon.excalibur.component.RoleManager roles)
Set the role manager

setLogKitManager

public void setLogKitManager(org.apache.avalon.excalibur.logger.LogKitManager logkit)
Set the logkit manager
Specified by:
setLogKitManager in interface org.apache.avalon.excalibur.logger.LogKitManageable

configure

public void configure(org.apache.avalon.framework.configuration.Configuration conf)
               throws org.apache.avalon.framework.configuration.ConfigurationException
get a configuration
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Parameters:
conf - the configuration

contextualize

public void contextualize(org.apache.avalon.framework.context.Context context)
                   throws org.apache.avalon.framework.context.ContextException
get a context
Specified by:
contextualize in interface org.apache.avalon.framework.context.Contextualizable
Parameters:
context - the context object

compose

public void compose(org.apache.avalon.framework.component.ComponentManager manager)
get a component manager
Specified by:
compose in interface org.apache.avalon.framework.component.Composable
Parameters:
manager - the component manager

invoke

public boolean invoke(org.apache.avalon.framework.component.ComponentManager newManager,
                      Environment environment,
                      java.lang.String uri_prefix,
                      java.lang.String source,
                      boolean check_reload,
                      boolean reload_asynchron)
               throws java.lang.Exception
invokes the sitemap handler to process a request
Parameters:
environment - the environment
uri_prefix - the prefix to the URI
source - the source of the sitemap
check_reload - should the sitemap be automagically reloaded
reload_asynchron - should the sitemap be reloaded asynchron
Returns:
states if the requested resource was produced
Throws:
java.lang.Exception - there may be several excpetions thrown

invoke

public boolean invoke(org.apache.avalon.framework.component.ComponentManager newManager,
                      Environment environment,
                      java.lang.String uri_prefix,
                      java.lang.String source,
                      boolean check_reload,
                      boolean reload_asynchron,
                      StreamPipeline pipeline,
                      EventPipeline eventPipeline)
               throws java.lang.Exception
invokes the sitemap handler to process a request
Parameters:
environment - the environment
uri_prefix - the prefix to the URI
source - the source of the sitemap
check_reload - should the sitemap be automagically reloaded
reload_asynchron - should the sitemap be reloaded asynchron
Returns:
states if the requested resource was produced
Throws:
java.lang.Exception - there may be several excpetions thrown

hasChanged

public boolean hasChanged()
has the sitemap changed
Returns:
whether the sitemap file has changed

generateSitemap

protected void generateSitemap(java.lang.String sitemapFileName,
                               Environment environment)
                        throws java.lang.Exception

dispose

public void dispose()
Disposable
Specified by:
dispose in interface org.apache.avalon.framework.activity.Disposable


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