Class MetadataBlockMatcher

java.lang.Object
org.xwiki.rendering.block.match.ClassBlockMatcher
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
Version:
$Id: 82adc6572f38518d107c2d24716c20f4994f998f $
  • Field Details

  • Constructor Details

    • 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 Details

    • 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