Interface MetaDataExtension.MetaData
-
- Enclosing interface:
- MetaDataExtension
public static interface MetaDataExtension.MetaData
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ObjectgetAttribute(String name)Returns an attribute associated with this meta data by name.<T> TgetAttribute(String name, Class<T> type)Returns an attribute associated with this meta data by name and specifying the type required.Map<String,Object>getAttributes()ObjectgetPayload()Returns the payload of the meta data as a POJO.<T> TgetPayload(Class<T> type)Returns the payload of the meta data as specified type.
-
-
-
Field Detail
-
CONTENT_TYPE
static final String CONTENT_TYPE
- See Also:
- Constant Field Values
-
JAVA_TYPE
static final String JAVA_TYPE
- See Also:
- Constant Field Values
-
CONTEXT
static final String CONTEXT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAttribute
Object getAttribute(String name)
Returns an attribute associated with this meta data by name.- Parameters:
name- the attribute name- Returns:
- the attribute
-
getAttribute
<T> T getAttribute(String name, Class<T> type)
Returns an attribute associated with this meta data by name and specifying the type required.- Parameters:
name- the attribute nametype- the type of the attribute- Returns:
- the value of the given attribute or null if there is no attribute for the given name
- Throws:
TypeConversionException- is thrown if error during type conversion
-
getPayload
Object getPayload()
Returns the payload of the meta data as a POJO.- Returns:
- the body, can be null
-
getPayload
<T> T getPayload(Class<T> type)
Returns the payload of the meta data as specified type.- Parameters:
type- the type that the payload should be converted yo.- Returns:
- the payload of the meta data as the specified type.
- Throws:
TypeConversionException- is thrown if error during type conversion
-
-