Package de.xima.fc.portal
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
-
-
Constructor Summary
Constructors Constructor Description DevResource(javax.faces.application.Resource wrapped, String devPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStream
getInputStream()
String
getRequestPath()
boolean
userAgentNeedsUpdate(javax.faces.context.FacesContext context)
-
-
-
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 classjavax.faces.application.ResourceWrapper
- Throws:
IOException
-
getRequestPath
public String getRequestPath()
- Overrides:
getRequestPath
in classjavax.faces.application.ResourceWrapper
-
userAgentNeedsUpdate
public boolean userAgentNeedsUpdate(javax.faces.context.FacesContext context)
- Overrides:
userAgentNeedsUpdate
in classjavax.faces.application.ResourceWrapper
-
-