Class ClientResourceInfo
- java.lang.Object
-
- com.sun.faces.application.resource.ResourceInfo
-
- com.sun.faces.application.resource.ClientResourceInfo
-
public class ClientResourceInfo extends ResourceInfo
ClientResourceInfois a simple wrapper class for information pertinent to building a complete resource path using a Library.
-
-
Constructor Summary
Constructors Constructor Description ClientResourceInfo(LibraryInfo library, ContractInfo contract, String name, VersionInfo version, boolean compressible, boolean supportsEL, boolean isDevStage, boolean cacheTimestamp)Constructs a newClientResourceInfousing the specified details.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcopy(ClientResourceInfo other)voiddisableEL()Disables EL evaluation for this resource.StringgetCompressedPath()longgetLastModified(FacesContext ctx)Returns the time this resource was last modified.booleanisCompressable()booleansupportsEL()StringtoString()-
Methods inherited from class com.sun.faces.application.resource.ResourceInfo
copy, equals, getContract, getHelper, getLibraryInfo, getLocalePrefix, getName, getPath, getVersion, hashCode, isDoNotCache, setDoNotCache
-
-
-
-
Constructor Detail
-
ClientResourceInfo
public ClientResourceInfo(LibraryInfo library, ContractInfo contract, String name, VersionInfo version, boolean compressible, boolean supportsEL, boolean isDevStage, boolean cacheTimestamp)
Constructs a newClientResourceInfousing the specified details. TheResourceHelperof the resource will be the same as theResourceHelperof theLibraryInfo.- Parameters:
library- the library containing this resourcecontract- the contract infoname- the resource nameversion- the version of this resource (if any)compressible- if this resource should be compressedsupportsEL-trueif this resource may contain EL expressionsisDevStage- true if this context is development stagecacheTimestamp-trueif the modification time of the resource should be cached. The value of this parameter will be ignored whenisDevStageistrue
-
-
Method Detail
-
copy
public void copy(ClientResourceInfo other)
-
getCompressedPath
public String getCompressedPath()
- Returns:
- the path to which the compressed bits for this resource reside. If this resource isn't compressible and this
method is called, it will return
null
-
isCompressable
public boolean isCompressable()
- Returns:
trueif this resource should be compressed, otherwisefalse
-
supportsEL
public boolean supportsEL()
- Returns:
trueif the this resource may contain EL expressions that should be evaluated, otherwise, returnfalse
-
disableEL
public void disableEL()
Disables EL evaluation for this resource.
-
getLastModified
public long getLastModified(FacesContext ctx)
Returns the time this resource was last modified. IfWebConfiguration.BooleanWebContextInitParameter.CacheResourceModificationTimestampis true, the value will be cached for the lifetime if thisClientResourceInfoinstance.- Parameters:
ctx- theFacesContextfor the current request- Returns:
- the time this resource was last modified (number of milliseconds since January 1, 1970 GMT).
-
-