com.day.cq.collab.wiki.api.dom
Class PluginNode

java.lang.Object
  extended by com.day.cq.collab.wiki.api.dom.AbstractNode
      extended by com.day.cq.collab.wiki.api.dom.TagNode
          extended by com.day.cq.collab.wiki.api.dom.PluginNode
All Implemented Interfaces:
WikiNode
Direct Known Subclasses:
ParseControlNode

public abstract class PluginNode
extends TagNode

Provides a base class for plugin nodes


Field Summary
protected  String id
          the id of this node
protected  Plugin plugin
          the plugin this node belongs to
 
Fields inherited from class com.day.cq.collab.wiki.api.dom.TagNode
attrs
 
Fields inherited from class com.day.cq.collab.wiki.api.dom.AbstractNode
definition, firstChild, lastChild, nextSibling, parent
 
Constructor Summary
PluginNode(TagDef tag, Attributes attrs, Plugin plugin, String id)
          Creates a new plugin node.
 
Method Summary
 String getId()
          Returns the id of this node
 Plugin getPlugin()
          Returns the plugin this node belongs to.
 boolean process(WikiContext ctx)
          Allows the plugin to modify the DOM before the wiki text is written back to the storage.
 
Methods inherited from class com.day.cq.collab.wiki.api.dom.TagNode
addAttribute, dump, getAttributes, writeBeginHtml, writeBeginSource, writeEndHtml, writeEndSource
 
Methods inherited from class com.day.cq.collab.wiki.api.dom.AbstractNode
addChild, detach, getComplianceDef, getFirstChild, getLastChild, getNextSibling, getParentNode, getTagDef, hasChildren, isFirstSibling, isLastSibling, writeHtml, writeInnerHtml, writeInnerSource, writeSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

plugin

protected final Plugin plugin
the plugin this node belongs to


id

protected final String id
the id of this node

Constructor Detail

PluginNode

public PluginNode(TagDef tag,
                  Attributes attrs,
                  Plugin plugin,
                  String id)
Creates a new plugin node.

Parameters:
tag - the tag definition
attrs - the tag attributes
plugin - the plugin
id - the plugin id
Method Detail

getId

public String getId()
Returns the id of this node

Returns:
the id of this node

getPlugin

public Plugin getPlugin()
Returns the plugin this node belongs to.

Returns:
the plugin

process

public boolean process(WikiContext ctx)
Allows the plugin to modify the DOM before the wiki text is written back to the storage. Please note that during post processing, all nodes in the DOM are traversed using the child/sibling chain. So be careful what you modify.

Parameters:
ctx - the context
Returns:
true if this node made manipiulations to the dom; false otherwise.


Copyright © 2011-2012 Adobe Systems Incorporated. All Rights Reserved.