Package com.jalios.jcms.wysiwyg
Class WysiwygRenderingHints
java.lang.Object
com.jalios.jcms.wysiwyg.WysiwygRenderingHints
Provides hints used during wysiwyg/JHTML rendering.
- Since:
- jcms-10.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new WikiRenderingHints with the default values.Creates a new WysiwygRenderingHints with the specified values -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancontainsAttribute(WysiwygRenderingHints hints, String attributeName) Check if the specified WysiwygRenderingHints contains the specified attribute.getAttribute(String name) Get a rendering attribute.Returns the attributeMap used to store extra rendering options.getCss()Returns the css class(es) used during the rendering.getData()Retrieves theDatafor which rendering is performed.getField()Retrieves the name of the data field for which rendering is performed.booleanReturns whether the field is editable.booleanReturns whether the rendering happens during a publication indexing.voidsetAttribute(String name, Object value) Set a rendering attribute.voidsetAttributeMap(Map<String, Object> attributeMap) Set the attributeMap used to store extra rendering options.voidSet the css to use in the surrounding html div/span generated by the rendering.voidSet theDatafor which rendering is performed.voidsetEditable(boolean editable) Set whether the field is editable.voidSet the name of the data field for which rendering is performed.setIndexing(boolean indexing) Set wether rendering is performed during publication indexing or not.toString()
-
Constructor Details
-
WysiwygRenderingHints
public WysiwygRenderingHints()Creates a new WikiRenderingHints with the default values. -
WysiwygRenderingHints
Creates a new WysiwygRenderingHints with the specified values- Parameters:
css- the name of the CSS class to use
-
-
Method Details
-
setCss
Set the css to use in the surrounding html div/span generated by the rendering.
Default value is empty string "".- Parameters:
css- one or more css class.
-
getCss
Returns the css class(es) used during the rendering.- Returns:
- the css class as one string,
-
setData
Set theDatafor which rendering is performed.- Parameters:
data- the data to set
-
getData
Retrieves theDatafor which rendering is performed.- Returns:
- the data, may return null
-
setField
Set the name of the data field for which rendering is performed.- Parameters:
field- the name of the field being rendered
-
getField
Retrieves the name of the data field for which rendering is performed.- Returns:
- the name of the field being rendered, may return null
-
setEditable
public void setEditable(boolean editable) Set whether the field is editable.- Parameters:
editable- whether the field is editable
-
isEditable
public boolean isEditable()Returns whether the field is editable.- Returns:
- whether the field is editable
-
isIndexing
public boolean isIndexing()Returns whether the rendering happens during a publication indexing.- Returns:
- true if rendering occurs for lucene indexing, false otherwise
- Since:
- 10.0.7 / JCMS-9501
-
setIndexing
Set wether rendering is performed during publication indexing or not.- Parameters:
indexing- true if rendering occurs for lucene indexing, false otherwise- Returns:
- this instance for method chaining
- Since:
- 10.0.7 / JCMS-9501
-
getAttributeMap
Returns the attributeMap used to store extra rendering options.- Returns:
- the attributeMap.
-
setAttributeMap
Set the attributeMap used to store extra rendering options.- Parameters:
attributeMap- the attributeMap.
-
setAttribute
Set a rendering attribute.- Parameters:
name- the attribute's key.value- the attribute's value.
-
getAttribute
Get a rendering attribute.- Parameters:
name- the attribute's name.- Returns:
- the attribute's value.
-
toString
-
containsAttribute
Check if the specified WysiwygRenderingHints contains the specified attribute.- Parameters:
hints- a WysiwygRenderingHints to check, null is authorizedattributeName- the name of the attribute to look for- Returns:
- false if specified hints is null, of if specified attribute has not been declared
- Since:
- 10.0.8 / JCMS-10672
-