Class ContextualTemplateRenderer

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doDestroy()  
      protected void doInitialize()  
      void render​(TemplateRule templateRule, Activity activity)
      Renders the template with specified TemplateRule.
      void render​(TemplateRule templateRule, Activity activity, java.util.Map<java.lang.String,​java.lang.Object> model)
      Renders the template with specified TemplateRule.
      void render​(TemplateRule templateRule, Activity activity, java.util.Map<java.lang.String,​java.lang.Object> model, java.io.Writer writer)
      Renders the template with specified TemplateRule.
      java.lang.String render​(TemplateRule templateRule, java.util.Map<java.lang.String,​java.lang.Object> model)
      Renders the template with specified TemplateRule.
      java.lang.String render​(java.lang.String templateId)
      Renders the template with specified TemplateRule by its ID.
      void render​(java.lang.String templateId, Activity activity)
      Renders the template with specified TemplateRule by its ID.
      void render​(java.lang.String templateId, Activity activity, java.io.Writer writer)
      Renders the template with specified TemplateRule by its ID.
      void render​(java.lang.String templateId, Activity activity, java.util.Map<java.lang.String,​java.lang.Object> model)
      Renders the template with specified TemplateRule by its ID.
      void render​(java.lang.String templateId, Activity activity, java.util.Map<java.lang.String,​java.lang.Object> model, java.io.Writer writer)
      TRenders the template with specified TemplateRule by its ID.
      java.lang.String render​(java.lang.String templateId, java.util.Map<java.lang.String,​java.lang.Object> model)
      Renders the template with specified TemplateRule by its ID.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ContextualTemplateRenderer

        public ContextualTemplateRenderer​(ActivityContext context,
                                          TemplateRuleRegistry templateRuleRegistry)
        Instantiates a new context template renderer.
        Parameters:
        context - the activity context
        templateRuleRegistry - the template rule registry
    • Method Detail

      • render

        public java.lang.String render​(java.lang.String templateId)
        Description copied from interface: TemplateRenderer
        Renders the template with specified TemplateRule by its ID.
        Specified by:
        render in interface TemplateRenderer
        Parameters:
        templateId - the template id
        Returns:
        the output string of the template
      • render

        public java.lang.String render​(java.lang.String templateId,
                                       java.util.Map<java.lang.String,​java.lang.Object> model)
        Description copied from interface: TemplateRenderer
        Renders the template with specified TemplateRule by its ID.
        Specified by:
        render in interface TemplateRenderer
        Parameters:
        templateId - the template id
        model - the holder of the variables visible from the template (name-value pairs)
        Returns:
        the output string of the template
      • render

        public java.lang.String render​(TemplateRule templateRule,
                                       java.util.Map<java.lang.String,​java.lang.Object> model)
        Description copied from interface: TemplateRenderer
        Renders the template with specified TemplateRule.
        Specified by:
        render in interface TemplateRenderer
        Parameters:
        templateRule - the template rule
        model - the holder of the variables visible from the template (name-value pairs)
        Returns:
        the output string of the template
      • render

        public void render​(java.lang.String templateId,
                           Activity activity)
        Description copied from interface: TemplateRenderer
        Renders the template with specified TemplateRule by its ID.
        Specified by:
        render in interface TemplateRenderer
        Parameters:
        templateId - the template id
        activity - the activity
      • render

        public void render​(TemplateRule templateRule,
                           Activity activity)
        Description copied from interface: TemplateRenderer
        Renders the template with specified TemplateRule.
        Specified by:
        render in interface TemplateRenderer
        Parameters:
        templateRule - the template rule
        activity - the activity
      • render

        public void render​(java.lang.String templateId,
                           Activity activity,
                           java.util.Map<java.lang.String,​java.lang.Object> model)
        Description copied from interface: TemplateRenderer
        Renders the template with specified TemplateRule by its ID.
        Specified by:
        render in interface TemplateRenderer
        Parameters:
        templateId - the template id
        activity - the activity
        model - the holder of the variables visible from the template (name-value pairs)
      • render

        public void render​(java.lang.String templateId,
                           Activity activity,
                           java.io.Writer writer)
        Description copied from interface: TemplateRenderer
        Renders the template with specified TemplateRule by its ID.
        Specified by:
        render in interface TemplateRenderer
        Parameters:
        templateId - the template id
        activity - the activity
        writer - the Writer where the output of the template will go. Writer.close() is not called.
      • render

        public void render​(TemplateRule templateRule,
                           Activity activity,
                           java.util.Map<java.lang.String,​java.lang.Object> model)
        Description copied from interface: TemplateRenderer
        Renders the template with specified TemplateRule.
        Specified by:
        render in interface TemplateRenderer
        Parameters:
        templateRule - the template rule
        activity - the activity
        model - the holder of the variables visible from the template (name-value pairs)
      • render

        public void render​(java.lang.String templateId,
                           Activity activity,
                           java.util.Map<java.lang.String,​java.lang.Object> model,
                           java.io.Writer writer)
        Description copied from interface: TemplateRenderer
        TRenders the template with specified TemplateRule by its ID. Writing the generated output to the supplied Writer.
        Specified by:
        render in interface TemplateRenderer
        Parameters:
        templateId - the template id
        activity - the activity
        model - the holder of the variables visible from the template (name-value pairs)
        writer - the Writer where the output of the template will go. Writer.close() is not called.
      • render

        public void render​(TemplateRule templateRule,
                           Activity activity,
                           java.util.Map<java.lang.String,​java.lang.Object> model,
                           java.io.Writer writer)
        Description copied from interface: TemplateRenderer
        Renders the template with specified TemplateRule. Writing the generated output to the supplied Writer.
        Specified by:
        render in interface TemplateRenderer
        Parameters:
        templateRule - the template rule
        activity - the activity
        model - the holder of the variables visible from the template (name-value pairs)
        writer - the Writer where the output of the template will go. Writer.close() is not called.
      • doInitialize

        protected void doInitialize()
                             throws java.lang.Exception
        Specified by:
        doInitialize in class AbstractComponent
        Throws:
        java.lang.Exception