Class 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
    • Constructor Detail

      • 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 Detail

      • 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