com.jalios.jcms
Class WikiRenderingHints

java.lang.Object
  extended by com.jalios.jcms.WikiRenderingHints

public class WikiRenderingHints
extends Object

Contains rendering hints used by the WikiRenderer.

Since:
jcms-5.7.0

Field Summary
static String REVISION
           
 
Constructor Summary
WikiRenderingHints()
          Creates a new WikiRenderingHints with the default values.
WikiRenderingHints(String css, boolean isSpan)
          Creates a new WikiRenderingHints with the specified values
WikiRenderingHints(String css, boolean isSpan, String baseURL)
          Creates a new WikiRenderingHints with the specified values
 
Method Summary
 Object getAttribute(String name)
          Get a rendering attribute.
 Map getAttributeMap()
          Returns the attributeMap used to store extra rendering options.
 String getBaseUrl()
          Return the optionnal base URL used during rendering
 String getCss()
          Returns the css class(es) used during the rendering.
 boolean isSpan()
          Returns whether a span or a div is used durint rendering.
 void setAttribute(String name, Object value)
          Set a rendering attribute.
 void setAttributeMap(Map attributeMap)
          Set the attributeMap used to store extra rendering options.
 void setBaseUrl(String baseURL)
          Set the base URL to use in all generated links.
Default is null, generated link will be relative.
 void setCss(String css)
          Set the css to use in the surrounding html div/span generated by the rendering.
 void setSpan(boolean isSpan)
          Set whether a div or span should be used during the rendering.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values
Constructor Detail

WikiRenderingHints

public WikiRenderingHints()
Creates a new WikiRenderingHints with the default values.


WikiRenderingHints

public WikiRenderingHints(String css,
                          boolean isSpan)
Creates a new WikiRenderingHints with the specified values

Parameters:
css - the name of the CSS class to use
isSpan - if true generate a span instead of div

WikiRenderingHints

public WikiRenderingHints(String css,
                          boolean isSpan,
                          String baseURL)
Creates a new WikiRenderingHints with the specified values

Parameters:
css - the name of the CSS class to use
isSpan - if true generate a span instead of div
baseURL - if specified, this baseURL will be used to generate absolute link instead of the usual relative links. leave to null.
Method Detail

setCss

public void setCss(String css)
Set the css to use in the surrounding html div/span generated by the rendering.
Default value is "wiki".

Parameters:
css - one or more css class.

getCss

public String getCss()
Returns the css class(es) used during the rendering.

Returns:
the css class as one string,

setSpan

public void setSpan(boolean isSpan)
Set whether a div or span should be used during the rendering.
Default value if false.

Parameters:
isSpan - true to use a span, false to use a div.

isSpan

public boolean isSpan()
Returns whether a span or a div is used durint rendering.

Returns:
true if span is used, false to use a div.

setBaseUrl

public void setBaseUrl(String baseURL)
Set the base URL to use in all generated links.
Default is null, generated link will be relative.

Parameters:
baseURL - the base URL of the site, ending with a slash, such as http://mysite.com/mywebapp/

getBaseUrl

public String getBaseUrl()
Return the optionnal base URL used during rendering

Returns:
the base URL used or null if none has been defined (in which case relative url are used)

getAttributeMap

public Map getAttributeMap()
Returns the attributeMap used to store extra rendering options.

Returns:
the attributeMap.
Since:
jcms-5.7.3

setAttributeMap

public void setAttributeMap(Map attributeMap)
Set the attributeMap used to store extra rendering options.

Parameters:
attributeMap - the attributeMap.
Since:
jcms-5.7.3

setAttribute

public void setAttribute(String name,
                         Object value)
Set a rendering attribute.

Parameters:
name - the attribute's key.
value - the attribute's value.
Since:
jcms-5.7.3

getAttribute

public Object getAttribute(String name)
Get a rendering attribute.

Parameters:
name - the attribute's name.
Returns:
the attribute's value.
Since:
jcms-5.7.3


Copyright © 2001-2010 Jalios SA. All Rights Reserved.