|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.faces.application.ResourceHandler javax.faces.application.ResourceHandlerWrapper
public abstract class ResourceHandlerWrapper
Provides a simple implementation of
ResourceHandler
that can be subclassed by developers wishing
to provide specialized behavior to an existing ResourceHandler
instance. The default implementation of all methods
is to call through to the wrapped ResourceHandler
.
Usage: extend this class and override getWrapped()
to
return the instance we are wrapping.
Field Summary |
---|
Fields inherited from class javax.faces.application.ResourceHandler |
---|
LOCALE_PREFIX, RESOURCE_EXCLUDES_DEFAULT_VALUE, RESOURCE_EXCLUDES_PARAM_NAME, RESOURCE_IDENTIFIER |
Constructor Summary | |
---|---|
ResourceHandlerWrapper()
|
Method Summary | |
---|---|
Resource |
createResource(java.lang.String resourceName)
The default behavior of this method
is to call |
Resource |
createResource(java.lang.String resourceName,
java.lang.String libraryName)
The default behavior of this method
is to call |
Resource |
createResource(java.lang.String resourceName,
java.lang.String libraryName,
java.lang.String contentType)
The default behavior of this method
is to call |
java.lang.String |
getRendererTypeForResourceName(java.lang.String resourceName)
The default behavior of this method
is to call |
abstract ResourceHandler |
getWrapped()
A class that implements this interface uses this method to return an instance of the class being wrapped. |
void |
handleResourceRequest(FacesContext context)
The default behavior of this method
is to call |
boolean |
isResourceRequest(FacesContext context)
The default behavior of this method
is to call |
boolean |
libraryExists(java.lang.String libraryName)
The default behavior of this method
is to call |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceHandlerWrapper()
Method Detail |
---|
public abstract ResourceHandler getWrapped()
FacesWrapper
A class that implements this interface uses this method to return an instance of the class being wrapped.
getWrapped
in interface FacesWrapper<ResourceHandler>
public Resource createResource(java.lang.String resourceName)
The default behavior of this method
is to call ResourceHandler#createResource(String)
on the
wrapped ResourceHandler
object.
createResource
in class ResourceHandler
resourceName
- the name of the resource.
Resource
instance, suitable
for use in encoding or decoding the named resource.public Resource createResource(java.lang.String resourceName, java.lang.String libraryName)
The default behavior of this method
is to call ResourceHandler#createResource(String, String)
on the wrapped
ResourceHandler
object.
createResource
in class ResourceHandler
resourceName
- the name of the resource.libraryName
- the name of the library in which this resource
resides, may be null
.
Resource
instance, suitable
for use in encoding or decoding the named resource.public Resource createResource(java.lang.String resourceName, java.lang.String libraryName, java.lang.String contentType)
The default behavior of this method
is to call ResourceHandler#createResource(String, String,
String)
on the wrapped ResourceHandler
object.
createResource
in class ResourceHandler
resourceName
- the name of the resource.libraryName
- the name of the library in which this resource
resides, may be null
.contentType
- the mime content that this
Resource
instance will return from Resource#getContentType
. If the value is null
, The
content-type of the resource is derived by passing the
resourceName to ExternalContext.getMimeType(java.lang.String)
Resource
instance, suitable
for use in encoding or decoding the named resource.public void handleResourceRequest(FacesContext context) throws java.io.IOException
The default behavior of this method
is to call ResourceHandler#handleResourceRequest(javax.faces.context.FacesContext)
on the wrapped ResourceHandler
object.
handleResourceRequest
in class ResourceHandler
context
- the FacesContext
for this
request
java.io.IOException
public boolean isResourceRequest(FacesContext context)
The default behavior of this method
is to call ResourceHandler#isResourceRequest(javax.faces.context.FacesContext)
on the
wrapped ResourceHandler
object.
isResourceRequest
in class ResourceHandler
context
- the FacesContext
for this
request
true
if the current request is a resource
request, false
otherwise.public boolean libraryExists(java.lang.String libraryName)
The default behavior of this method
is to call ResourceHandler#libraryExists(String)
on the
wrapped ResourceHandler
object.
libraryExists
in class ResourceHandler
public java.lang.String getRendererTypeForResourceName(java.lang.String resourceName)
The default behavior of this method
is to call ResourceHandler#getRendererTypeForResourceName(String)
on the
wrapped ResourceHandler
object.
getRendererTypeForResourceName
in class ResourceHandler
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2009, 2010, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.
Generated on 4-June-2010 04:34