public abstract class DynamicResource extends Resource
Resource
implementation represents a cacheable dynamic resource which doesn't necessarily exist as a
regular classpath resource.COMPONENT_RESOURCE_KEY
Constructor and Description |
---|
DynamicResource(String resourceName,
String libraryName,
String contentType)
Constructs a new dynamic resource based on the given resource name, library name and content type.
|
Modifier and Type | Method and Description |
---|---|
long |
getLastModified()
Returns the "last modified" timestamp of this resource.
|
String |
getRequestPath() |
Map<String,String> |
getResponseHeaders() |
URL |
getURL() |
void |
setLastModified(long lastModified)
Sets the "last modified" timestamp of this resource.
|
boolean |
userAgentNeedsUpdate(FacesContext context) |
getContentType, getInputStream, getLibraryName, getResourceName, setContentType, setLibraryName, setResourceName, toString
public DynamicResource(String resourceName, String libraryName, String contentType)
resourceName
- The resource name.libraryName
- The library name.contentType
- The content type.public String getRequestPath()
getRequestPath
in class Resource
public Map<String,String> getResponseHeaders()
getResponseHeaders
in class Resource
public long getLastModified()
public void setLastModified(long lastModified)
lastModified
- The "last modified" timestamp of this resource.public boolean userAgentNeedsUpdate(FacesContext context)
userAgentNeedsUpdate
in class Resource
Copyright © 2012–2020 OmniFaces. All rights reserved.