org.xwiki.rendering.block
Class RawBlock

java.lang.Object
  extended by org.xwiki.rendering.block.AbstractBlock
      extended by org.xwiki.rendering.block.RawBlock
All Implemented Interfaces:
java.lang.Cloneable, Block

public class RawBlock
extends AbstractBlock

Represents some raw content that shouldn't be parsed or modified and that should be injected as is in any output. The content depends on a syntax and listeners decide if they can handle that syntax or not. For example if it's in "xhtml/1.0" syntax then the XHTML Renderer can insert it directly in the XHTML output.

Since:
1.8.3
Version:
$Id: RawBlock.java 22735 2009-08-14 07:34:43Z vmassol $

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.xwiki.rendering.block.Block
Block.Axes
 
Constructor Summary
RawBlock(java.lang.String rawContent, Syntax syntax)
           
 
Method Summary
 java.lang.String getRawContent()
           
 Syntax getSyntax()
           
 void traverse(Listener listener)
          Let the block send Listener events corresponding to its content. For example a Paragraph block will send the Listener.beginParagraph(java.util.Map) and Listener.endParagraph(java.util.Map) events when this method is called.
 
Methods inherited from class org.xwiki.rendering.block.AbstractBlock
addChild, addChildren, after, before, clone, clone, equals, getBlocks, getChildren, getChildrenByType, getFirstBlock, getNextSibling, getParameter, getParameters, getParent, getParentBlockByType, getPreviousBlockByType, getPreviousSibling, getRoot, hashCode, insertChildAfter, insertChildBefore, removeBlock, replaceChild, replaceChild, setChildren, setNextSiblingBlock, setParameter, setParameters, setParent, setPreviousSiblingBlock
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RawBlock

public RawBlock(java.lang.String rawContent,
                Syntax syntax)
Parameters:
rawContent - the content to inject as is into the listener (it won't be modified)
syntax - the syntax in which the content is written
Method Detail

traverse

public void traverse(Listener listener)
Let the block send Listener events corresponding to its content. For example a Paragraph block will send the Listener.beginParagraph(java.util.Map) and Listener.endParagraph(java.util.Map) events when this method is called.

Specified by:
traverse in interface Block
Overrides:
traverse in class AbstractBlock
Parameters:
listener - the listener to which to send the events to.
See Also:
AbstractBlock.traverse(Listener)

getRawContent

public java.lang.String getRawContent()
Returns:
the content to inject as is into the listener (it won't be modified)

getSyntax

public Syntax getSyntax()
Returns:
the syntax in which the content is written


Copyright © 2004-2011 XWiki. All Rights Reserved.