Class DynamicResource

Direct Known Subclasses:
CombinedResource, GraphicResource

public abstract class DynamicResource extends Resource
This Resource implementation represents a cacheable dynamic resource which doesn't necessarily exist as a regular classpath resource.
Since:
2.0
Author:
Bauke Scholtz
  • Constructor Details

    • DynamicResource

      protected DynamicResource(String resourceName, String libraryName, String contentType)
      Constructs a new dynamic resource based on the given resource name, library name and content type.
      Parameters:
      resourceName - The resource name.
      libraryName - The library name.
      contentType - The content type.
  • Method Details

    • getRequestPath

      public String getRequestPath()
      Specified by:
      getRequestPath in class Resource
    • getURL

      public URL getURL()
      Specified by:
      getURL in class Resource
    • getResponseHeaders

      public Map<String,String> getResponseHeaders()
      Specified by:
      getResponseHeaders in class Resource
    • getLastModified

      public long getLastModified()
      Returns the "last modified" timestamp of this resource.
      Returns:
      The "last modified" timestamp of this resource.
    • setLastModified

      public void setLastModified(long lastModified)
      Sets the "last modified" timestamp of this resource.
      Parameters:
      lastModified - The "last modified" timestamp of this resource.
    • userAgentNeedsUpdate

      public boolean userAgentNeedsUpdate(FacesContext context)
      Specified by:
      userAgentNeedsUpdate in class Resource