Class DevResource

java.lang.Object
javax.faces.application.ViewResource
javax.faces.application.Resource
javax.faces.application.ResourceWrapper
de.xima.fc.portal.DevResource
All Implemented Interfaces:
javax.faces.FacesWrapper<javax.faces.application.Resource>

public class DevResource extends javax.faces.application.ResourceWrapper
A resource meant only for development. It reads the resource directly from the file system and makes sure it never is cached. This is useful especially for transpiled JavaScript or CSS files that change while the server is running.
Author:
XIMA MEDIA GmbH
  • Field Summary

    Fields inherited from class javax.faces.application.Resource

    COMPONENT_RESOURCE_KEY
  • Constructor Summary

    Constructors
    Constructor
    Description
    DevResource(javax.faces.application.Resource wrapped, String devPath)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    boolean
    userAgentNeedsUpdate(javax.faces.context.FacesContext context)
     

    Methods inherited from class javax.faces.application.ResourceWrapper

    getContentType, getLibraryName, getResourceName, getResponseHeaders, getURL, getWrapped, setContentType, setLibraryName, setResourceName

    Methods inherited from class javax.faces.application.Resource

    toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • DevResource

      public DevResource(javax.faces.application.Resource wrapped, String devPath)
      Parameters:
      wrapped - Original compressed resource for which a development resource exists.
      devPath - Path to the development resource on the file system.
  • Method Details

    • getInputStream

      public InputStream getInputStream() throws IOException
      Overrides:
      getInputStream in class javax.faces.application.ResourceWrapper
      Throws:
      IOException
    • getRequestPath

      public String getRequestPath()
      Overrides:
      getRequestPath in class javax.faces.application.ResourceWrapper
    • userAgentNeedsUpdate

      public boolean userAgentNeedsUpdate(javax.faces.context.FacesContext context)
      Overrides:
      userAgentNeedsUpdate in class javax.faces.application.ResourceWrapper