All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.adobe.cq.dam.cfm.FragmentTemplate Maven / Gradle / Ivy

/*
 * ADOBE CONFIDENTIAL
 *
 * Copyright 2015 Adobe Systems Incorporated
 * All Rights Reserved.
 *
 * NOTICE:  All information contained herein is, and remains
 * the property of Adobe Systems Incorporated and its suppliers,
 * if any.  The intellectual and technical concepts contained
 * herein are proprietary to Adobe Systems Incorporated and its
 * suppliers and may be covered by U.S. and Foreign Patents,
 * patents in process, and are protected by trade secret or copyright law.
 * Dissemination of this information or reproduction of this material
 * is strictly forbidden unless prior written permission is obtained
 * from Adobe Systems Incorporated.
 */

package com.adobe.cq.dam.cfm;

import aQute.bnd.annotation.ProviderType;
import org.apache.sling.api.adapter.Adaptable;
import org.apache.sling.api.resource.Resource;

import java.util.Iterator;

/**
 * 

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).

*/ @ProviderType public interface FragmentTemplate extends Adaptable { /** * Gets the title of the template. * * @return The title */ String getTitle(); /** * Gets a description for the template (if available). * * @return The description; empty string if none is available */ String getDescription(); /** * Gets the repository path to the template's thumbnail. * * @return The repository path to the template's thumbnail * @since 1.1 */ String getThumbnailPath(); /** * Creates a fragment from this fragment template. * * @param parent The parent of the fragment to be created * @param name The name of the fragment to be created * @param title The title of the fragment to be created * @return The newly created fragment * @throws ContentFragmentException if the fragment could not be created * @since 1.1 */ ContentFragment createFragment(Resource parent, String name, String title) throws ContentFragmentException; /** * Gets an iterator on the templates for predefined elements. * * @return Iterator on element templates */ Iterator getElements(); /** * Gets the template for the specified content element. * * @param element The content element * @return The element template; null if there is no template for the * specified element */ ElementTemplate getForElement(ContentElement element); /** * Gets an iterator on the templates of predefined global variations. * * @return Iterator on variation templates */ Iterator getVariations(); /** * Gets the template for the specified global content variation. * * @param variation The content variation * @return The variation template; null if there is no template for the * specified variation */ VariationTemplate getForVariation(ContentVariation variation); /** * Gets an iterator on the initial references that form the associated content of the * fragment. * * @return Iterator on the initial associated content */ Iterator getInitialAssociatedContent(); /** * Gets the meta data definition. * * @return The meta data definition */ MetaDataDefinition getMetaDataDefinition(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy