Clearspace API (2.5.29) Core Javadocs

com.jivesoftware.community.renderer
Class RenderStrategy

java.lang.Object
  extended by com.jivesoftware.community.renderer.RenderStrategy

public class RenderStrategy
extends Object

A RenderStrategy allows for the coarse grained ability to determine what will be rendered by a particular render call irregardless of what filters are included. Filters and macros are required to respect the RenderStrategy and only transform text into html (or html into text) allowed by the strategy.

A RenderStrategy consists of both a RenderTarget and a set of flags to determine what is to be rendered and what isn't. Filters and macros should determine how the are to render/unrender content as appropriate to the given target and flags. For example, given a target of RenderTarget.TARGET_WYSIWYG_EDITOR and the RENDER_ALL flag macro's should only render html output if they are able to also unrender that html back into wiki markup. Otherwise, the macro should just output it's wiki markup.


Field Summary
static RenderStrategy HTML_STRATEGY
          A render stragegy used to render text without any markup
static RenderStrategy PREVIEW_HTML_STRATEGY
          A render stragegy used to render preview without any markup
static RenderStrategy QUOTED_HTML_STRATEGY
          A render stragegy used to render preview without any markup
static long RENDER_ALL
          Use this render flag to enable the rendering of all links, tables, images, lists, macros and text decorations.
static long RENDER_IMAGES
          Use this render flag to render images.
static long RENDER_LINKS
          Use this render flag to render links.
static long RENDER_LISTS
          Use this render flag to render lists.
static long RENDER_MACROS
          Use this render flag to render macros.
static long RENDER_MARKERS
          Use this render flag to add markers around rendered content.
static long RENDER_TABLES
          Use this render flag to render tables.
static long RENDER_TEXT_DECORATION
          Use this render flag to render text decorations.
static RenderStrategy STRING_TO_HTML_STRATEGY
          A render stragegy used to render strings without any markup
static RenderStrategy TEXT_STRATEGY
          A render stragegy used to render text without any markup
 
Constructor Summary
RenderStrategy()
           
RenderStrategy(RenderTarget target, long flags)
           
RenderStrategy(RenderTarget target, long flags, boolean cacheDisabled)
           
 
Method Summary
 void exclude(long flags)
           
 RenderTarget getTarget()
           
 void include(long flags)
           
 boolean isCachingDisabled()
           
 boolean renderComments()
           
 boolean renderImages()
           
 boolean renderLinks()
           
 boolean renderLists()
           
 boolean renderMacros()
           
 boolean renderMarkers()
           
 boolean renderTables()
           
 boolean renderTextDecoration()
           
 void setCachingDisabled(boolean cacheDisabled)
           
 void setTarget(RenderTarget target)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RENDER_ALL

public static final long RENDER_ALL
Use this render flag to enable the rendering of all links, tables, images, lists, macros and text decorations.

See Also:
Constant Field Values

RENDER_LINKS

public static final long RENDER_LINKS
Use this render flag to render links.

See Also:
Constant Field Values

RENDER_TABLES

public static final long RENDER_TABLES
Use this render flag to render tables.

See Also:
Constant Field Values

RENDER_IMAGES

public static final long RENDER_IMAGES
Use this render flag to render images.

See Also:
Constant Field Values

RENDER_LISTS

public static final long RENDER_LISTS
Use this render flag to render lists.

See Also:
Constant Field Values

RENDER_MACROS

public static final long RENDER_MACROS
Use this render flag to render macros.

See Also:
Constant Field Values

RENDER_TEXT_DECORATION

public static final long RENDER_TEXT_DECORATION
Use this render flag to render text decorations.

See Also:
Constant Field Values

RENDER_MARKERS

public static final long RENDER_MARKERS
Use this render flag to add markers around rendered content.

See Also:
Constant Field Values

TEXT_STRATEGY

public static final RenderStrategy TEXT_STRATEGY
A render stragegy used to render text without any markup


HTML_STRATEGY

public static final RenderStrategy HTML_STRATEGY
A render stragegy used to render text without any markup


PREVIEW_HTML_STRATEGY

public static final RenderStrategy PREVIEW_HTML_STRATEGY
A render stragegy used to render preview without any markup


QUOTED_HTML_STRATEGY

public static final RenderStrategy QUOTED_HTML_STRATEGY
A render stragegy used to render preview without any markup


STRING_TO_HTML_STRATEGY

public static final RenderStrategy STRING_TO_HTML_STRATEGY
A render stragegy used to render strings without any markup

Constructor Detail

RenderStrategy

public RenderStrategy()

RenderStrategy

public RenderStrategy(RenderTarget target,
                      long flags)

RenderStrategy

public RenderStrategy(RenderTarget target,
                      long flags,
                      boolean cacheDisabled)
Method Detail

getTarget

public RenderTarget getTarget()

setTarget

public void setTarget(RenderTarget target)

renderLinks

public boolean renderLinks()

renderTables

public boolean renderTables()

renderImages

public boolean renderImages()

renderLists

public boolean renderLists()

renderMacros

public boolean renderMacros()

renderTextDecoration

public boolean renderTextDecoration()

renderMarkers

public boolean renderMarkers()

renderComments

public boolean renderComments()

include

public void include(long flags)

exclude

public void exclude(long flags)

isCachingDisabled

public boolean isCachingDisabled()

setCachingDisabled

public void setCachingDisabled(boolean cacheDisabled)

Clearspace Project Page

Copyright © 1999-2007 Jive Software.