org.apache.lenya.cms.cocoon.source
Class FallbackSourceFactory

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.lenya.cms.cocoon.source.FallbackSourceFactory
All Implemented Interfaces:
org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, org.apache.excalibur.source.SourceFactory, org.apache.excalibur.source.URIAbsolutizer
Direct Known Subclasses:
TemplateFallbackSourceFactory

public class FallbackSourceFactory
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements org.apache.excalibur.source.SourceFactory, org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.context.Contextualizable, org.apache.excalibur.source.URIAbsolutizer

Source factory following the fallback principle.

The ID of the current publication can be passed in the URL (fallback:pub://path

Version:
$Id: FallbackSourceFactory.java 590743 2007-10-31 16:48:56Z andreas $

Field Summary
 
Fields inherited from interface org.apache.excalibur.source.SourceFactory
ROLE
 
Constructor Summary
FallbackSourceFactory()
          Ctor.
 
Method Summary
 java.lang.String absolutize(java.lang.String baseURI, java.lang.String location)
           
 void contextualize(org.apache.avalon.framework.context.Context _context)
           
 org.apache.excalibur.source.Source getSource(java.lang.String location, java.util.Map parameters)
           
protected  VisitingSourceResolver getSourceVisitor()
           
 void release(org.apache.excalibur.source.Source source)
           
 void service(org.apache.avalon.framework.service.ServiceManager _manager)
           
 
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

FallbackSourceFactory

public FallbackSourceFactory()
Ctor.

Method Detail

getSource

public org.apache.excalibur.source.Source getSource(java.lang.String location,
                                                    java.util.Map parameters)
                                             throws java.io.IOException,
                                                    java.net.MalformedURLException
Specified by:
getSource in interface org.apache.excalibur.source.SourceFactory
Throws:
java.io.IOException
java.net.MalformedURLException
See Also:
SourceFactory.getSource(java.lang.String, java.util.Map)

getSourceVisitor

protected VisitingSourceResolver getSourceVisitor()

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
Throws:
org.apache.avalon.framework.service.ServiceException
See Also:
Serviceable.service(org.apache.avalon.framework.service.ServiceManager)

contextualize

public void contextualize(org.apache.avalon.framework.context.Context _context)
                   throws org.apache.avalon.framework.context.ContextException
Specified by:
contextualize in interface org.apache.avalon.framework.context.Contextualizable
Throws:
org.apache.avalon.framework.context.ContextException
See Also:
Contextualizable.contextualize(org.apache.avalon.framework.context.Context)

release

public void release(org.apache.excalibur.source.Source source)
Specified by:
release in interface org.apache.excalibur.source.SourceFactory
See Also:
SourceFactory.release(org.apache.excalibur.source.Source)

absolutize

public java.lang.String absolutize(java.lang.String baseURI,
                                   java.lang.String location)
Specified by:
absolutize in interface org.apache.excalibur.source.URIAbsolutizer
See Also:
URIAbsolutizer.absolutize(java.lang.String, java.lang.String)


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