Package org.apache.myfaces.resource
Class ResourceHandlerSupport
java.lang.Object
org.apache.myfaces.resource.ResourceHandlerSupport
- Direct Known Subclasses:
BaseResourceHandlerSupport
A utility class to isolate a ResourceHandler implementation from its
underlying implementation
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract String
calculateResourceBasePath
(FacesContext facesContext) Calculate the resource base path.abstract ContractResourceLoader[]
Return an array of resource loaders used to find resources associated with a contract.abstract long
Return the time that should be set on "Expires" header in a resource.abstract ResourceLoader[]
Return an array of resource loaders used to find resources.abstract long
Return the time when the app started.abstract ResourceLoader[]
Return an array of resource loaders used to find resources that can be located using ResourceHandler.createViewResource().
-
Constructor Details
-
ResourceHandlerSupport
public ResourceHandlerSupport()
-
-
Method Details
-
calculateResourceBasePath
Calculate the resource base path. It should extract a string like: ResourceHandler.RESOURCE_IDENTIFIER + '/' + getResourceName() For example: /jakarta.faces.resource/image.jpg This is used on ResourceHandler.handleResourceRequest() -
getResourceLoaders
Return an array of resource loaders used to find resources. The order of ResourceLoaders define its precedence.- Returns:
-
getContractResourceLoaders
Return an array of resource loaders used to find resources associated with a contract. The order of ContractResourceLoaders define its precedence.- Returns:
- Since:
- 2.2
-
getViewResourceLoaders
Return an array of resource loaders used to find resources that can be located using ResourceHandler.createViewResource(). The order of ResourceLoaders define its precedence.- Returns:
- Since:
- 2.2
-
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
-