public class ResourceHandlerImpl extends ResourceHandler
Modifier and Type | Field and Description |
---|---|
static String |
INIT_PARAM_RESOURCE_BUFFER_SIZE
Define the default buffer size that is used between Resource.getInputStream() and
httpServletResponse.getOutputStream() when rendering resources using the default
ResourceHandler.
|
static int |
INIT_PARAM_RESOURCE_BUFFER_SIZE_DEFAULT |
static String |
INIT_PARAM_STRICT_JSF_2_ALLOW_SLASH_LIBRARY_NAME
Allow slash in the library name of a Resource.
|
static boolean |
INIT_PARAM_STRICT_JSF_2_ALLOW_SLASH_LIBRARY_NAME_DEFAULT |
LOCALE_PREFIX, RESOURCE_EXCLUDES_DEFAULT_VALUE, RESOURCE_EXCLUDES_PARAM_NAME, RESOURCE_IDENTIFIER
Constructor and Description |
---|
ResourceHandlerImpl() |
Modifier and Type | Method and Description |
---|---|
Resource |
createResource(String resourceName) |
Resource |
createResource(String resourceName,
String libraryName) |
Resource |
createResource(String resourceName,
String libraryName,
String contentType) |
protected ResourceMeta |
deriveResourceMeta(ResourceLoader resourceLoader,
String resourceName,
String libraryName,
String localePrefix)
This method try to create a ResourceMeta for a specific resource
loader.
|
protected String |
getLocalePrefixForLocateResource() |
String |
getRendererTypeForResourceName(String resourceName) |
protected int |
getResourceBufferSize() |
protected ResourceHandlerSupport |
getResourceHandlerSupport() |
void |
handleResourceRequest(FacesContext facesContext)
Handle the resource request, writing in the output.
|
protected boolean |
isAllowSlashesLibraryName() |
protected boolean |
isResourceIdentifierExcluded(FacesContext context,
String resourceIdentifier) |
boolean |
isResourceRequest(FacesContext facesContext) |
boolean |
libraryExists(String libraryName)
Check if a library exists or not.
|
void |
setResourceHandlerSupport(ResourceHandlerSupport resourceHandlerSupport) |
@JSFWebConfigParam(since="2.1.6, 2.0.12", defaultValue="false", expectedValues="true, false", group="resources") public static final String INIT_PARAM_STRICT_JSF_2_ALLOW_SLASH_LIBRARY_NAME
public static final boolean INIT_PARAM_STRICT_JSF_2_ALLOW_SLASH_LIBRARY_NAME_DEFAULT
@JSFWebConfigParam(since="2.1.10, 2.0.16", defaultValue="2048", group="resources") public static final String INIT_PARAM_RESOURCE_BUFFER_SIZE
public static final int INIT_PARAM_RESOURCE_BUFFER_SIZE_DEFAULT
public Resource createResource(String resourceName)
createResource
in class ResourceHandler
public Resource createResource(String resourceName, String libraryName)
createResource
in class ResourceHandler
public Resource createResource(String resourceName, String libraryName, String contentType)
createResource
in class ResourceHandler
protected ResourceMeta deriveResourceMeta(ResourceLoader resourceLoader, String resourceName, String libraryName, String localePrefix)
public String getRendererTypeForResourceName(String resourceName)
getRendererTypeForResourceName
in class ResourceHandler
public void handleResourceRequest(FacesContext facesContext) throws IOException
handleResourceRequest
in class ResourceHandler
IOException
public boolean isResourceRequest(FacesContext facesContext)
isResourceRequest
in class ResourceHandler
protected String getLocalePrefixForLocateResource()
protected boolean isResourceIdentifierExcluded(FacesContext context, String resourceIdentifier)
public boolean libraryExists(String libraryName)
libraryExists
in class ResourceHandler
public void setResourceHandlerSupport(ResourceHandlerSupport resourceHandlerSupport)
resourceHandlerSupport
- the resourceHandlerSupport to setprotected ResourceHandlerSupport getResourceHandlerSupport()
protected boolean isAllowSlashesLibraryName()
protected int getResourceBufferSize()
Copyright © 2016 The Apache Software Foundation. All Rights Reserved.