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

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.lenya.cms.cocoon.source.LenyaSourceFactory
All Implemented Interfaces:
org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.thread.ThreadSafe, org.apache.excalibur.source.SourceFactory

public class LenyaSourceFactory
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements org.apache.excalibur.source.SourceFactory, org.apache.avalon.framework.thread.ThreadSafe, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.service.Serviceable

A factory for the "lenya" scheme (virtual protocol), which is used to resolve any src="lenya:..." attributes in sitemaps. This implementation constructs the path to the source document from the page envelope and delegates any further resolving to the "context" source resolver of Cocoon.

Version:
$Id: LenyaSourceFactory.java 533723 2007-04-30 12:34:26Z andreas $

Field Summary
protected static java.lang.String DEFAULT_DELEGATION_PREFIX
           
protected static java.lang.String DEFAULT_DELEGATION_SCHEME
          fallback if no configuration is available
protected static java.lang.String SCHEME
           
 
Fields inherited from interface org.apache.excalibur.source.SourceFactory
ROLE
 
Constructor Summary
LenyaSourceFactory()
           
 
Method Summary
 void contextualize(org.apache.avalon.framework.context.Context _context)
          Used for resolving the object model.
protected  Session getSession(java.lang.String sessionName)
           
 org.apache.excalibur.source.Source getSource(java.lang.String location, java.util.Map parameters)
           
protected  Session getUsecaseSession(java.util.Map objectModel)
           
 void release(org.apache.excalibur.source.Source source)
          Does nothing because the delegated factory does this.
 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
 

Field Detail

SCHEME

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

DEFAULT_DELEGATION_SCHEME

protected static final java.lang.String DEFAULT_DELEGATION_SCHEME
fallback if no configuration is available

See Also:
Constant Field Values

DEFAULT_DELEGATION_PREFIX

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

LenyaSourceFactory

public LenyaSourceFactory()
Method Detail

contextualize

public void contextualize(org.apache.avalon.framework.context.Context _context)
                   throws org.apache.avalon.framework.context.ContextException
Used for resolving the object model.

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)

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)

getSource

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

getSession

protected Session getSession(java.lang.String sessionName)
                      throws RepositoryException
Throws:
RepositoryException

getUsecaseSession

protected Session getUsecaseSession(java.util.Map objectModel)
                             throws RepositoryException
Throws:
RepositoryException

release

public void release(org.apache.excalibur.source.Source source)
Does nothing because the delegated factory does this.

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


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