|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.renderer.RenderedContentStore
public class RenderedContentStore
Hides content from the renderer so that it will not be processed any further.
The RenderedContentStore associates blocks of rendered content (or Renderable objects that can later be transformed into rendered content) with tokens. These tokens can then be substituted for the content blocks during the rendering process. At the end of the chain of renderers, all tokens are replaced once more with their associated content blocks.
Using this technique, it is possible to 'hide' content from the renderer, making it unnecessary to perform nasty hacks to prevent the output of macros or renderer components from being broken by subsequent rendering steps.
| Field Summary | |
|---|---|
static java.lang.String |
BLOCK_TOKEN
An unlikely-to-appear-in-real-text token, for use in block-replacement |
static java.lang.String |
INLINE_TOKEN
An unlikely-to-appear-in-real-text token, for use in inline content replacement |
static java.lang.String |
MAP_KEY
The key under which the store is placed in the render context |
| Constructor Summary | |
|---|---|
RenderedContentStore()
|
|
| Method Summary | |
|---|---|
java.lang.String |
addBlock(java.lang.Object content)
Put some content block into the store. |
java.lang.String |
addInline(java.lang.Object content)
Put some inline content into the store. |
boolean |
equals(java.lang.Object o)
|
java.lang.Object |
get(java.lang.String token)
Get some content back, given the entire token that was returned from a previous 'add' |
static RenderedContentStore |
getFromRenderContext(RenderContext renderContext)
Retrieve the store from the render context. |
int |
hashCode()
|
static java.lang.String |
stripTokens(java.lang.String text)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String BLOCK_TOKEN
public static final java.lang.String INLINE_TOKEN
public static final java.lang.String MAP_KEY
| Constructor Detail |
|---|
public RenderedContentStore()
| Method Detail |
|---|
public static RenderedContentStore getFromRenderContext(RenderContext renderContext)
renderContext - the render context to retrieve the store from
public java.lang.String addBlock(java.lang.Object content)
content - the content to add to the store
public java.lang.String addInline(java.lang.Object content)
content - the content to add to the store
public java.lang.Object get(java.lang.String token)
token - a token that was returned from a previous add
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic static java.lang.String stripTokens(java.lang.String text)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||