org.apache.myfaces.test.mock.resource
Class MockResourceLoader
java.lang.Object
org.apache.myfaces.test.mock.resource.MockResourceLoader
- Direct Known Subclasses:
- MockClassLoaderResourceLoader, MockExternalContextResourceLoader
public abstract class MockResourceLoader
- extends Object
Base class for resource loaders. Resource loaders can lookup resources
as URLs from arbitrary locations, including JAR files.
- Since:
- 1.0.0
- Version:
- $Revision: 882702 $ $Date: 2009-11-20 15:16:07 -0500 (Vie, 20 Nov 2009) $
- Author:
- Leonardo Uribe (latest modification by $Author: lu4242 $)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VERSION_INVALID
public static final String VERSION_INVALID
- See Also:
- Constant Field Values
MockResourceLoader
public MockResourceLoader(String prefix)
getResourceVersion
public abstract String getResourceVersion(String path)
getLibraryVersion
public abstract String getLibraryVersion(String path)
- Return the max available version found (if exists) or
return null if no version available.
getResourceURL
public abstract URL getResourceURL(MockResourceMeta resourceMeta)
- Return the max available version found (if exists) or
return null if no version available.
getResourceInputStream
public abstract InputStream getResourceInputStream(MockResourceMeta resourceMeta)
createResourceMeta
public abstract MockResourceMeta createResourceMeta(String prefix,
String libraryName,
String libraryVersion,
String resourceName,
String resourceVersion)
libraryExists
public abstract boolean libraryExists(String libraryName)
getVersionComparator
protected Comparator<String> getVersionComparator()
setVersionComparator
protected void setVersionComparator(Comparator<String> versionComparator)
getPrefix
public String getPrefix()
setPrefix
public void setPrefix(String prefix)
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.