|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RenderContext
Encapsulates the context in which a piece of content is being rendered. An example usage of this class is outlined below:
RenderFilter[] filters = new RenderFilter[] {
new StyleFilter(),
new TableFilter()
};
RenderPipe pipe = new RenderPipe(filters);
RenderStrategy strategy = new RenderStrategy(RenderTarget.TARGET_HTML, RenderStrategy.RENDER_ALL);
RenderContext context = new JiveRenderContext(...);
context.setRenderPipe(pipe);
context.setRenderStrategy(strategy);
Renderer renderer = RendererFactory.getInstance();
String renderedText = renderer.render(text, context);
This class also provides access to a RenderedTextStore which can be used to hold snippets of text
to hide them from further processing.
Renderer
Method Summary | |
---|---|
java.lang.Object |
getContextParameter(java.lang.String key)
Returns the context parameter associated with the specified key, or null if no association exists. |
java.util.Map |
getContextParameters()
Returns a map of all the context parameters. |
java.util.List |
getFilterTags()
Returns a list of tags for all the currently configured render filters which implement the TagFilter interface. |
ForumFactory |
getForumFactory()
Returns the forum factory under which the filter is executing. |
RenderedTextStore |
getRenderedTextStore()
Returns the text store associated with the context. |
RenderPipe |
getRenderPipe()
Returns the render pipe that will be used for rendering. |
RenderStrategy |
getRenderStrategy()
Returns the render strategy that will be used for rendering. |
java.lang.Object |
getSourceObject()
Returns the source object for which we're filtering a string from. |
void |
setContextParameter(java.lang.String key,
java.lang.Object value)
Set a context parameter. |
void |
setRenderPipe(RenderPipe pipe)
Sets the render pipe that will be used for rendering. |
void |
setRenderStrategy(RenderStrategy renderStrategy)
Sets the render strategy that will be used for rendering. |
Method Detail |
---|
java.lang.Object getSourceObject()
ForumFactory getForumFactory()
java.util.Map getContextParameters()
java.lang.Object getContextParameter(java.lang.String key)
key
- the context parameter key
void setContextParameter(java.lang.String key, java.lang.Object value)
key
- the context parameter keyvalue
- the context parameter valueRenderStrategy getRenderStrategy()
void setRenderStrategy(RenderStrategy renderStrategy)
renderStrategy
- the render strategy that will be used for rendering.RenderPipe getRenderPipe()
void setRenderPipe(RenderPipe pipe)
pipe
- the render pipe that will be used for rendering.RenderedTextStore getRenderedTextStore()
java.util.List getFilterTags()
TagFilter
interface. This method is provided since some filters need to know
what other tags are being used by other filters.
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |