Interface TemplateManager


@ProviderType public interface TemplateManager
Template Manger API. API for managing 'authored' templates and related components.
  • Method Details

    • createTemplate

      Template createTemplate(String parentPath, String templateType, String templateName, ValueMap templateProperties) throws WCMException
      Creates a new template
      Parameters:
      parentPath - the parent path
      templateType - type of template
      templateName - the template name
      templateProperties - properties of template
      Returns:
      Template
      Throws:
      WCMException - is thrown if the template is still used on pages.
    • deleteTemplate

      void deleteTemplate(Template template) throws WCMException
      Parameters:
      template - the template
      Throws:
      WCMException - is thrown if the template is still used on pages.
    • getContainingPages

      List<Page> getContainingPages(Template template)
      Parameters:
      template - the template
      Returns:
      Containing Pages
    • getStructureResources

      List<Resource> getStructureResources(ComponentContext componentContext)
      Parameters:
      componentContext - the component context
      Returns:
      list of structureResources
    • getContainingTemplate

      Template getContainingTemplate(Resource resource)
      Parameters:
      resource - the resource that contains template
      Returns:
      Template
    • getAllTemplates

      List<Template> getAllTemplates()
      Returns:
      List of All Templates
    • getTemplates

      List<Template> getTemplates(Predicate filter)
      Parameters:
      filter - filter templates
      Returns:
      Get Filtered Templates
    • getTemplates

      @Deprecated List<Template> getTemplates(Predicate filter)
      Deprecated.
      Parameters:
      filter - filter templates
      Returns:
      Get Filtered Templates
    • getTemplate

      Template getTemplate(String templatePath)
      Parameters:
      templatePath - the path for the template
      Returns:
      the template at the templatePath
    • getTemplateTypes

      List<Template> getTemplateTypes(String parentPath)
      Get template types
      Parameters:
      parentPath - The parent path for the templates
      Returns:
      Template type for each template
    • isTemplateUsed

      boolean isTemplateUsed(Template template)
      Verifies if there is any Page using the given Template. If the parameter is null, false is returned.
      Parameters:
      template - the Template to test
      Returns:
      true if there is any Page using the Template
      Since:
      1.29