org.richfaces.resource

## Class ResourceHandlerImpl

- java.lang.Object
- - javax.faces.application.ResourceHandler
  - - javax.faces.application.ResourceHandlerWrapper
    - - org.richfaces.resource.ResourceHandlerImpl

- All Implemented Interfaces:
    javax.faces.FacesWrapper<javax.faces.application.ResourceHandler>

      public class ResourceHandlerImpl
      extends javax.faces.application.ResourceHandlerWrapper

  RichFaces-specific `ResourceHandler`.

  It adds support for:

  - ECSS files handling
  - cacheable resources

  It delegates to `ResourceFactory` for creating resources.

  Since:
    4.0
  Author:
    Nick Belaevski

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `HANDLER_START_TIME_ATTRIBUTE`
    `static String` | `RESOURCE_CACHE_NAME`
    `static String` | `RICHFACES_RESOURCE_IDENTIFIER`

    - ### Fields inherited from class javax.faces.application.ResourceHandler

      `LOCALE_PREFIX, RESOURCE_CONTRACT_XML, RESOURCE_EXCLUDES_DEFAULT_VALUE, RESOURCE_EXCLUDES_PARAM_NAME, RESOURCE_IDENTIFIER, WEBAPP_CONTRACTS_DIRECTORY_PARAM_NAME, WEBAPP_RESOURCES_DIRECTORY_PARAM_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ResourceHandlerImpl(javax.faces.application.ResourceHandler defaultHandler)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.faces.application.Resource` | `createResource(String resourceName)`
    `javax.faces.application.Resource` | `createResource(String resourceName, String libraryName)`
    `javax.faces.application.Resource` | `createResource(String resourceName, String libraryName, String contentType)`
    `String` | `getRendererTypeForResourceName(String resourceName)`
    `javax.faces.application.ResourceHandler` | `getWrapped()`
    `void` | `handleResourceRequest(javax.faces.context.FacesContext context)`
    `boolean` | `isResourceRequest(javax.faces.context.FacesContext context)`
    `protected boolean` | `isThisHandlerResourceRequest(javax.faces.context.FacesContext context)`
    `boolean` | `libraryExists(String libraryName)`

    - ### Methods inherited from class javax.faces.application.ResourceHandlerWrapper

      `createResourceFromId, createViewResource, isResourceURL`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### RICHFACES_RESOURCE_IDENTIFIER

          public static final String RICHFACES_RESOURCE_IDENTIFIER

      See Also:
        Constant Field Values

    - #### RESOURCE_CACHE_NAME

          public static final String RESOURCE_CACHE_NAME

      See Also:
        Constant Field Values

    - #### HANDLER_START_TIME_ATTRIBUTE

          public static final String HANDLER_START_TIME_ATTRIBUTE

  - ### Constructor Detail

    - #### ResourceHandlerImpl

          public ResourceHandlerImpl(javax.faces.application.ResourceHandler defaultHandler)

  - ### Method Detail

    - #### isResourceRequest

          public boolean isResourceRequest(javax.faces.context.FacesContext context)

      Overrides:
        `isResourceRequest` in class `javax.faces.application.ResourceHandlerWrapper`

    - #### handleResourceRequest

          public void handleResourceRequest(javax.faces.context.FacesContext context)
                                     throws IOException

      Overrides:
        `handleResourceRequest` in class `javax.faces.application.ResourceHandlerWrapper`
      Throws:
        `IOException`

    - #### isThisHandlerResourceRequest

          protected boolean isThisHandlerResourceRequest(javax.faces.context.FacesContext context)

    - #### createResource

          public javax.faces.application.Resource createResource(String resourceName,
                                                        String libraryName,
                                                        String contentType)

      Overrides:
        `createResource` in class `javax.faces.application.ResourceHandlerWrapper`

    - #### createResource

          public javax.faces.application.Resource createResource(String resourceName,
                                                        String libraryName)

      Overrides:
        `createResource` in class `javax.faces.application.ResourceHandlerWrapper`

    - #### createResource

          public javax.faces.application.Resource createResource(String resourceName)

      Overrides:
        `createResource` in class `javax.faces.application.ResourceHandlerWrapper`

    - #### getRendererTypeForResourceName

          public String getRendererTypeForResourceName(String resourceName)

      Overrides:
        `getRendererTypeForResourceName` in class `javax.faces.application.ResourceHandlerWrapper`

    - #### libraryExists

          public boolean libraryExists(String libraryName)

      Overrides:
        `libraryExists` in class `javax.faces.application.ResourceHandlerWrapper`

    - #### getWrapped

          public javax.faces.application.ResourceHandler getWrapped()

      Specified by:
        `getWrapped` in interface `javax.faces.FacesWrapper<javax.faces.application.ResourceHandler>`
      Overrides:
        `getWrapped` in class `javax.faces.application.ResourceHandlerWrapper`

Copyright © 2015 JBoss by Red Hat. All Rights Reserved.