org.apache.myfaces.commons.resourcehandler.resource
Class ClassLoaderResourceLoader
java.lang.Object
org.apache.myfaces.commons.resourcehandler.resource.ResourceLoader
org.apache.myfaces.commons.resourcehandler.resource.ClassLoaderResourceLoader
public class ClassLoaderResourceLoader
- extends ResourceLoader
A resource loader implementation which loads resources from the thread ClassLoader.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassLoaderResourceLoader
public ClassLoaderResourceLoader(String prefix)
getLibraryVersion
public String getLibraryVersion(String path)
- Description copied from class:
ResourceLoader
- Return the max available version found (if exists) or
return null if no version available.
- Specified by:
getLibraryVersion
in class ResourceLoader
getResourceInputStream
public InputStream getResourceInputStream(ResourceMeta resourceMeta)
- Specified by:
getResourceInputStream
in class ResourceLoader
getResourceURL
public URL getResourceURL(ResourceMeta resourceMeta)
- Description copied from class:
ResourceLoader
- Return the max available version found (if exists) or
return null if no version available.
- Specified by:
getResourceURL
in class ResourceLoader
getResourceVersion
public String getResourceVersion(String path)
- Specified by:
getResourceVersion
in class ResourceLoader
createResourceMeta
public ResourceMeta createResourceMeta(String prefix,
String libraryName,
String libraryVersion,
String resourceName,
String resourceVersion)
- Specified by:
createResourceMeta
in class ResourceLoader
getClassLoader
protected ClassLoader getClassLoader()
- Returns the ClassLoader to use when looking up resources under the top level package. By default, this is the
context class loader.
- Returns:
- the ClassLoader used to lookup resources
libraryExists
public boolean libraryExists(String libraryName)
- Specified by:
libraryExists
in class ResourceLoader
Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.