|
Clearspace API (2.5.29) Core 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.getLongRowMapper();
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 | |
|---|---|
Object |
getContextParameter(String key)
Returns the context parameter associated with the specified key, or null if no association exists. |
Map |
getContextParameters()
Returns a map of all the context parameters. |
List<String> |
getFilterTags()
Returns a list of tags for all the currently configured render filters which implement the TagFilter interface. |
JiveContext |
getJiveContext()
Returns the jive context under which the filter is executing. |
RenderPipe |
getRenderPipe()
Returns the render pipe that will be used for rendering. |
RenderStrategy |
getRenderStrategy()
Returns the render strategy that will be used for rendering. |
JiveObject |
getSourceObject()
Returns the source object for which we're filtering a string from. |
boolean |
isCachingDisabled()
Returns true is caching of generated output is disabled, false otherwise. |
void |
setCachingDisabled(boolean disabled)
Sets whether caching of generated output is disabled or not. |
void |
setContextParameter(String key,
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 |
|---|
JiveObject getSourceObject()
JiveContext getJiveContext()
Map getContextParameters()
Object getContextParameter(String key)
key - the context parameter key
void setContextParameter(String key,
Object value)
key - the context parameter keyvalue - the context parameter valueboolean isCachingDisabled()
void setCachingDisabled(boolean disabled)
disabled - true if caching of generated output should be disabled, false otherwise.RenderStrategy 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.List<String> getFilterTags()
TagFilter interface. This method is provided since some filters need to know
what other tags are being used by other filters.
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||