java.lang.Object
jakarta.faces.application.ViewResource
jakarta.faces.application.Resource
org.omnifaces.resourcehandler.DynamicResource
- Direct Known Subclasses:
CombinedResource,GraphicResource
This
Resource implementation represents a cacheable dynamic resource which doesn't necessarily exist as a
regular classpath resource.- Since:
- 2.0
- Author:
- Bauke Scholtz
-
Field Summary
Fields inherited from class jakarta.faces.application.Resource
COMPONENT_RESOURCE_KEY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDynamicResource(String resourceName, String libraryName, String contentType) Constructs a new dynamic resource based on the given resource name, library name and content type. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the "last modified" timestamp of this resource.getURL()voidsetLastModified(long lastModified) Sets the "last modified" timestamp of this resource.booleanuserAgentNeedsUpdate(FacesContext context) Methods inherited from class jakarta.faces.application.Resource
getContentType, getInputStream, getLibraryName, getResourceName, setContentType, setLibraryName, setResourceName, toString
-
Constructor Details
-
DynamicResource
Constructs a new dynamic resource based on the given resource name, library name and content type.- Parameters:
resourceName- The resource name.libraryName- The library name.contentType- The content type.
-
-
Method Details
-
getRequestPath
- Specified by:
getRequestPathin classResource
-
getURL
-
getResponseHeaders
- Specified by:
getResponseHeadersin classResource
-
getLastModified
public long getLastModified()Returns the "last modified" timestamp of this resource.- Returns:
- The "last modified" timestamp of this resource.
-
setLastModified
public void setLastModified(long lastModified) Sets the "last modified" timestamp of this resource.- Parameters:
lastModified- The "last modified" timestamp of this resource.
-
userAgentNeedsUpdate
- Specified by:
userAgentNeedsUpdatein classResource
-