org.richfaces.resource
Class AbstractCacheableResource
java.lang.Object
javax.faces.application.Resource
org.richfaces.resource.AbstractBaseResource
org.richfaces.resource.AbstractCacheableResource
- All Implemented Interfaces:
- org.richfaces.resource.CacheableResource
- Direct Known Subclasses:
- BaseResourceWrapper, CompiledCSSResource
public abstract class AbstractCacheableResource
- extends AbstractBaseResource
- implements org.richfaces.resource.CacheableResource
- Since:
- 4.0
- Author:
- Nick Belaevski
Fields inherited from class javax.faces.application.Resource |
COMPONENT_RESOURCE_KEY |
Methods inherited from class javax.faces.application.Resource |
getContentType, getInputStream, getLibraryName, getResourceName, setContentType, setLibraryName, setResourceName, toString |
AbstractCacheableResource
public AbstractCacheableResource()
isCacheable
public boolean isCacheable(javax.faces.context.FacesContext context)
- Specified by:
isCacheable
in interface org.richfaces.resource.CacheableResource
isMatchesLastModified
@Deprecated
protected Boolean isMatchesLastModified(javax.faces.context.FacesContext context)
- Deprecated.
isMatchesLastModified
protected boolean isMatchesLastModified(javax.faces.context.FacesContext context,
String modifiedCondition)
isMatchesEntityTag
@Deprecated
protected Boolean isMatchesEntityTag(javax.faces.context.FacesContext context)
- Deprecated.
isMatchesEntityTag
protected boolean isMatchesEntityTag(javax.faces.context.FacesContext context,
String matchHeaderValue)
setCacheable
public void setCacheable(boolean cacheable)
userAgentNeedsUpdate
public boolean userAgentNeedsUpdate(javax.faces.context.FacesContext context)
- Overrides:
userAgentNeedsUpdate
in class AbstractBaseResource
getExpires
public Date getExpires(javax.faces.context.FacesContext context)
- IMPORTANT: this method returned TTL in RF 3.x, now it returns expiration time
- Specified by:
getExpires
in interface org.richfaces.resource.CacheableResource
- Returns:
- Returns the expired.
getTimeToLive
public int getTimeToLive(javax.faces.context.FacesContext context)
- Specified by:
getTimeToLive
in interface org.richfaces.resource.CacheableResource
getEntityTag
public String getEntityTag(javax.faces.context.FacesContext context)
- Specified by:
getEntityTag
in interface org.richfaces.resource.CacheableResource
addCacheControlResponseHeaders
protected void addCacheControlResponseHeaders(javax.faces.context.FacesContext facesContext,
Map<String,String> headers)
- Overrides:
addCacheControlResponseHeaders
in class AbstractBaseResource
Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.