org.apache.cocoon.util
Class SimpleSourceResolver
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
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:
resource
to load resources in the classpath,
context
to load resources from the context, defined by the context-root
entry in the Avalon Context
(either a File
or an URL
), or if not
present, from the user.dir
system property,
- all standard JDK schemes (http, file, etc).
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 $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleSourceResolver
public SimpleSourceResolver()
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.