org.richfaces.resource

## Class AbstractBaseResource

- java.lang.Object
- - javax.faces.application.Resource
  - - org.richfaces.resource.AbstractBaseResource

- Direct Known Subclasses:
    AbstractCacheableResource

      public abstract class AbstractBaseResource
      extends javax.faces.application.Resource

  Since:
    4.0
  Author:
    Nick Belaevski

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `URL_PROTOCOL`

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

      `COMPONENT_RESOURCE_KEY`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `AbstractBaseResource()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addCacheControlResponseHeaders(javax.faces.context.FacesContext facesContext, Map<String,String> headers)`
    `protected void` | `addNoCacheResponseHeaders(javax.faces.context.FacesContext facesContext, Map<String,String> headers)`
    `protected ClassLoader` | `getClassLoader()`
    `protected int` | `getContentLength(javax.faces.context.FacesContext context)`
    `protected Date` | `getLastModified(javax.faces.context.FacesContext context)` TODO optimize/review?
    `String` | `getRequestPath()`
    `Map<String,String>` | `getResponseHeaders()`
    `URL` | `getURL()`
    `boolean` | `userAgentNeedsUpdate(javax.faces.context.FacesContext context)`

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

      `getContentType, getInputStream, getLibraryName, getResourceName, setContentType, setLibraryName, setResourceName, toString`

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

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

- - ### Field Detail

    - #### URL_PROTOCOL

          public static final String URL_PROTOCOL

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### AbstractBaseResource

          protected AbstractBaseResource()

  - ### Method Detail

    - #### getContentLength

          protected int getContentLength(javax.faces.context.FacesContext context)

    - #### getLastModified

          protected Date getLastModified(javax.faces.context.FacesContext context)

      TODO optimize/review?
      Returns:
        Returns the lastModified.

    - #### getClassLoader

          protected ClassLoader getClassLoader()

    - #### getRequestPath

          public String getRequestPath()

      Specified by:
        `getRequestPath` in class `javax.faces.application.Resource`

    - #### addNoCacheResponseHeaders

          protected void addNoCacheResponseHeaders(javax.faces.context.FacesContext facesContext,
                                       Map<String,String> headers)

    - #### addCacheControlResponseHeaders

          protected void addCacheControlResponseHeaders(javax.faces.context.FacesContext facesContext,
                                            Map<String,String> headers)

    - #### getResponseHeaders

          public Map<String,String> getResponseHeaders()

      Specified by:
        `getResponseHeaders` in class `javax.faces.application.Resource`

    - #### getURL

          public URL getURL()

      Specified by:
        `getURL` in class `javax.faces.application.Resource`

    - #### userAgentNeedsUpdate

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

      Specified by:
        `userAgentNeedsUpdate` in class `javax.faces.application.Resource`

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