Package com.adobe.cq.dam.cfm
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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ContentFragmentcreateFragment(Resource parent, String name, String title)Creates a fragment from this fragment template.StringgetDescription()Gets a description for the template (if available).Iterator<ElementTemplate>getElements()Gets an iterator on the templates for predefined elements.ElementTemplategetForElement(ContentElement element)Gets the template for the specified content element.VariationTemplategetForVariation(ContentVariation variation)Gets the template for the specified global content variation.Iterator<String>getInitialAssociatedContent()Gets an iterator on the initial references that form the associated content of the fragment.MetaDataDefinitiongetMetaDataDefinition()Gets the meta data definition.StringgetThumbnailPath()Gets the repository path to the template's thumbnail.StringgetTitle()Gets the title of the template.Iterator<VariationTemplate>getVariations()Gets an iterator on the templates of predefined global variations.
-
-
-
Method Detail
-
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 createdname- The name of the fragment to be createdtitle- 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;
nullif 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;
nullif 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
-
-