public class WikiRenderingHints
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
REVISION |
Constructor and Description |
---|
WikiRenderingHints()
Creates a new WikiRenderingHints with the default values.
|
WikiRenderingHints(java.lang.String css,
boolean isSpan)
Creates a new WikiRenderingHints with the specified values
|
WikiRenderingHints(java.lang.String css,
boolean isSpan,
java.lang.String baseURL)
Creates a new WikiRenderingHints with the specified values
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getAttribute(java.lang.String name)
Get a rendering attribute.
|
java.util.Map<java.lang.String,java.lang.Object> |
getAttributeMap()
Returns the attributeMap used to store extra rendering options.
|
java.lang.String |
getBaseUrl()
Return the optionnal base URL used during rendering
|
java.lang.String |
getCss()
Returns the css class(es) used during the rendering.
|
Data |
getData()
Retrieves the
Data for which rendering is performed. |
java.lang.String |
getField()
Set the name of the data field for which rendering is performed.
|
boolean |
isSpan()
Returns whether a span or a div is used durint rendering.
|
boolean |
isWiki2JHTML()
Check if this hints is being used during a wiki to JHTML conversion
|
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Set a rendering attribute.
|
void |
setAttributeMap(java.util.Map<java.lang.String,java.lang.Object> attributeMap)
Set the attributeMap used to store extra rendering options.
|
void |
setBaseUrl(java.lang.String baseURL)
Set the base URL to use in all generated links.
Default is null, generated link will be relative. |
void |
setCss(java.lang.String css)
Set the css to use in the surrounding html div/span generated by the rendering.
|
void |
setData(Data data)
Set the
Data for which rendering is performed. |
void |
setField(java.lang.String field)
Set the name of the data field for which rendering is performed.
|
void |
setSpan(boolean isSpan)
Set whether a div or span should be used during the rendering.
|
void |
setWiki2JHTML(boolean isWiki2JHTML)
Set if this hints is being used for wiki to JHTML conversion
|
java.lang.String |
toString() |
public static final java.lang.String REVISION
public WikiRenderingHints()
public WikiRenderingHints(java.lang.String css, boolean isSpan)
css
- the name of the CSS class to useisSpan
- if true generate a span instead of divpublic WikiRenderingHints(java.lang.String css, boolean isSpan, java.lang.String baseURL)
css
- the name of the CSS class to useisSpan
- if true generate a span instead of divbaseURL
- if specified, this baseURL will be used to generate
absolute link instead of the usual relative links. leave to null.public void setCss(java.lang.String css)
css
- one or more css class.public java.lang.String getCss()
public void setSpan(boolean isSpan)
isSpan
- true to use a span, false to use a div.public boolean isSpan()
public void setBaseUrl(java.lang.String baseURL)
baseURL
- the base URL of the site, ending with a
slash, such as http://mysite.com/mywebapp/public java.lang.String getBaseUrl()
public void setData(Data data)
Data
for which rendering is performed.data
- the data to setpublic Data getData()
Data
for which rendering is performed.public void setField(java.lang.String field)
field
- the name of the field being renderedpublic java.lang.String getField()
public java.util.Map<java.lang.String,java.lang.Object> getAttributeMap()
public void setAttributeMap(java.util.Map<java.lang.String,java.lang.Object> attributeMap)
attributeMap
- the attributeMap.public void setAttribute(java.lang.String name, java.lang.Object value)
name
- the attribute's key.value
- the attribute's value.public java.lang.Object getAttribute(java.lang.String name)
name
- the attribute's name.public boolean isWiki2JHTML()
public void setWiki2JHTML(boolean isWiki2JHTML)
isWiki2JHTML
- true if JHTML conversion, false if wiki to HTML renderingpublic java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2001-2017 Jalios SA. All Rights Reserved.