juzu.template

## Class TemplateRenderContext

- java.lang.Object
- - juzu.template.TemplateRenderContext

-     public class TemplateRenderContext
      extends Object

  Author:
    Julien Viet

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TemplateRenderContext(juzu.impl.template.spi.TemplateStub stub)`
    `TemplateRenderContext(juzu.impl.template.spi.TemplateStub stub, Locale locale)`
    `TemplateRenderContext(juzu.impl.template.spi.TemplateStub stub, Map<String,Object> attributes)`
    `TemplateRenderContext(juzu.impl.template.spi.TemplateStub stub, PropertyMap properties, Map<String,Object> attributes, Locale locale)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `getAttribute(String name)`
    `Map<String,?>` | `getAttributes()`
    `Locale` | `getLocale()`
    `Stream` | `getPrinter()`
    `StringBuilder` | `render()`
    `void` | `render(Stream printer)`
    `void` | `renderTag(String name, Renderable body, Map<String,String> parameters)` Renders a tag.
    `Object` | `resolveBean(String expression)`
    `String` | `resolveMessage(juzu.impl.template.spi.juzu.dialect.gtmpl.MessageKey key)`
    `juzu.impl.template.spi.TemplateStub` | `resolveTemplate(String path)`
    `Object` | `setAttribute(String name, Object value)`
    `void` | `setTitle(String title)`

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

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

- - ### Constructor Detail

    - #### TemplateRenderContext

          public TemplateRenderContext(juzu.impl.template.spi.TemplateStub stub)

    - #### TemplateRenderContext

          public TemplateRenderContext(juzu.impl.template.spi.TemplateStub stub,
                               Map<String,Object> attributes)

    - #### TemplateRenderContext

          public TemplateRenderContext(juzu.impl.template.spi.TemplateStub stub,
                               Locale locale)

    - #### TemplateRenderContext

          public TemplateRenderContext(juzu.impl.template.spi.TemplateStub stub,
                               PropertyMap properties,
                               Map<String,Object> attributes,
                               Locale locale)

  - ### Method Detail

    - #### renderTag

          public void renderTag(String name,
                       Renderable body,
                       Map<String,String> parameters)
                         throws IOException

      Renders a tag.
      Parameters:
        `name` - the tag name
        `body` - the tag body
        `parameters` - the tag paremeters
      Throws:
        `IOException`

    - #### getAttributes

          public Map<String,?> getAttributes()

    - #### getAttribute

          public Object getAttribute(String name)

    - #### setAttribute

          public Object setAttribute(String name,
                            Object value)

    - #### getLocale

          public Locale getLocale()

    - #### getPrinter

          public Stream getPrinter()

    - #### setTitle

          public void setTitle(String title)

    - #### resolveTemplate

          public juzu.impl.template.spi.TemplateStub resolveTemplate(String path)

    - #### resolveBean

          public Object resolveBean(String expression)
                             throws InvocationTargetException

      Throws:
        `InvocationTargetException`

    - #### resolveMessage

          public String resolveMessage(juzu.impl.template.spi.juzu.dialect.gtmpl.MessageKey key)

    - #### render

          public StringBuilder render()
                               throws IOException

      Throws:
        `IOException`

    - #### render

          public void render(Stream printer)
                      throws IOException

      Throws:
        `IOException`

Copyright © 2015 eXo Platform SAS. All rights reserved.