Interface TemplateManager


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

      • createTemplate

        Template createTemplate​(java.lang.String parentPath,
                                java.lang.String templateType,
                                java.lang.String templateName,
                                ValueMap templateProperties)
                         throws WCMException
        Creates a new template
        Parameters:
        parentPath - the parent path
        templateName - the template name
        templateProperties - properties of template
        templateType - type 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

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

        java.util.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

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

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

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

        java.util.List<Template> getTemplateTypes​(java.lang.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