com.atlassian.renderer.wysiwyg
Class NodeContext
java.lang.Object
com.atlassian.renderer.wysiwyg.NodeContext
public class NodeContext
- extends Object
The context in which the node is being converted from xhtml to wiki markup.
This class is only used in the WysiwygMacroHelper
at the moment and should be eventually
used in DefaultWysiwygConverter
instead of passing so many parameters around.
Nested Class Summary |
static class |
NodeContext.Builder
Builder to help construct new NodeContexts. |
Constructor Summary |
NodeContext(Node node,
Node previousSibling,
Styles styles,
ListContext listContext,
boolean inTable,
boolean inListItem,
boolean ignoreText,
boolean escapeWikiMarkup)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NodeContext
public NodeContext(Node node,
Node previousSibling,
Styles styles,
ListContext listContext,
boolean inTable,
boolean inListItem,
boolean ignoreText,
boolean escapeWikiMarkup)
getFirstChildNodeContext
public NodeContext getFirstChildNodeContext()
- Returns:
- a NodeContext for the first child node of this context. Returns null if
there is no first child.
getNextSiblingNodeContext
public NodeContext getNextSiblingNodeContext()
- Returns:
- a NodeContext for the next sibling node of this context. Returns nulls if
there is no next sibling.
invokeConvert
public String invokeConvert(WysiwygNodeConverter wysiwygNodeConverter,
WysiwygConverter wysiwygConverter)
getNode
public Node getNode()
getPreviousSibling
public Node getPreviousSibling()
getStyles
public Styles getStyles()
getListContext
public ListContext getListContext()
isInTable
public boolean isInTable()
isInListItem
public boolean isInListItem()
isIgnoreText
public boolean isIgnoreText()
isEscapeWikiMarkup
public boolean isEscapeWikiMarkup()
getBooleanAttributeValue
public boolean getBooleanAttributeValue(String attributeName,
boolean defaultValue)
- Retrieve the value of an attribute from the node as a boolean. If the value is not
present, or not readily convertible to a boolean return the requested defaultValue.
- Parameters:
attributeName
- the attribute to find the value ofdefaultValue
- the value to return if no boolean value is found.
- Returns:
- the value of an attribute
getAttribute
public String getAttribute(String name)
- Retrieve the attribute value from the node.
- Returns:
- the value of an attribute. Null if attribute isn't present.
Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.