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

java.lang.Object
  extended by org.apache.myfaces.commons.resourcehandler.resource.ResourceHandlerSupport
Direct Known Subclasses:
BaseResourceHandlerSupport

public abstract class ResourceHandlerSupport
extends Object

A utility class to isolate a ResourceHandler implementation from its underlying implementation

Version:
$Revision: 891494 $ $Date: 2009-12-16 19:42:18 -0500 (MiƩ, 16 Dic 2009) $
Author:
Leonardo Uribe (latest modification by $Author: lu4242 $)

Constructor Summary
ResourceHandlerSupport()
           
 
Method Summary
abstract  String calculateResourceBasePath(javax.faces.context.FacesContext facesContext)
          Calculate the resource base path.
abstract  String getMapping()
          Get the mapping used as prefix(/faces) or sufix(.jsf)
abstract  long getMaxTimeExpires()
          Return the time that should be set on "Expires" header in a resource.
 String getResourceIdentifier()
           
abstract  ResourceLoader[] getResourceLoaders()
          Return an array of resource loaders used to find resources using the standard.
abstract  long getStartupTime()
          Return the time when the app started.
abstract  boolean isExtensionMapping()
          Check if the mapping used is done using extensions (.xhtml, .jsf) or if it is not (/faces/*)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceHandlerSupport

public ResourceHandlerSupport()
Method Detail

calculateResourceBasePath

public abstract String calculateResourceBasePath(javax.faces.context.FacesContext facesContext)
Calculate the resource base path. It should extract a string like: ResourceHandler.RESOURCE_IDENTIFIER + '/' + getResourceName() For example: /javax.faces.resource/image.jpg This is used on ResourceHandler.handleResourceRequest()


getResourceLoaders

public abstract ResourceLoader[] getResourceLoaders()
Return an array of resource loaders used to find resources using the standard. The order of ResourceLoaders define its precedence.

Returns:

isExtensionMapping

public abstract boolean isExtensionMapping()
Check if the mapping used is done using extensions (.xhtml, .jsf) or if it is not (/faces/*)

Returns:

getMapping

public abstract String getMapping()
Get the mapping used as prefix(/faces) or sufix(.jsf)

Returns:

getStartupTime

public abstract long getStartupTime()
Return the time when the app started. This is useful to set the "Last-Modified" header in some specific cases.

Returns:

getMaxTimeExpires

public abstract long getMaxTimeExpires()
Return the time that should be set on "Expires" header in a resource.

Returns:

getResourceIdentifier

public String getResourceIdentifier()


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