org.xwiki.rendering.listener.chaining
Class MetaDataStateChainingListener

java.lang.Object
  extended by org.xwiki.rendering.listener.chaining.AbstractChainingListener
      extended by 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$

Field Summary
 
Fields inherited from interface org.xwiki.rendering.listener.Listener
EMPTY_PARAMETERS
 
Constructor Summary
MetaDataStateChainingListener(ListenerChain listenerChain)
           
 
Method Summary
 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, beginFormat, beginGroup, beginHeader, beginLink, beginList, beginListItem, beginMacroMarker, beginParagraph, beginQuotation, beginQuotationLine, beginSection, beginTable, beginTableCell, beginTableHeadCell, beginTableRow, endDefinitionDescription, endDefinitionList, endDefinitionTerm, endFormat, endGroup, endHeader, endLink, endList, endListItem, endMacroMarker, endParagraph, endQuotation, endQuotationLine, endSection, endTable, endTableCell, endTableHeadCell, endTableRow, getListenerChain, onEmptyLines, onHorizontalLine, onId, onImage, onMacro, onNewLine, onRawText, onSpace, onSpecialSymbol, onVerbatim, onWord, setListenerChain
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetaDataStateChainingListener

public MetaDataStateChainingListener(ListenerChain listenerChain)
Parameters:
listenerChain - see AbstractChainingListener.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)
Start of the document.

Specified by:
beginDocument in interface Listener
Overrides:
beginDocument in class AbstractChainingListener
Parameters:
metaData - the meta data to associate to the following events, see MetaData
See Also:
Listener.beginDocument(org.xwiki.rendering.listener.MetaData)

endDocument

public void endDocument(MetaData metaData)
Description copied from class: AbstractChainingListener
End of the document.

Specified by:
endDocument in interface Listener
Overrides:
endDocument in class AbstractChainingListener
Parameters:
metaData - the meta data associated with the previous events, see MetaData
See Also:
Listener.endDocument(org.xwiki.rendering.listener.MetaData)

beginMetaData

public void beginMetaData(MetaData metaData)
Start of MetaData (eg saving source from where the content is coming from).

Specified by:
beginMetaData in interface Listener
Overrides:
beginMetaData in class AbstractChainingListener
Parameters:
metaData - the metadata
See Also:
Listener.beginMetaData(org.xwiki.rendering.listener.MetaData)

endMetaData

public void endMetaData(MetaData metaData)
End of MetaData.

Specified by:
endMetaData in interface Listener
Overrides:
endMetaData in class AbstractChainingListener
Parameters:
metaData - the metadata
See Also:
Listener.endMetaData(org.xwiki.rendering.listener.MetaData)


Copyright © 2004-2011 XWiki. All Rights Reserved.