org.apache.cocoon.util
Class SimpleSourceResolver

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.util.SimpleSourceResolver
All Implemented Interfaces:
Contextualizable, LogEnabled, ThreadSafe, SourceResolver

public final class SimpleSourceResolver
extends AbstractLogEnabled
implements ThreadSafe, Contextualizable, SourceResolver

A minimalist SourceResolver that handles a fixed restricted number of protocols. It is used as a bootstrap resolver to load roles and imported files in a service manager.

The supported protocols schemes are:

Relative URIs are resolved relatively to the context root, i.e. similarily to "context:".

Version:
$Id: SimpleSourceResolver.html 1304258 2012-03-23 10:09:27Z ilgrosso $

Nested Class Summary
static class SimpleSourceResolver.SimpleServiceManager
           
 
Field Summary
 
Fields inherited from interface org.apache.excalibur.source.SourceResolver
METHOD, ROLE, URI_ENCODING, URI_PARAMETERS
 
Constructor Summary
SimpleSourceResolver()
           
 
Method Summary
 void contextualize(Context context)
           
 void enableLogging(Logger logger)
           
 void release(Source source)
           
 Source resolveURI(String uri)
           
 Source resolveURI(String uri, String base, Map params)
           
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleSourceResolver

public SimpleSourceResolver()
Method Detail

enableLogging

public void enableLogging(Logger logger)
Specified by:
enableLogging in interface LogEnabled
Overrides:
enableLogging in class AbstractLogEnabled

contextualize

public void contextualize(Context context)
                   throws ContextException
Specified by:
contextualize in interface Contextualizable
Throws:
ContextException

resolveURI

public Source resolveURI(String uri)
                  throws MalformedURLException,
                         IOException
Specified by:
resolveURI in interface SourceResolver
Throws:
MalformedURLException
IOException

resolveURI

public Source resolveURI(String uri,
                         String base,
                         Map params)
                  throws MalformedURLException,
                         IOException
Specified by:
resolveURI in interface SourceResolver
Throws:
MalformedURLException
IOException

release

public void release(Source source)
Specified by:
release in interface SourceResolver


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.