org.apache.myfaces.resource
Class ClassLoaderContractResourceLoader

java.lang.Object
  extended by org.apache.myfaces.shared.resource.ResourceLoader
      extended by org.apache.myfaces.shared.resource.ContractResourceLoader
          extended by org.apache.myfaces.resource.ClassLoaderContractResourceLoader

public class ClassLoaderContractResourceLoader
extends ContractResourceLoader

Author:
Leonardo Uribe

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.myfaces.shared.resource.ResourceLoader
ResourceLoader.VersionComparator
 
Field Summary
 
Fields inherited from class org.apache.myfaces.shared.resource.ContractResourceLoader
VERSION_INVALID
 
Constructor Summary
ClassLoaderContractResourceLoader(String prefix)
           
 
Method Summary
 ResourceMeta createResourceMeta(String prefix, String libraryName, String libraryVersion, String resourceName, String resourceVersion, String contractName)
           
protected  ClassLoader getClassLoader()
          Returns the ClassLoader to use when looking up resources under the top level package.
 String getLibraryVersion(String path, String contractName)
           
 InputStream getResourceInputStream(ResourceMeta resourceMeta)
           
 URL getResourceURL(ResourceMeta resourceMeta)
           
 String getResourceVersion(String path, String contractName)
           
 boolean libraryExists(String libraryName, String contractName)
           
 
Methods inherited from class org.apache.myfaces.shared.resource.ContractResourceLoader
createResourceMeta, getLibraryVersion, getResourceVersion, libraryExists
 
Methods inherited from class org.apache.myfaces.shared.resource.ResourceLoader
getPrefix, getVersionComparator, resourceExists, setPrefix, setVersionComparator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassLoaderContractResourceLoader

public ClassLoaderContractResourceLoader(String prefix)
Method Detail

getLibraryVersion

public String getLibraryVersion(String path,
                                String contractName)
Specified by:
getLibraryVersion in class ContractResourceLoader

getResourceInputStream

public InputStream getResourceInputStream(ResourceMeta resourceMeta)
Specified by:
getResourceInputStream in class ResourceLoader

getResourceURL

public URL getResourceURL(ResourceMeta resourceMeta)
Specified by:
getResourceURL in class ResourceLoader

getResourceVersion

public String getResourceVersion(String path,
                                 String contractName)
Specified by:
getResourceVersion in class ContractResourceLoader

createResourceMeta

public ResourceMeta createResourceMeta(String prefix,
                                       String libraryName,
                                       String libraryVersion,
                                       String resourceName,
                                       String resourceVersion,
                                       String contractName)
Specified by:
createResourceMeta in class ContractResourceLoader

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,
                             String contractName)
Specified by:
libraryExists in class ContractResourceLoader


Copyright © 2015 The Apache Software Foundation. All rights reserved.