Interface ElementTemplate

  • All Superinterfaces:

    public interface ElementTemplate
    extends 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 Detail

      • getName

        String getName()
        Gets the (technical) name of the represented content element.
        The name
      • getTitle

        String getTitle()
        Gets the (human-readable) title of the represented content element.
        The title
      • getDataType

        @NotNull DataType getDataType()
        Gets the data type of the element.
        the data type of the element
      • getInitialContentType

        @Nullable String getInitialContentType()
        Gets the initial MIME type of the variation.

        This method must return a MIME type that is actually supported by the implementation.

        The initial MIME type
      • getDefaultContent

        @Nullable String 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>&nbsp;</p> for HTML content.

        The default content; if null, a sensible default content has to be provided by the implementation
      • getMetaData

        Map<String,​Object> getMetaData()

        Returns a Map with 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.

        A Map with metadata information of an Element Template, or an empty Map in case the Element Template has no extra information.