Clearspace API (2.5.29) Core Javadocs

com.jivesoftware.community.renderer
Interface Renderer


public interface Renderer

A Renderer is an object that allows for converting text markup to html and back again. To use this API you would create and provide a RenderContext which contains all the necessary information for transforming the content as appropriate.

Note that this API does not provide for caching of rendered text - that is expected to be handled by classes using this API.


Method Summary
 String render(Document content, RenderContext context)
          Render the input string according to the RenderStrategy and RenderTarget specified by the given render context.
 String render(String content, RenderContext context)
          Render the input string according to the RenderStrategy and RenderTarget specified by the given render context.
 String renderField(JiveContentObject.Field fieldIdentifier, JiveContentObject content, RenderContext context)
          Performs rendering of a field in a piece of content, such as the subject or body.
 

Method Detail

render

String render(String content,
              RenderContext context)
Render the input string according to the RenderStrategy and RenderTarget specified by the given render context.

Parameters:
content - the input to render
context - rendering context containing all necessary information required for rendering
Returns:
the rendered content

render

String render(Document content,
              RenderContext context)
Render the input string according to the RenderStrategy and RenderTarget specified by the given render context.

Parameters:
content - the input to render
context - rendering context containing all necessary information required for rendering
Returns:
the rendered content

renderField

String renderField(JiveContentObject.Field fieldIdentifier,
                   JiveContentObject content,
                   RenderContext context)
Performs rendering of a field in a piece of content, such as the subject or body.

Parameters:
fieldIdentifier - an object identifying the field to be rendered.
context - the rendering context to use in rendering.
Returns:
the rendered field value.

Clearspace Project Page

Copyright © 1999-2007 Jive Software.