Interface FragmentTemplate

All Superinterfaces:
Adaptable

public interface FragmentTemplate extends Adaptable

Implementations of this interface allow to access the fragment template in a standardized way, independently of the actual content structure.

Each content fragment carries a copy of the template it was created from, hence it is independent from the original template (and from changes that happened there after the fragment was created).

  • Method Details

    • getTitle

      String getTitle()
      Gets the title of the template.
      Returns:
      The title
    • getDescription

      String getDescription()
      Gets a description for the template (if available).
      Returns:
      The description; empty string if none is available
    • getThumbnailPath

      String getThumbnailPath()
      Gets the repository path to the template's thumbnail.
      Returns:
      The repository path to the template's thumbnail
      Since:
      1.1
    • createFragment

      ContentFragment createFragment(Resource parent, String name, String title) throws ContentFragmentException
      Creates a fragment from this fragment template.
      Parameters:
      parent - The parent of the fragment to be created
      name - The name of the fragment to be created
      title - The title of the fragment to be created
      Returns:
      The newly created fragment
      Throws:
      ContentFragmentException - if the fragment could not be created
      Since:
      1.1
    • getElements

      Iterator<ElementTemplate> getElements()
      Gets an iterator on the templates for predefined elements.
      Returns:
      Iterator on element templates
    • getForElement

      ElementTemplate getForElement(ContentElement element)
      Gets the template for the specified content element.
      Parameters:
      element - The content element
      Returns:
      The element template; null if there is no template for the specified element
    • getVariations

      Iterator<VariationTemplate> getVariations()
      Gets an iterator on the templates of predefined global variations.
      Returns:
      Iterator on variation templates
    • getForVariation

      VariationTemplate getForVariation(ContentVariation variation)
      Gets the template for the specified global content variation.
      Parameters:
      variation - The content variation
      Returns:
      The variation template; null if there is no template for the specified variation
    • getInitialAssociatedContent

      Iterator<String> getInitialAssociatedContent()
      Gets an iterator on the initial references that form the associated content of the fragment.
      Returns:
      Iterator on the initial associated content
    • getMetaDataDefinition

      MetaDataDefinition getMetaDataDefinition()
      Gets the meta data definition.
      Returns:
      The meta data definition