Package org.xwiki.rendering.listener
Class MetaData
- java.lang.Object
-
- org.xwiki.rendering.listener.MetaData
-
public class MetaData extends Object
Represents a set of MetaData.- Since:
- 3.0M2
- Version:
- $Id: bf99a6e93d928b26e1ecbbf3b94150d7aa531201 $
-
-
Field Summary
Fields Modifier and Type Field Description static StringBASERepresent the base reference to resolve all the references in the blocks (links, images, macro parameters, etc.).static MetaDataEMPTYRepresents no MetaData.static StringNON_GENERATED_CONTENTRepresents a non generated content: a content that has not been transformed in any way.static StringPARAMETER_NAMERepresents a metadata attached to a specific parameter identified by the given name.static StringSOURCERepresents a source metaData, which corresponds to the reference to the source entity containing the content to render.static StringSYNTAXRepresents the syntax of the content found in macro containing wiki content (like a box macro for example).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMetaData(String key, Object value)voidaddMetaData(MetaData metaData)booleancontains(String key)booleanequals(Object obj)Map<String,Object>getMetaData()ObjectgetMetaData(String key)inthashCode()StringtoString()
-
-
-
Field Detail
-
EMPTY
public static final MetaData EMPTY
Represents no MetaData.
-
SOURCE
public static final 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 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 aSyntaxobject.- Since:
- 3.0M3
- See Also:
- Constant Field Values
-
BASE
public static final String BASE
Represent the base reference to resolve all the references in the blocks (links, images, macro parameters, etc.).- Since:
- 3.4M1
- See Also:
- Constant Field Values
-
NON_GENERATED_CONTENT
public static final String NON_GENERATED_CONTENT
Represents a non generated content: a content that has not been transformed in any way.- Since:
- 10.10
- See Also:
- Constant Field Values
-
PARAMETER_NAME
public static final String PARAMETER_NAME
Represents a metadata attached to a specific parameter identified by the given name.- Since:
- 11.1RC1
- See Also:
- Constant Field Values
-
-
Method Detail
-
addMetaData
public void addMetaData(String key, 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 Object getMetaData(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(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
-
-