Top Description Fields Constructors Methods
com.sun.faces.application.resource

public Class ClientResourceInfo

extends ResourceInfo
Class Inheritance
Static Imports
jakarta.faces.application.ResourceHandler.FACES_SCRIPT_LIBRARY_NAME, .ResourceHandler.FACES_SCRIPT_RESOURCE_NAME

ClientResourceInfo is a simple wrapper class for information pertinent to building a complete resource path using a Library.

Field Summary

Modifier and TypeField and Description
pack-priv boolean
private static final String
pack-priv String
pack-priv boolean
pack-priv boolean
private volatile long
private static final Logger
pack-priv boolean
Inherited from com.sun.faces.application.resource.ResourceInfo:
contractdoNotCachehelperlibrarylibraryNamelocalePrefixnamepathversion

Constructor Summary

AccessConstructor and Description
public
ClientResourceInfo(LibraryInfo
the library containing this resource
library
,
ContractInfo
the contract info
contract
,
String
the resource name
name
,
VersionInfo
the version of this resource (if any)
version
,
boolean
if this resource should be compressed
compressible
,
boolean
true if this resource may contain EL expressions
supportsEL
,
boolean
true if this context is development stage
isDevStage
,
boolean
true if the modification time of the resource should be cached. The value of this parameter will be ignored when isDevStage is true
cacheTimestamp
)

Constructs a new ClientResourceInfo using the specified details.

pack-priv
ClientResourceInfo(ContractInfo contract, String
the resource name
name
,
VersionInfo
the version of the resource
version
,
String
the locale prefix for this resource (if any)
localePrefix
,
ResourceHelper
helper the helper class for this resource
helper
,
boolean
if this resource should be compressed
compressible
,
boolean
true if this resource may contain EL expressions
supportsEL
,
boolean
true if this context is development stage
isDevStage
,
boolean
true if the modification time of the resource should be cached. The value of this parameter will be ignored when isDevStage is true
cacheTimestamp
)

Constructs a new ClientResourceInfo using the specified details.

pack-priv
ClientResourceInfo(ClientResourceInfo other, boolean copyLocalePrefix)

Method Summary

Modifier and TypeMethod and Description
public void
public void
disableEL()

Disables EL evaluation for this resource.

public String

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
getCompressedPath
()

public long

Returns:

the time this resource was last modified (number of milliseconds since January 1, 1970 GMT).
getLastModified
(FacesContext
the FacesContext for the current request
ctx
)

Returns the time this resource was last modified.

private void
initPath(boolean isDevStage)

Create the full path to the resource.

public boolean

Returns:

true if this resource should be compressed, otherwise false
isCompressable
()

public boolean

Returns:

true if the this resource may contain EL expressions that should be evaluated, otherwise, return false
supportsEL
()

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from com.sun.faces.application.resource.ResourceInfo:
copyequalsgetContractgetHelpergetLibraryInfogetLocalePrefixgetNamegetPathgetVersionhashCodeisDoNotCachesetDoNotCache

Field Detail

cacheTimestampback to summary
pack-priv boolean cacheTimestamp
COMPRESSED_CONTENT_DIRECTORYback to summary
private static final String COMPRESSED_CONTENT_DIRECTORY
compressedPathback to summary
pack-priv String compressedPath
compressibleback to summary
pack-priv boolean compressible
isDevStageback to summary
pack-priv boolean isDevStage
lastModifiedback to summary
private volatile long lastModified
LOGGERback to summary
private static final Logger LOGGER
supportsELback to summary
pack-priv boolean supportsEL

Constructor Detail

ClientResourceInfoback to summary
public ClientResourceInfo(LibraryInfo library, ContractInfo contract, String name, VersionInfo version, boolean compressible, boolean supportsEL, boolean isDevStage, boolean cacheTimestamp)

Constructs a new ClientResourceInfo using the specified details. The ResourceHelper of the resource will be the same as the ResourceHelper of the LibraryInfo.

Parameters
library:LibraryInfo

the library containing this resource

contract:ContractInfo

the contract info

name:String

the resource name

version:VersionInfo

the version of this resource (if any)

compressible:boolean

if this resource should be compressed

supportsEL:boolean

true if this resource may contain EL expressions

isDevStage:boolean

true if this context is development stage

cacheTimestamp:boolean

true if the modification time of the resource should be cached. The value of this parameter will be ignored when isDevStage is true

ClientResourceInfoback to summary
pack-priv ClientResourceInfo(ContractInfo contract, String name, VersionInfo version, String localePrefix, ResourceHelper helper, boolean compressible, boolean supportsEL, boolean isDevStage, boolean cacheTimestamp)

Constructs a new ClientResourceInfo using the specified details.

Parameters
name:String

the resource name

version:VersionInfo

the version of the resource

localePrefix:String

the locale prefix for this resource (if any)

helper:ResourceHelper

helper the helper class for this resource

compressible:boolean

if this resource should be compressed

supportsEL:boolean

true if this resource may contain EL expressions

isDevStage:boolean

true if this context is development stage

cacheTimestamp:boolean

true if the modification time of the resource should be cached. The value of this parameter will be ignored when isDevStage is true

ClientResourceInfoback to summary
pack-priv ClientResourceInfo(ClientResourceInfo other, boolean copyLocalePrefix)

Method Detail

copyback to summary
public void copy(ClientResourceInfo other)
disableELback to summary
public void disableEL()

Disables EL evaluation for this resource.

getCompressedPathback to summary
public String getCompressedPath()
Returns:String

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

getLastModifiedback to summary
public long getLastModified(FacesContext ctx)

Returns the time this resource was last modified. If com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter#CacheResourceModificationTimestamp is true, the value will be cached for the lifetime if this ClientResourceInfo instance.

Parameters
ctx:FacesContext

the FacesContext for the current request

Returns:long

the time this resource was last modified (number of milliseconds since January 1, 1970 GMT).

initPathback to summary
private void initPath(boolean isDevStage)

Create the full path to the resource. If the resource can be compressed, setup the compressedPath ivar so that the path refers to the directory refereneced by the context attribute jakarta.servlet.context.tempdir.

isCompressableback to summary
public boolean isCompressable()
Returns:boolean

true if this resource should be compressed, otherwise false

supportsELback to summary
public boolean supportsEL()
Returns:boolean

true if the this resource may contain EL expressions that should be evaluated, otherwise, return false

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override