Class TemplateService

java.lang.Object
org.exoplatform.groovyscript.text.TemplateService
All Implemented Interfaces:
org.picocontainer.Startable

public class TemplateService extends Object implements org.picocontainer.Startable
Created by The eXo Platform SAS Dec 26, 2005
  • Constructor Details

    • TemplateService

      public TemplateService(TemplateStatisticService statisticService, org.exoplatform.services.cache.CacheService cservice, org.exoplatform.container.xml.InitParams initParams) throws Exception
      Throws:
      Exception
  • Method Details

    • merge

      public void merge(String name, BindingContext context) throws Exception
      Throws:
      Exception
    • merge

      @Deprecated public void merge(groovy.text.Template template, BindingContext context) throws Exception
      Deprecated.
      Throws:
      Exception
    • include

      public void include(String name, BindingContext context) throws Exception
      Throws:
      Exception
    • include

      public void include(String name, BindingContext context, org.exoplatform.resolver.ResourceResolver resourceResolver) throws Exception
      Throws:
      Exception
    • getTemplate

      public final GroovyTemplate getTemplate(String name, org.exoplatform.resolver.ResourceResolver resolver) throws Exception
      Throws:
      Exception
    • getTemplate

      public final GroovyTemplate getTemplate(String url, org.exoplatform.resolver.ResourceResolver resolver, boolean cacheable) throws Exception
      Throws:
      Exception
    • invalidateTemplate

      public final void invalidateTemplate(String name, org.exoplatform.resolver.ResourceResolver resolver)
    • getTemplatesCache

      public org.exoplatform.services.cache.ExoCache<org.exoplatform.resolver.ResourceKey,GroovyTemplate> getTemplatesCache()
    • enableStatistics

      public void enableStatistics(boolean enable)
    • reloadTemplates

      public void reloadTemplates()
    • reloadTemplate

      public void reloadTemplate(String name)
    • listCachedTemplates

      public String[] listCachedTemplates()
    • start

      public void start()
      Specified by:
      start in interface org.picocontainer.Startable
    • stop

      public void stop()
      Specified by:
      stop in interface org.picocontainer.Startable
    • addTemplateExtension

      public void addTemplateExtension(TemplateExtensionPlugin templateExtensionPlugin)
      Add template extension by compoennt plugin injected from kernel configuration
      Parameters:
      templateExtensionPlugin - list of gtmpl templates added in component plugin
    • getTemplateExtensions

      public Set<String> getTemplateExtensions(String templateName)