Interface ElementTemplate
- All Superinterfaces:
Adaptable
Implementations of this interface allow to access an element template through a well-defined API, without needing to care about the underlying content structure.
-
Method Summary
Modifier and TypeMethodDescription@NotNull DataTypeGets the data type of the element.@Nullable StringGets the content type of the default content.@Nullable StringGets the initial MIME type of the variation.Returns aMapwith metadata of an Element.getName()Gets the (technical) name of the represented content element.getTitle()Gets the (human-readable) title of the represented content element.
-
Method Details
-
getName
String getName()Gets the (technical) name of the represented content element.- Returns:
- The name
-
getTitle
String getTitle()Gets the (human-readable) title of the represented content element.- Returns:
- The title
-
getDataType
Gets the data type of the element.- Returns:
- the data type of the element
- Since:
- 1.1
-
getInitialContentType
Gets the initial MIME type of the variation.This method must return a MIME type that is actually supported by the implementation.
- Returns:
- The initial MIME type
-
getDefaultContent
Gets the content type of the default content.
If this method returns
null, the implementation should consider this as "undefined" rather than "empty". In such cases, it's the implementation's duty to provide a sensible default content. Could (for example) be an empty string for plain text content or<p> </p>for HTML content.- Returns:
- The default content; if null, a sensible default content has to be provided by the implementation
-
getMetaData
Returns a
Mapwith metadata of an Element.The method is used to return metadata information associated with Data Types from a Content Fragment Model.
Example: used to return the Fragment Template referenced by a Fragment Reference data type.
- Returns:
- A Map with metadata information of an Element Template, or an empty Map in case the Element Template has no extra information.
-