org.enhydra.xml.xmlc.deferredparsing
Interface ResourceLoader

All Known Implementing Classes:
ResourceLoaderImpl

public interface ResourceLoader

An interface providing for abstraction of resource loading by document loader implementations.

Since:
2.3.2
Author:
Jacob Kjome

Method Summary
 URL getResource(String[] candidatePaths)
          Gets resources, such as XMLC templates and metadata files, from one of an array of candidate paths relative to a DocumentLoader implementation chosen context(s) in order of preference.
 

Method Detail

getResource

public URL getResource(String[] candidatePaths)
Gets resources, such as XMLC templates and metadata files, from one of an array of candidate paths relative to a DocumentLoader implementation chosen context(s) in order of preference. Paths are iterated until one is found and its URL returned, or none are found and null is returned.

The candidatePaths may correspond to paths in XMLCDeferredParsingFactory resource dirs, the classpath, a servlet context, etc... It is entirely up to implementors how and where to get resources corresponding to these paths.

Parameters:
candidatePaths - an array of candidate paths from which to load a resource in order of preference
Returns:
a URL corresponding to one of the candidatePaths or null if not found
See Also:
DocumentLoader.getResourceLoader()


Copyright © 1999-2007 enhydra.org (Mark Diekhans, David Li, Richard Kunze, Jacob Kjome). All Rights reserved.