Class ClientResourceInfo

java.lang.Object
com.sun.faces.application.resource.ResourceInfo
com.sun.faces.application.resource.ClientResourceInfo

public class ClientResourceInfo extends ResourceInfo
ClientResourceInfo is a simple wrapper class for information pertinent to building a complete resource path using a Library.
  • Constructor Details

    • ClientResourceInfo

      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 - the library containing this resource
      contract - the contract info
      name - the resource name
      version - the version of this resource (if any)
      compressible - if this resource should be compressed
      supportsEL - true if this resource may contain EL expressions
      isDevStage - true if this context is development stage
      cacheTimestamp - true if the modification time of the resource should be cached. The value of this parameter will be ignored when isDevStage is true
  • Method Details

    • 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:
      true if this resource should be compressed, otherwise false
    • supportsEL

      public boolean supportsEL()
      Returns:
      true if the this resource may contain EL expressions that should be evaluated, otherwise, return false
    • disableEL

      public void disableEL()
      Disables EL evaluation for this resource.
    • getLastModified

      public long getLastModified(FacesContext ctx)
      Returns the time this resource was last modified. If WebConfiguration.BooleanWebContextInitParameter.CacheResourceModificationTimestamp is true, the value will be cached for the lifetime if this ClientResourceInfo instance.
      Parameters:
      ctx - the FacesContext for the current request
      Returns:
      the time this resource was last modified (number of milliseconds since January 1, 1970 GMT).
    • toString

      public String toString()
      Overrides:
      toString in class Object