org.apache.lenya.cms.cocoon.components.modules.input
Class PublicationTemplateFallbackModule

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.components.modules.input.AbstractInputModule
          extended by org.apache.lenya.cms.cocoon.components.modules.input.OperationModule
              extended by org.apache.lenya.cms.cocoon.components.modules.input.AbstractPageEnvelopeModule
                  extended by org.apache.lenya.cms.cocoon.components.modules.input.PublicationTemplateFallbackModule
All Implemented Interfaces:
org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.component.Component, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, org.apache.cocoon.components.modules.input.InputModule

public class PublicationTemplateFallbackModule
extends AbstractPageEnvelopeModule

This module uses publication templating to resolve the real path for a resource. The current publication ID can be provided as a parameter: {fallback:{pub-id}:foo/bar}. This is especially useful for cocoon:// request which are triggered from non-environment components (e.g. the scheduler).

Version:
$Id: PublicationTemplateFallbackModule.java 473861 2006-11-12 03:51:14Z gregor $

Field Summary
 
Fields inherited from class org.apache.lenya.cms.cocoon.components.modules.input.OperationModule
manager
 
Fields inherited from class org.apache.cocoon.components.modules.input.AbstractInputModule
settings
 
Fields inherited from interface org.apache.cocoon.components.modules.input.InputModule
ROLE
 
Constructor Summary
PublicationTemplateFallbackModule()
          Ctor.
 
Method Summary
 java.lang.Object getAttribute(java.lang.String name, org.apache.avalon.framework.configuration.Configuration modeConf, java.util.Map objectModel)
           
static java.lang.String getBaseURI(Publication publication)
          Returns the base URI for a certain publication.
protected  java.lang.String getLenyaBaseURI(Publication publication)
          Returns the base URI for a certain publication including the prefix "lenya".
 
Methods inherited from class org.apache.lenya.cms.cocoon.components.modules.input.AbstractPageEnvelopeModule
getAttributeName, getEnvelope
 
Methods inherited from class org.apache.lenya.cms.cocoon.components.modules.input.OperationModule
contextualize, getDocumentFactory, initialize, service
 
Methods inherited from class org.apache.cocoon.components.modules.input.AbstractInputModule
configure, dispose, getAttributeNames, getAttributeValues
 
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
 

Constructor Detail

PublicationTemplateFallbackModule

public PublicationTemplateFallbackModule()
Ctor.

Method Detail

getAttribute

public java.lang.Object getAttribute(java.lang.String name,
                                     org.apache.avalon.framework.configuration.Configuration modeConf,
                                     java.util.Map objectModel)
                              throws org.apache.avalon.framework.configuration.ConfigurationException
Specified by:
getAttribute in interface org.apache.cocoon.components.modules.input.InputModule
Overrides:
getAttribute in class org.apache.cocoon.components.modules.input.AbstractInputModule
Throws:
org.apache.avalon.framework.configuration.ConfigurationException
See Also:
InputModule.getAttribute(java.lang.String, org.apache.avalon.framework.configuration.Configuration, java.util.Map)

getBaseURI

public static java.lang.String getBaseURI(Publication publication)
Returns the base URI for a certain publication.

Parameters:
publication - The publication.
Returns:
A string.

getLenyaBaseURI

protected java.lang.String getLenyaBaseURI(Publication publication)
Returns the base URI for a certain publication including the prefix "lenya".

Parameters:
publication - The publication.
Returns:
A string.


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