Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.ajax4jsf.resource
Interface ResourceRenderer

    public interface ResourceRenderer

"Brige" for concrete resource types - images, scripts, styles.

Version:
  $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:57:07 $
Author:
  asmirnov@exadel.com (latest modification by $Author: alexsmirnov $)

Method Summary
`void` | `encode(InternetResource resource, javax.faces.context.FacesContext context, java.lang.Object data)` Encode concrete HTML element for resource.
`void` | `encode(InternetResource resource, javax.faces.context.FacesContext context, java.lang.Object data, java.util.Map<java.lang.String,java.lang.Object> attributes)` Encode concrete HTML element for resource.
`void` | `encodeBegin(InternetResource base, javax.faces.context.FacesContext context, java.lang.Object data, java.util.Map<java.lang.String,java.lang.Object> attributes)`
`void` | `encodeEnd(InternetResource base, javax.faces.context.FacesContext context, java.lang.Object data)`
`java.lang.String` | `getContentType()`
`java.lang.Object` | `getData(InternetResource base, javax.faces.context.FacesContext context, java.lang.Object data)` Get data to build URI for given resource.
`boolean` | `requireFacesContext()`
`int` | `send(InternetResource base, ResourceContext context)` Send incapsulated resource to client by `ResourceContext` .

Method Detail

### getContentType

    java.lang.String getContentType()

  Returns:
    content type ( image/jpeg , text/javascript etc. ) for given type.

### encode

    void encode(InternetResource resource,
                javax.faces.context.FacesContext context,
                java.lang.Object data)
                throws java.io.IOException

  Encode concrete HTML element for resource.

  Parameters:
    `context` -
    `data` -
  Throws:
    `java.io.IOException`

### encode

    void encode(InternetResource resource,
                javax.faces.context.FacesContext context,
                java.lang.Object data,
                java.util.Map<java.lang.String,java.lang.Object> attributes)
                throws java.io.IOException

  Encode concrete HTML element for resource.

  Parameters:
    `context` -
    `data` -
  Throws:
    `java.io.IOException`

### encodeBegin

    void encodeBegin(InternetResource base,
                     javax.faces.context.FacesContext context,
                     java.lang.Object data,
                     java.util.Map<java.lang.String,java.lang.Object> attributes)
                     throws java.io.IOException

  Throws:
    `java.io.IOException`

### encodeEnd

    void encodeEnd(InternetResource base,
                   javax.faces.context.FacesContext context,
                   java.lang.Object data)
                   throws java.io.IOException

  Throws:
    `java.io.IOException`

### requireFacesContext

    boolean requireFacesContext()

  Returns:
    true, if resource must be rendered in faces request cicle.

### send

    int send(InternetResource base,
             ResourceContext context)
             throws java.io.IOException

  Send incapsulated resource to client by `ResourceContext` . Perform any conversions, nessesary for this resources ( template interpretations, JavaScript conversions etc )

  Parameters:
    `context` -
  Returns:
    TODO
  Throws:
    `java.io.IOException`

### getData

    java.lang.Object getData(InternetResource base,
                             javax.faces.context.FacesContext context,
                             java.lang.Object data)

  Get data to build URI for given resource. Can be any Serialisable object,

  Parameters:
    `base` - TODO
  Returns:
    data for Store in URI/ Cache key.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.