|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.renderer.v2.RenderMode
public class RenderMode
Describes which operations are permitted at any point in the rendering of a page from wiki to HTML.
Essentially, this is a big collection of bitwise flags. If we need more than 64 flags we'll have to switch to using the java.util.BitSet, but for now, clients get cleaner-looking code just using the flag constants.
Field Summary | |
---|---|
static RenderMode |
ALL
Render everything |
static RenderMode |
ALL_WITH_NO_MACRO_ERRORS
Render mode for suppressing the warning messages for unfound macros |
static RenderMode |
COMPATIBILITY_MODE
|
static long |
F_ALL
Render everything |
static long |
F_BACKSLASH_ESCAPE
Escape special characters preceded by a backslash |
static long |
F_FIRST_PARA
Render a paragraph even if it is the first line of a block of content. |
static long |
F_HTMLESCAPE
Escape characters that might be confused with HTML |
static long |
F_IMAGES
Render explicit images |
static long |
F_LINEBREAKS
Render newlines and forced linebreaks |
static long |
F_LINKS
Render [links], free URLs and (if enabled) CamelCaseLinks |
static long |
F_LISTS
Render lists |
static long |
F_MACROS
Render macros |
static long |
F_MACROS_ERR_MSG
Render an error message when a macro is not found |
static long |
F_NONE
Render nothing |
static long |
F_PARAGRAPHS
Render paragraph (you might also need F_FIRST_PARA |
static long |
F_PHRASES
Render phrase markup - bold, italic etc. |
static long |
F_PRESERVE_ENTITIES
Preserve HTML entities (i.e. don't escape the & in Ӓ) -- only meaningful when F_HTMLESCAPE is set |
static long |
F_RESOLVE_TOKENS
Resolve tokens |
static long |
F_TABLES
Render tables |
static long |
F_TEMPLATE
Template variables |
static RenderMode |
INLINE
Render things you'd normally find inside a paragraph |
static RenderMode |
LINKS_ONLY
Render only links (usually for link extraction) |
static RenderMode |
LIST_ITEM
Render mode for contents of a list item |
static RenderMode |
MACROS_ONLY
Render mode for macros only |
static RenderMode |
NO_ESCAPE
Render everything, but assume HTML escaping has already occurred |
static RenderMode |
NO_RENDER
Don't render anything |
static RenderMode |
PHRASES_IMAGES
Render phrases and images |
static RenderMode |
PHRASES_LINKS
Render phrases and links |
static RenderMode |
SIMPLE_TEXT
Render text made up only of paragraphs, without images or links |
static RenderMode |
TABLE_CELL
Render mode for contents of a table cell (links in a table are rendered before cell division to avoid pipe conflicts...) |
Method Summary | |
---|---|
static RenderMode |
allow(long flags)
Create a new render mode by starting from the state where nothing is permitted, then turning on those flags passed into the method. |
RenderMode |
and(RenderMode otherMode)
Create a new render mode that is the logical AND of this and another render mode. |
boolean |
backslashEscape()
|
boolean |
equals(Object o)
|
int |
hashCode()
|
boolean |
htmlEscape()
|
RenderMode |
or(RenderMode otherMode)
Create a new render mode that is the logical OR of this and another render mode. |
boolean |
preserveEntities()
|
boolean |
renderFirstParagraph()
|
boolean |
renderImages()
|
boolean |
renderLinebreaks()
|
boolean |
renderLinks()
|
boolean |
renderLists()
|
boolean |
renderMacroErrorMessages()
|
boolean |
renderMacros()
|
boolean |
renderNothing()
|
boolean |
renderParagraphs()
|
boolean |
renderPhrases()
|
boolean |
renderTables()
|
boolean |
renderTemplate()
|
boolean |
resolveTokens()
|
static RenderMode |
suppress(long flags)
Create a new render mode by starting from the state where everything is permitted, and then switching off those flags passed into the method. |
boolean |
tokenizes()
Whether or not this current render mode will create tokens that need to be detokenized. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long F_ALL
public static final long F_NONE
public static final long F_PARAGRAPHS
F_FIRST_PARA
public static final long F_LINEBREAKS
public static final long F_MACROS
public static final long F_LINKS
public static final long F_PHRASES
public static final long F_IMAGES
public static final long F_TABLES
public static final long F_HTMLESCAPE
public static final long F_FIRST_PARA
Render a paragraph even if it is the first line of a block of content.
(requires F_PARAGRAPHS
). Suppress this flag if you wish *not* to encapsulate the first paragraph
in p tags.
Some Macros, such as the info macro, want to be more streamlined if they only contain one paragraph, and since they are already in a div, the p tag is not really required. Such macros suppress this flag.
public static final long F_LISTS
public static final long F_RESOLVE_TOKENS
public static final long F_PRESERVE_ENTITIES
public static final long F_BACKSLASH_ESCAPE
public static final long F_TEMPLATE
public static final long F_MACROS_ERR_MSG
public static final RenderMode ALL
public static final RenderMode NO_ESCAPE
public static final RenderMode LINKS_ONLY
public static final RenderMode INLINE
public static final RenderMode PHRASES_IMAGES
public static final RenderMode PHRASES_LINKS
public static final RenderMode SIMPLE_TEXT
public static final RenderMode LIST_ITEM
public static final RenderMode TABLE_CELL
public static final RenderMode ALL_WITH_NO_MACRO_ERRORS
public static final RenderMode MACROS_ONLY
public static final RenderMode NO_RENDER
public static final RenderMode COMPATIBILITY_MODE
Method Detail |
---|
public static RenderMode suppress(long flags)
RenderMode.suppress(F_MACROS | F_LINKS};
.
flags
- a bitmask of the flags that are NOT set in this render mode
allow(long)
public static RenderMode allow(long flags)
RenderMode.allow(F_PARAGRAPHS | F_LINEBREAKS);
.
flags
- a bitmask of the flags that are set in this render mode.
suppress(long)
public RenderMode and(RenderMode otherMode)
public RenderMode or(RenderMode otherMode)
public boolean renderLinebreaks()
public boolean renderLinks()
public boolean renderMacros()
public boolean renderParagraphs()
public boolean renderPhrases()
public boolean renderImages()
public boolean renderTables()
public boolean renderNothing()
public boolean htmlEscape()
public boolean backslashEscape()
public boolean renderFirstParagraph()
public boolean renderTemplate()
public boolean renderLists()
public boolean resolveTokens()
public boolean renderMacroErrorMessages()
public boolean preserveEntities()
public boolean tokenizes()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |