Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.lenya.cms.cocoon.components.modules.input
Class FallbackModule  view FallbackModule download FallbackModule.java

java.lang.Object
  extended byAbstractLogEnabled
      extended byorg.apache.cocoon.components.modules.input.AbstractInputModule
          extended byorg.apache.lenya.cms.cocoon.components.modules.input.AbstractPageEnvelopeModule
              extended byorg.apache.lenya.cms.cocoon.components.modules.input.FallbackModule
All Implemented Interfaces:
org.apache.cocoon.components.modules.input.InputModule
Direct Known Subclasses:
PublicationFallbackModule

public class FallbackModule
extends AbstractPageEnvelopeModule

This module checks if a file exists in a publiation, and if not, it chooses the core file. The attribute name must a path relatively to the webapps/lenya/lenya directory.

Example: {fallback:xslt/style.xsl} looks if lenya/pubs/(publication-id)/lenya/xslt/style.xsl exists, and if not, it uses lenya/xslt/style.xsl.


Field Summary
protected static java.lang.String ATTRIBUTE_SRC
           
private  java.lang.String[] baseUris
           
protected static java.lang.String ELEMENT_PATH
           
private  ServiceManager manager
           
static java.lang.String PATH_PREFIX
           
 
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
FallbackModule()
           
 
Method Summary
 void configure(Configuration conf)
          Configures the database access helper.
 java.lang.Object getAttribute(java.lang.String name, Configuration modeConf, java.util.Map objectModel)
          Standard access to an attribute's value.
 java.util.Iterator getAttributeNames(Configuration modeConf, java.util.Map objectModel)
          Returns an Iterator of String objects containing the names of the attributes available.
 java.lang.Object[] getAttributeValues(java.lang.String name, Configuration modeConf, java.util.Map objectModel)
          Returns an array of String objects containing all of the values the given attribute has, or null if the attribute does not exist.
protected  java.lang.String[] getBaseURIs(java.util.Map objectModel)
          Returns the base directory URIs in the order they should be traversed.
protected  java.lang.String resolveURI(java.lang.String path, java.util.Map objectModel)
          Resolves the URI for a certain path.
 void service(ServiceManager manager)
           
 
Methods inherited from class org.apache.lenya.cms.cocoon.components.modules.input.AbstractPageEnvelopeModule
getEnvelope
 
Methods inherited from class org.apache.cocoon.components.modules.input.AbstractInputModule
dispose
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

manager

private ServiceManager manager

baseUris

private java.lang.String[] baseUris

PATH_PREFIX

public static final java.lang.String PATH_PREFIX
See Also:
Constant Field Values

ELEMENT_PATH

protected static final java.lang.String ELEMENT_PATH
See Also:
Constant Field Values

ATTRIBUTE_SRC

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

FallbackModule

public FallbackModule()
Method Detail

configure

public void configure(Configuration conf)
               throws ConfigurationException
Description copied from class: org.apache.cocoon.components.modules.input.AbstractInputModule
Configures the database access helper. Takes all elements nested in component declaration and stores them as key-value pairs in settings. Nested configuration option are not catered for. This way global configuration options can be used. For nested configurations override this function.


getAttribute

public java.lang.Object getAttribute(java.lang.String name,
                                     Configuration modeConf,
                                     java.util.Map objectModel)
                              throws ConfigurationException
Description copied from interface: org.apache.cocoon.components.modules.input.InputModule
Standard access to an attribute's value. If more than one value exists, the first is returned. If the value does not exist, null is returned. To get all values, use getAttributeSet 55 or getAttributeNames 55 and getAttribute 55 to get them one by one.


resolveURI

protected java.lang.String resolveURI(java.lang.String path,
                                      java.util.Map objectModel)
                               throws ConfigurationException
Resolves the URI for a certain path.


getBaseURIs

protected java.lang.String[] getBaseURIs(java.util.Map objectModel)
                                  throws ConfigurationException
Returns the base directory URIs in the order they should be traversed.


getAttributeNames

public java.util.Iterator getAttributeNames(Configuration modeConf,
                                            java.util.Map objectModel)
                                     throws ConfigurationException
Description copied from interface: org.apache.cocoon.components.modules.input.InputModule
Returns an Iterator of String objects containing the names of the attributes available. If no attributes are available, the method returns an empty Iterator.


getAttributeValues

public java.lang.Object[] getAttributeValues(java.lang.String name,
                                             Configuration modeConf,
                                             java.util.Map objectModel)
                                      throws ConfigurationException
Description copied from interface: org.apache.cocoon.components.modules.input.InputModule
Returns an array of String objects containing all of the values the given attribute has, or null if the attribute does not exist. As an alternative, getAttributeNames 55 together with getAttribute 55 can be used to get the values one by one.


service

public void service(ServiceManager manager)
             throws ServiceException