org.richfaces.resource

## Class MediaOutputResource

- java.lang.Object
- - org.richfaces.resource.AbstractUserResource
  - - org.richfaces.resource.MediaOutputResource

- All Implemented Interfaces:
    javax.faces.component.StateHolder, CacheableResource, ContentProducerResource, UserResource

      public class MediaOutputResource
      extends AbstractUserResource
      implements javax.faces.component.StateHolder, CacheableResource

  Since:
    4.0
  Author:
    Nick Belaevski

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MediaOutputResource()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `encode(javax.faces.context.FacesContext facesContext)`
    `String` | `getContentType()`
    `String` | `getEntityTag(javax.faces.context.FacesContext context)`
    `Date` | `getExpires(javax.faces.context.FacesContext context)`
    `Map<String,String>` | `getResponseHeaders()`
    `int` | `getTimeToLive(javax.faces.context.FacesContext context)`
    `void` | `initialize()`
    `boolean` | `isCacheable(javax.faces.context.FacesContext context)`
    `boolean` | `isTransient()`
    `void` | `restoreState(javax.faces.context.FacesContext context, Object stateObject)`
    `Object` | `saveState(javax.faces.context.FacesContext context)`
    `void` | `setCacheable(boolean cacheable)`
    `void` | `setContentType(String contentType)`
    `void` | `setTransient(boolean newTransientValue)`

    - ### Methods inherited from class org.richfaces.resource.AbstractUserResource

      `getContentLength, getLastModified`

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

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

- - ### Constructor Detail

    - #### MediaOutputResource

          public MediaOutputResource()

  - ### Method Detail

    - #### encode

          public void encode(javax.faces.context.FacesContext facesContext)
                      throws IOException

      Specified by:
        `encode` in interface `ContentProducerResource`
      Throws:
        `IOException`

    - #### isTransient

          public boolean isTransient()

      Specified by:
        `isTransient` in interface `javax.faces.component.StateHolder`

    - #### setTransient

          public void setTransient(boolean newTransientValue)

      Specified by:
        `setTransient` in interface `javax.faces.component.StateHolder`

    - #### saveState

          public Object saveState(javax.faces.context.FacesContext context)

      Specified by:
        `saveState` in interface `javax.faces.component.StateHolder`

    - #### restoreState

          public void restoreState(javax.faces.context.FacesContext context,
                                   Object stateObject)

      Specified by:
        `restoreState` in interface `javax.faces.component.StateHolder`

    - #### initialize

          public void initialize()

    - #### isCacheable

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

      Specified by:
        `isCacheable` in interface `CacheableResource`

    - #### setCacheable

          public void setCacheable(boolean cacheable)

    - #### getExpires

          public Date getExpires(javax.faces.context.FacesContext context)

      Specified by:
        `getExpires` in interface `CacheableResource`

    - #### getTimeToLive

          public int getTimeToLive(javax.faces.context.FacesContext context)

      Specified by:
        `getTimeToLive` in interface `CacheableResource`

    - #### getEntityTag

          public String getEntityTag(javax.faces.context.FacesContext context)

      Specified by:
        `getEntityTag` in interface `CacheableResource`

    - #### getContentType

          public String getContentType()

      Specified by:
        `getContentType` in interface `UserResource`

    - #### setContentType

          public void setContentType(String contentType)

    - #### getResponseHeaders

          public Map<String,String> getResponseHeaders()

      Specified by:
        `getResponseHeaders` in interface `UserResource`
      Overrides:
        `getResponseHeaders` in class `AbstractUserResource`

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