org.xwiki.rendering.block.match
Class MetadataBlockMatcher

java.lang.Object
  extended by org.xwiki.rendering.block.match.ClassBlockMatcher
      extended by org.xwiki.rendering.block.match.MetadataBlockMatcher
All Implemented Interfaces:
BlockMatcher

public class MetadataBlockMatcher
extends ClassBlockMatcher

Implementation of BlockMatcher which matches MetaData information.

Since:
3.0M3

Constructor Summary
MetadataBlockMatcher(String metadataKey)
          Match MetaDataBlock containing the provided key.
MetadataBlockMatcher(String metadataKey, Object metadataValue)
          Match MetaDataBlock containing the provided key/value pair.
 
Method Summary
 boolean match(Block block)
          True if the provided block is matched.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetadataBlockMatcher

public MetadataBlockMatcher(String metadataKey)
Match MetaDataBlock containing the provided key.

Parameters:
metadataKey - the key of the MetaData

MetadataBlockMatcher

public MetadataBlockMatcher(String metadataKey,
                            Object metadataValue)
Match MetaDataBlock containing the provided key/value pair.

Parameters:
metadataKey - the key of the MetaData
metadataValue - the value of the MetaData
Method Detail

match

public boolean match(Block block)
Description copied from interface: BlockMatcher
True if the provided block is matched.

Specified by:
match in interface BlockMatcher
Overrides:
match in class ClassBlockMatcher
Parameters:
block - the block to match
Returns:
true if the provided block is matched, false otherwise