org.xwiki.rendering.listener
Class MetaData

java.lang.Object
  extended by org.xwiki.rendering.listener.MetaData

public class MetaData
extends java.lang.Object

Represents a set of MetaData.

Since:
3.0M2
Version:
$Id$

Field Summary
static MetaData EMPTY
          Represents no MetaData.
static java.lang.String SOURCE
          Represents a source metaData, which corresponds to the reference to the source entity containing the content to render.
static java.lang.String SYNTAX
          Represents the syntax of the content found in macro containing wiki content (like a box macro for example).
 
Constructor Summary
MetaData()
          Empty metaData.
MetaData(java.util.Map<java.lang.String,java.lang.Object> metaData)
           
 
Method Summary
 void addMetaData(MetaData metaData)
           
 void addMetaData(java.lang.String key, java.lang.Object value)
           
 boolean contains(java.lang.String key)
           
 java.util.Map<java.lang.String,java.lang.Object> getMetaData()
           
 java.lang.Object getMetaData(java.lang.String key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY

public static final MetaData EMPTY
Represents no MetaData.


SOURCE

public static final java.lang.String SOURCE
Represents a source metaData, which corresponds to the reference to the source entity containing the content to render. The reference is a free form text in a format that is understood by the Listeners supporting it.

See Also:
Constant Field Values

SYNTAX

public static final java.lang.String SYNTAX
Represents the syntax of the content found in macro containing wiki content (like a box macro for example). The value has to be a Syntax object.

Since:
3.0M3
See Also:
Constant Field Values
Constructor Detail

MetaData

public MetaData()
Empty metaData.


MetaData

public MetaData(java.util.Map<java.lang.String,java.lang.Object> metaData)
Parameters:
metaData - the metadata to set
Method Detail

addMetaData

public void addMetaData(java.lang.String key,
                        java.lang.Object value)
Parameters:
key - the key to the metadata element to add (e.g. "syntax")
value - the value of the metadata element to add (e.g. a Syntax object)

addMetaData

public void addMetaData(MetaData metaData)
Parameters:
metaData - the metadata to add

getMetaData

public java.lang.Object getMetaData(java.lang.String key)
Parameters:
key - the key to the metadata element to retrieve (e.g. "syntax")
Returns:
the metadata corresponding to the passed key of null if no such metadata exist.

contains

public boolean contains(java.lang.String key)
Parameters:
key - the key to the metadata element to check for
Returns:
true if there's a metadata with the passed key, false otherwise
Since:
3.0M3

getMetaData

public java.util.Map<java.lang.String,java.lang.Object> getMetaData()
Returns:
all the metadata


Copyright © 2004-2011 XWiki. All Rights Reserved.