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 push the implementation being wrapped to the constructor and use getWrapped to
access the instance being wrapped.
| Modifier and Type | Field and Description |
|---|---|
| private Resource |
| Access | Constructor and Description |
|---|---|
| public | ResourceWrapper(Resource
The implementation being wrapped. wrapped)If this resource has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | getContentType()
Overrides jakarta.
The default behavior of this method is to call |
| public InputStream | getInputStream()
Implements abstract jakarta.
The default behavior of this method is to call |
| public String | getLibraryName()
Overrides jakarta.
The default behavior of this method is to call |
| public String | getRequestPath()
Implements abstract jakarta.
The default behavior of this method is to call |
| public String | getResourceName()
Overrides jakarta.
The default behavior of this method is to call |
| public Map | getResponseHeaders()
Implements abstract jakarta.
The default behavior of this method is to call |
| public URL | getURL()
Implements abstract jakarta.
The default behavior of this method is to call |
| public Resource | getWrapped()
Implements jakarta. A class that implements this interface uses this method to return an instance of the class being wrapped. |
| public void | setContentType(String
the MIME content-type for this resource. The default implementation must accept contentType)null
as a parameter.Overrides jakarta.
The default behavior of this method is to call |
| public void | setLibraryName(String
the libraryName for this resource. The default implementation must accept libraryName)null for
the libraryName.Overrides jakarta.
The default behavior of this method is to call |
| public void | setResourceName(String
a non-null String. resourceName)Overrides jakarta.
The default behavior of this method is to call |
| public boolean | userAgentNeedsUpdate(FacesContext
the Faces context. context)Implements abstract jakarta.
The default behavior of this method is to call |
| wrapped | back to summary |
|---|---|
| private Resource wrapped | |
| ResourceWrapper | back to summary |
|---|---|
| public ResourceWrapper(Resource wrapped)
If this resource has been decorated, the implementation doing the decorating should push the implementation being
wrapped to this constructor. The
| |
| ResourceWrapper | back to summary |
|---|---|
| public ResourceWrapper()
Deprecated Use the other constructor taking the implementation being wrapped.
| |
| getContentType | back to summary |
|---|---|
| public String getContentType() Overrides jakarta.
The default behavior of this method is to call
| |
| getInputStream | back to summary |
|---|---|
| public InputStream getInputStream() throws IOException Implements abstract jakarta.
The default behavior of this method is to call
| |
| getLibraryName | back to summary |
|---|---|
| public String getLibraryName() Overrides jakarta.
The default behavior of this method is to call
| |
| getRequestPath | back to summary |
|---|---|
| public String getRequestPath() Implements abstract jakarta.
The default behavior of this method is to call
| |
| getResourceName | back to summary |
|---|---|
| public String getResourceName() Overrides jakarta.
The default behavior of this method is to call
| |
| getResponseHeaders | back to summary |
|---|---|
| public Map Implements abstract jakarta.
The default behavior of this method is to call
| |
| getURL | back to summary |
|---|---|
| public URL getURL() Implements abstract jakarta.
The default behavior of this method is to call
| |
| getWrapped | back to summary |
|---|---|
| public Resource getWrapped() Implements jakarta. Doc from jakarta. A class that implements this interface uses this method to return an instance of the class being wrapped. | |
| setContentType | back to summary |
|---|---|
| public void setContentType(String contentType) Overrides jakarta.
The default behavior of this method is to call
| |
| setLibraryName | back to summary |
|---|---|
| public void setLibraryName(String libraryName) Overrides jakarta.
The default behavior of this method is to call
| |
| setResourceName | back to summary |
|---|---|
| public void setResourceName(String resourceName) Overrides jakarta.
The default behavior of this method is to call
| |
| userAgentNeedsUpdate | back to summary |
|---|---|
| public boolean userAgentNeedsUpdate(FacesContext context) Implements abstract jakarta.
The default behavior of this method is to call
| |