org.apache.cocoon.components.source.impl
Class ContextSourceFactory
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.components.source.impl.ContextSourceFactory
- All Implemented Interfaces:
- Contextualizable, LogEnabled, Serviceable, ThreadSafe, SourceFactory, URIAbsolutizer
public class ContextSourceFactory
- extends AbstractLogEnabled
- implements SourceFactory, Serviceable, Contextualizable, ThreadSafe, URIAbsolutizer
A factory for the context protocol using the context of the servlet api.
It builds the source by asking the environment context for the real URL
(see Context.getResource(String)
)
and then resolving this real URL.
- Version:
- CVS $Id: ContextSourceFactory.html 1304258 2012-03-23 10:09:27Z ilgrosso $
- Author:
- Carsten Ziegeler, Sylvain Wallez
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
envContext
protected Context envContext
- The context
manager
protected ServiceManager manager
- The ServiceManager
ContextSourceFactory
public ContextSourceFactory()
service
public void service(ServiceManager manager)
throws ServiceException
- Specified by:
service
in interface Serviceable
- Throws:
ServiceException
contextualize
public void contextualize(Context context)
throws ContextException
- Specified by:
contextualize
in interface Contextualizable
- Throws:
ContextException
getSource
public Source getSource(String location,
Map parameters)
throws SourceException,
MalformedURLException,
IOException
- Specified by:
getSource
in interface SourceFactory
- Throws:
SourceException
MalformedURLException
IOException
release
public void release(Source source)
- Specified by:
release
in interface SourceFactory
absolutize
public String absolutize(String baseURI,
String location)
- Specified by:
absolutize
in interface URIAbsolutizer
Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.