Package com.tridion.storage.entities
Interface CustomMetaEntity
- All Superinterfaces:
Serializable
Container for custom metadata of pages or components.
A Custom Meta represents a named custom metadata element and a set of key-value pairs.
In addition, a CustomMeta may embed child CustomMetas forming a Tree-like structure.
-
Method Summary
Modifier and TypeMethodDescriptionReturns a childCustomMetaidentified by [name].Returns a map of child CustomMetas.getFirstValue(String key) Returns the value for the given key [name], the type of object can be a Date, Float or String.getName()Name of this CustomMeta instance.Returns all key-value pairs of this CustomMeta as a Map.Deprecated.This method is only for backwards compatibility reasons and should not be used anymore.booleanisEmpty()This allows checking if the metadata contains actual name / value pairs.
-
Method Details
-
isEmpty
boolean isEmpty()This allows checking if the metadata contains actual name / value pairs.- Returns:
- True if there are actual name / value pairs, False if not
-
getName
String getName()Name of this CustomMeta instance.- Returns:
- name of this CustomMeta instance
-
getChildren
Map<String,CustomMeta> getChildren()Returns a map of child CustomMetas. The map [String, CustomMeta] contains the named children of this CustomMeta.- Returns:
- a map of child CustomMetas
-
getNameValues
Map<String,NameValuePair> getNameValues()Returns all key-value pairs of this CustomMeta as a Map.- Returns:
- all key-value pairs of this CustomMeta as a Map
-
getValue
Deprecated.This method is only for backwards compatibility reasons and should not be used anymore. New method to be used isgetFirstValue(String).Returns the value for the given key [name], the type of object can be a Date, Float or String.- Parameters:
key- key to return the value for- Returns:
- the value for the given key [name] or null if no value exists for the given key
-
getFirstValue
Returns the value for the given key [name], the type of object can be a Date, Float or String.- Parameters:
key- key to return the value for- Returns:
- the value for the given key [name] or null if no value exists for the given key
-
getChild
Returns a childCustomMetaidentified by [name].- Parameters:
key- of the child Custom Meta to return- Returns:
- a child CustomMeta identified by the given name or null if such a child CustomMeta does not exist
-