com.sun.faces.application.resource
public class ResourceInfo extends java.lang.Object
ResourceInfo
is a simple wrapper class for information
pertainant to building a complete resource path using a Library.
Modifier and Type | Field and Description |
---|---|
(package private) boolean |
cacheTimestamp |
private static java.lang.String |
COMPRESSED_CONTENT_DIRECTORY |
(package private) java.lang.String |
compressedPath |
(package private) boolean |
compressible |
(package private) ResourceHelper |
helper |
(package private) boolean |
isDevStage |
private long |
lastModified |
(package private) LibraryInfo |
library |
(package private) java.lang.String |
libraryName |
(package private) java.lang.String |
localePrefix |
private static java.util.logging.Logger |
LOGGER |
(package private) java.lang.String |
name |
(package private) java.lang.String |
path |
(package private) boolean |
supportsEL |
(package private) VersionInfo |
version |
Constructor and Description |
---|
ResourceInfo(LibraryInfo library,
java.lang.String name,
VersionInfo version,
boolean compressible,
boolean supportsEL,
boolean isDevStage,
boolean cacheTimestamp)
Constructs a new
ResourceInfo using the specified details. |
ResourceInfo(java.lang.String name,
VersionInfo version,
java.lang.String localePrefix,
ResourceHelper helper,
boolean compressible,
boolean supportsEL,
boolean isDevStage,
boolean cacheTimestamp)
Constructs a new
ResourceInfo using the specified details. |
Modifier and Type | Method and Description |
---|---|
void |
disableEL()
Disables EL evaluation for this resource.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getCompressedPath() |
ResourceHelper |
getHelper() |
long |
getLastModified(javax.faces.context.FacesContext ctx)
Returns the time this resource was last modified.
|
LibraryInfo |
getLibraryInfo() |
java.lang.String |
getLocalePrefix() |
java.lang.String |
getName() |
java.lang.String |
getPath() |
VersionInfo |
getVersion() |
int |
hashCode() |
private void |
initPath(boolean isDevStage)
Create the full path to the resource.
|
boolean |
isCompressable() |
boolean |
supportsEL() |
java.lang.String |
toString() |
private static final java.util.logging.Logger LOGGER
private static final java.lang.String COMPRESSED_CONTENT_DIRECTORY
java.lang.String name
java.lang.String libraryName
java.lang.String localePrefix
boolean cacheTimestamp
boolean isDevStage
VersionInfo version
ResourceHelper helper
LibraryInfo library
java.lang.String path
java.lang.String compressedPath
boolean compressible
boolean supportsEL
private volatile long lastModified
public ResourceInfo(LibraryInfo library, java.lang.String name, VersionInfo version, boolean compressible, boolean supportsEL, boolean isDevStage, boolean cacheTimestamp)
ResourceInfo
using the specified details.
The ResourceHelper
of the resource will be the same as the
ResourceHelper
of the LibraryInfo
.library
- the library containing this resourcename
- the resource nameversion
- the version of this resource (if any)compressible
- if this resource should be compressedsupportsEL
- true
if this resource may contain
EL expressionsisDevStage
- true if this context is development stagecacheTimestamp
- true
if the modification time of the
resource should be cached. The value of this parameter will be ignored
when isDevStage
is true
ResourceInfo(java.lang.String name, VersionInfo version, java.lang.String localePrefix, ResourceHelper helper, boolean compressible, boolean supportsEL, boolean isDevStage, boolean cacheTimestamp)
ResourceInfo
using the specified details.name
- the resource nameversion
- the version of the resourcelocalePrefix
- the locale prefix for this resource (if any)helper
- helper the helper class for this resourcecompressible
- if this resource should be compressedsupportsEL
- true
if this resource may contain
EL expressionsisDevStage
- true if this context is development stagecacheTimestamp
- true
if the modification time of the
resource should be cached. The value of this parameter will be ignored
when isDevStage
is true
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getName()
public VersionInfo getVersion()
null
if the
resource isn't versioned.public ResourceHelper getHelper()
ResourceHelper
for this resourcepublic LibraryInfo getLibraryInfo()
public java.lang.String getLocalePrefix()
public java.lang.String getPath()
public java.lang.String getCompressedPath()
null
public boolean isCompressable()
true
if this resource should be compressed,
otherwise false
public boolean supportsEL()
true
if the this resource may contain EL expressions
that should be evaluated, otherwise, return false
public void disableEL()
public long getLastModified(javax.faces.context.FacesContext ctx)
WebConfiguration.BooleanWebContextInitParameter.CacheResourceModificationTimestamp
is true, the value will be cached for the lifetime if this ResourceInfo
instance.ctx
- the FacesContext
for the current requestpublic java.lang.String toString()
toString
in class java.lang.Object
private void initPath(boolean isDevStage)
javax.servlet.context.tempdir
.Copyright © 2002-2010 Oracle America, Inc. All Rights Reserved.