Class MetaDataStateChainingListener
- java.lang.Object
-
- org.xwiki.rendering.listener.chaining.AbstractChainingListener
-
- org.xwiki.rendering.listener.chaining.MetaDataStateChainingListener
-
- All Implemented Interfaces:
ChainingListener
,ImageListener
,LinkListener
,Listener
public class MetaDataStateChainingListener extends AbstractChainingListener
Provides the accumulated MetaData for all the previous blocks.- Since:
- 3.0M2
- Version:
- $Id: 926934d95736c60c1eb105e6736338c599d53952 $
-
-
Field Summary
-
Fields inherited from interface org.xwiki.rendering.listener.Listener
EMPTY_PARAMETERS
-
-
Constructor Summary
Constructors Constructor Description MetaDataStateChainingListener(ListenerChain listenerChain)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beginDocument(MetaData metaData)
Start of the document.void
beginMetaData(MetaData metaData)
Start of MetaData (eg saving source from where the content is coming from).void
endDocument(MetaData metaData)
End of the document.void
endMetaData(MetaData metaData)
End of MetaData.<T> List<T>
getAllMetaData(String key)
<T> T
getMetaData(String key)
-
Methods inherited from class org.xwiki.rendering.listener.chaining.AbstractChainingListener
beginDefinitionDescription, beginDefinitionList, beginDefinitionTerm, beginFigure, beginFigureCaption, beginFormat, beginGroup, beginHeader, beginLink, beginList, beginListItem, beginListItem, beginMacroMarker, beginParagraph, beginQuotation, beginQuotationLine, beginSection, beginTable, beginTableCell, beginTableHeadCell, beginTableRow, endDefinitionDescription, endDefinitionList, endDefinitionTerm, endFigure, endFigureCaption, endFormat, endGroup, endHeader, endLink, endList, endListItem, endListItem, endMacroMarker, endParagraph, endQuotation, endQuotationLine, endSection, endTable, endTableCell, endTableHeadCell, endTableRow, getListenerChain, onEmptyLines, onHorizontalLine, onId, onImage, onImage, onMacro, onNewLine, onRawText, onSpace, onSpecialSymbol, onVerbatim, onWord, setListenerChain
-
-
-
-
Constructor Detail
-
MetaDataStateChainingListener
public MetaDataStateChainingListener(ListenerChain listenerChain)
- Parameters:
listenerChain
- seeAbstractChainingListener.getListenerChain()
-
-
Method Detail
-
getAllMetaData
public <T> List<T> getAllMetaData(String key)
- Type Parameters:
T
- the type of the value for the passed key- Parameters:
key
- the key for which to find the value- Returns:
- the accumulated MetaData during all the previous begin/endMetaData events
-
getMetaData
public <T> T getMetaData(String key)
- Type Parameters:
T
- the type of the value for the passed key- Parameters:
key
- the key for which to find the value- Returns:
- the accumulated MetaData during all the previous begin/endMetaData events, for the passed key
-
beginDocument
public void beginDocument(MetaData metaData)
Description copied from interface:Listener
Start of the document.- Specified by:
beginDocument
in interfaceListener
- Overrides:
beginDocument
in classAbstractChainingListener
- Parameters:
metaData
- the meta data to associate to the following events, seeMetaData
-
endDocument
public void endDocument(MetaData metaData)
Description copied from interface:Listener
End of the document.- Specified by:
endDocument
in interfaceListener
- Overrides:
endDocument
in classAbstractChainingListener
- Parameters:
metaData
- the meta data associated with the previous events, seeMetaData
-
beginMetaData
public void beginMetaData(MetaData metaData)
Description copied from interface:Listener
Start of MetaData (eg saving source from where the content is coming from).- Specified by:
beginMetaData
in interfaceListener
- Overrides:
beginMetaData
in classAbstractChainingListener
- Parameters:
metaData
- the metadata
-
endMetaData
public void endMetaData(MetaData metaData)
Description copied from interface:Listener
End of MetaData.- Specified by:
endMetaData
in interfaceListener
- Overrides:
endMetaData
in classAbstractChainingListener
- Parameters:
metaData
- the metadata
-
-