| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.faces.application.Resource
javax.faces.application.ResourceWrapper
public abstract class ResourceWrapper
Provides a simple implementation of
 Resource that can be subclassed by developers wishing to
 provide specialized behavior to an existing Resource
 instance.  The default implementation of all methods is to call
 through to the wrapped Resource.
Usage: extend
 this class and override getWrapped() to return the instance we
 are wrapping.
| Field Summary | 
|---|
| Fields inherited from class javax.faces.application.Resource | 
|---|
COMPONENT_RESOURCE_KEY | 
| Constructor Summary | |
|---|---|
ResourceWrapper()
 | 
|
| Method Summary | |
|---|---|
 java.io.InputStream | 
getInputStream()
The default behavior of this method
 is to call   | 
 java.lang.String | 
getRequestPath()
The default behavior of this method
 is to call   | 
 java.util.Map<java.lang.String,java.lang.String> | 
getResponseHeaders()
The default behavior of this method
 is to call   | 
 java.net.URL | 
getURL()
The default behavior of this method
 is to call   | 
abstract  Resource | 
getWrapped()
A class that implements this interface uses this method to return an instance of the class being wrapped.  | 
 boolean | 
userAgentNeedsUpdate(FacesContext context)
The default behavior of this method
 is to call   | 
| Methods inherited from class javax.faces.application.Resource | 
|---|
getContentType, getLibraryName, getResourceName, setContentType, setLibraryName, setResourceName, toString | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public ResourceWrapper()
| Method Detail | 
|---|
public abstract Resource getWrapped()
FacesWrapperA class that implements this interface uses this method to return an instance of the class being wrapped.
getWrapped in interface FacesWrapper<Resource>
public java.io.InputStream getInputStream()
                                   throws java.io.IOException
The default behavior of this method
 is to call Resource#getInputStream on the wrapped ResourceHandler object.
getInputStream in class ResourceInputStream containing the bytes of the
 resource.
 Any EL expressions present in the resource must be evaluated before serving the bytes of the resource. Note that due to browser and server caching, EL expressions in a resource file will generally only be evaluated once, when the resource is first served up. Therefore, using EL expressions that refer to per-request data is not advisable since this data can become stale.
java.io.IOException - if the current request is not a resource request.public java.net.URL getURL()
The default behavior of this method
 is to call Resource#getURL on the wrapped ResourceHandler object.
getURL in class ResourceURL instance that refers to
 this resource instance.public java.util.Map<java.lang.String,java.lang.String> getResponseHeaders()
The default behavior of this method
 is to call Resource#getResponseHeaders on the wrapped ResourceHandler object.
getResponseHeaders in class ResourceMap<String, String> of
 headers that will be included with the response.public java.lang.String getRequestPath()
The default behavior of this method
 is to call Resource#getRequestPath on the wrapped ResourceHandler object.
getRequestPath in class Resourcepublic boolean userAgentNeedsUpdate(FacesContext context)
The default behavior of this method
 is to call Resource#userAgentNeedsUpdate on the wrapped ResourceHandler object.
userAgentNeedsUpdate in class Resourcetrue or false depending on
 whether or not the user-agent needs an update of this resource.
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright © 2009-2011, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.
Generated on 10-February-2011 12:41