Package org.xwiki.rendering.block.match
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 ofBlockMatcher
which matchesMetaData
information.- Since:
- 3.0M3
- Version:
- $Id: d939875149aba6eb28434f256722080eca505af7 $
-
-
Constructor Summary
Constructors Constructor Description MetadataBlockMatcher(String metadataKey)
MatchMetaDataBlock
containing the provided key.MetadataBlockMatcher(String metadataKey, Object metadataValue)
MatchMetaDataBlock
containing the provided key/value pair.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
match(Block block)
True if the provided block is matched.
-
-
-
Constructor Detail
-
MetadataBlockMatcher
public MetadataBlockMatcher(String metadataKey)
MatchMetaDataBlock
containing the provided key.- Parameters:
metadataKey
- the key of theMetaData
-
MetadataBlockMatcher
public MetadataBlockMatcher(String metadataKey, Object metadataValue)
MatchMetaDataBlock
containing the provided key/value pair.
-
-
Method Detail
-
match
public boolean match(Block block)
Description copied from interface:BlockMatcher
True if the provided block is matched.- Specified by:
match
in interfaceBlockMatcher
- Overrides:
match
in classClassBlockMatcher
- Parameters:
block
- the block to match- Returns:
- true if the provided block is matched, false otherwise
-
-