Package org.xwiki.rendering.listener
Class SectionGeneratorListener
- java.lang.Object
-
- org.xwiki.rendering.listener.WrappingListener
-
- org.xwiki.rendering.listener.SectionGeneratorListener
-
- All Implemented Interfaces:
ImageListener
,LinkListener
,Listener
public class SectionGeneratorListener extends WrappingListener
Automatically generate section events from header events.- Since:
- 8.2RC1
- Version:
- $Id: 50078dc96029c6f442a769ed751526d04c3fd625 $
-
-
Field Summary
-
Fields inherited from interface org.xwiki.rendering.listener.Listener
EMPTY_PARAMETERS
-
-
Constructor Summary
Constructors Constructor Description SectionGeneratorListener(Listener listener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beginHeader(HeaderLevel level, String id, Map<String,String> parameters)
Start of a header.void
endDocument(MetaData metadata)
End of the document.-
Methods inherited from class org.xwiki.rendering.listener.WrappingListener
beginDefinitionDescription, beginDefinitionList, beginDefinitionTerm, beginDocument, beginFigure, beginFigureCaption, beginFormat, beginGroup, beginLink, beginList, beginListItem, beginListItem, beginMacroMarker, beginMetaData, beginParagraph, beginQuotation, beginQuotationLine, beginSection, beginTable, beginTableCell, beginTableHeadCell, beginTableRow, endDefinitionDescription, endDefinitionList, endDefinitionTerm, endFigure, endFigureCaption, endFormat, endGroup, endHeader, endLink, endList, endListItem, endListItem, endMacroMarker, endMetaData, endParagraph, endQuotation, endQuotationLine, endSection, endTable, endTableCell, endTableHeadCell, endTableRow, getWrappedListener, onEmptyLines, onHorizontalLine, onId, onImage, onImage, onMacro, onNewLine, onRawText, onSpace, onSpecialSymbol, onVerbatim, onWord, setWrappedListener
-
-
-
-
Constructor Detail
-
SectionGeneratorListener
public SectionGeneratorListener(Listener listener)
- Parameters:
listener
- the listener to wrapp
-
-
Method Detail
-
beginHeader
public void beginHeader(HeaderLevel level, String id, Map<String,String> parameters)
Description copied from interface:Listener
Start of a header.- Specified by:
beginHeader
in interfaceListener
- Overrides:
beginHeader
in classWrappingListener
- Parameters:
level
- the header level (1, 2, 3, etc)id
- the header unique identifierparameters
- a generic list of parameters. Example: style="background-color: blue"- See Also:
HeaderLevel
-
endDocument
public void endDocument(MetaData metadata)
Description copied from interface:Listener
End of the document.- Specified by:
endDocument
in interfaceListener
- Overrides:
endDocument
in classWrappingListener
- Parameters:
metadata
- the meta data associated with the previous events, seeMetaData
-
-