Class WebTemplateRegistry

java.lang.Object
com.foreach.across.modules.web.template.WebTemplateRegistry

public class WebTemplateRegistry extends Object
Registry of all known WebTemplate instances with their unique name.
  • Constructor Details

    • WebTemplateRegistry

      public WebTemplateRegistry()
  • Method Details

    • register

      public void register(NamedWebTemplateProcessor webTemplateProcessor)
      Register a WebTemplateProcessor instance.
      Parameters:
      webTemplateProcessor - Named WebTemplateProcessor instance.
    • unregister

      public void unregister(NamedWebTemplateProcessor webTemplateProcessor)
    • register

      public void register(String name, WebTemplateProcessor webTemplateProcessor)
      Register a WebTemplateProcessor instance under a unique name.
      Parameters:
      name - Unique name of the instance.
      webTemplateProcessor - WebTemplateProcessor instance.
    • unregister

      public void unregister(String name)
    • getDefaultTemplateName

      public String getDefaultTemplateName()
      Returns:
      Name of the default template that will be applied if no template is specified.
    • hasDefaultTemplate

      public boolean hasDefaultTemplate()
    • setDefaultTemplateName

      public void setDefaultTemplateName(String defaultTemplateName)
    • get

      public WebTemplateProcessor get(String name)
    • clear

      public void clear()
    • getTemplateProcessors

      public Map<String,WebTemplateProcessor> getTemplateProcessors()