Package com.adobe.cq.dam.cfm
Interface FragmentTemplate
- All Superinterfaces:
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
Modifier and TypeMethodDescriptioncreateFragment(Resource parent, String name, String title) Creates a fragment from this fragment template.Gets a description for the template (if available).Gets an iterator on the templates for predefined elements.getForElement(ContentElement element) Gets the template for the specified content element.getForVariation(ContentVariation variation) Gets the template for the specified global content variation.Gets an iterator on the initial references that form the associated content of the fragment.Gets the meta data definition.Gets the repository path to the template's thumbnail.getTitle()Gets the title of the template.Gets an iterator on the templates of predefined global variations.
-
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 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
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
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
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
-