org.apache.myfaces.commons.resourcehandler.resource
Class ResourceLoaderWrapper

java.lang.Object
  extended by org.apache.myfaces.commons.resourcehandler.resource.ResourceLoader
      extended by org.apache.myfaces.commons.resourcehandler.resource.ResourceLoaderWrapper
All Implemented Interfaces:
javax.faces.FacesWrapper<ResourceLoader>
Direct Known Subclasses:
ExtendedResourceLoaderWrapper, GZIPResourceLoader

public abstract class ResourceLoaderWrapper
extends ResourceLoader
implements javax.faces.FacesWrapper<ResourceLoader>

Author:
Leonardo Uribe

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.myfaces.commons.resourcehandler.resource.ResourceLoader
ResourceLoader.VersionComparator
 
Field Summary
 
Fields inherited from class org.apache.myfaces.commons.resourcehandler.resource.ResourceLoader
VERSION_INVALID
 
Constructor Summary
ResourceLoaderWrapper()
           
 
Method Summary
 ResourceMeta createResourceMeta(String prefix, String libraryName, String libraryVersion, String resourceName, String resourceVersion)
           
 String getLibraryVersion(String path)
          Return the max available version found (if exists) or return null if no version available.
 String getPrefix()
           
 InputStream getResourceInputStream(ResourceMeta resourceMeta)
           
 URL getResourceURL(ResourceMeta resourceMeta)
          Return the max available version found (if exists) or return null if no version available.
 String getResourceVersion(String path)
           
protected  Comparator<String> getVersionComparator()
           
 boolean libraryExists(String libraryName)
           
 boolean resourceExists(ResourceMeta resourceMeta)
           
 void setPrefix(String prefix)
           
protected  void setVersionComparator(Comparator<String> versionComparator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.faces.FacesWrapper
getWrapped
 

Constructor Detail

ResourceLoaderWrapper

public ResourceLoaderWrapper()
Method Detail

getResourceVersion

public String getResourceVersion(String path)
Specified by:
getResourceVersion in class ResourceLoader

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

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

getResourceInputStream

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

createResourceMeta

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

libraryExists

public boolean libraryExists(String libraryName)
Specified by:
libraryExists in class ResourceLoader

getPrefix

public String getPrefix()
Overrides:
getPrefix in class ResourceLoader

setPrefix

public void setPrefix(String prefix)
Overrides:
setPrefix in class ResourceLoader

resourceExists

public boolean resourceExists(ResourceMeta resourceMeta)
Overrides:
resourceExists in class ResourceLoader

getVersionComparator

protected Comparator<String> getVersionComparator()
Overrides:
getVersionComparator in class ResourceLoader

setVersionComparator

protected void setVersionComparator(Comparator<String> versionComparator)
Overrides:
setVersionComparator in class ResourceLoader


Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.