Class ContextTemplateProcessor

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doDestroy()  
      protected void doInitialize()  
      void process​(TemplateRule templateRule, Activity activity)
      Template processing with specified TemplateRule.
      void process​(TemplateRule templateRule, Activity activity, java.util.Map<java.lang.String,​java.lang.Object> model)
      Template processing with specified TemplateRule.
      void process​(TemplateRule templateRule, Activity activity, java.util.Map<java.lang.String,​java.lang.Object> model, java.io.Writer writer)
      Template processing with specified TemplateRule.
      java.lang.String process​(TemplateRule templateRule, java.util.Map<java.lang.String,​java.lang.Object> model)
      Template processing with specified TemplateRule.
      java.lang.String process​(java.lang.String templateId)
      Template processing with specified TemplateRule by its ID.
      void process​(java.lang.String templateId, Activity activity)
      Template processing with specified TemplateRule by its ID.
      void process​(java.lang.String templateId, Activity activity, java.io.Writer writer)
      Template processing with specified TemplateRule by its ID.
      void process​(java.lang.String templateId, Activity activity, java.util.Map<java.lang.String,​java.lang.Object> model)
      Template processing with specified TemplateRule by its ID.
      void process​(java.lang.String templateId, Activity activity, java.util.Map<java.lang.String,​java.lang.Object> model, java.io.Writer writer)
      Template processing with specified TemplateRule by its ID.
      java.lang.String process​(java.lang.String templateId, java.util.Map<java.lang.String,​java.lang.Object> model)
      Template processing 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

      • ContextTemplateProcessor

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

      • process

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

        public java.lang.String process​(java.lang.String templateId,
                                        java.util.Map<java.lang.String,​java.lang.Object> model)
        Description copied from interface: TemplateProcessor
        Template processing with specified TemplateRule by its ID.
        Specified by:
        process in interface TemplateProcessor
        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
      • process

        public java.lang.String process​(TemplateRule templateRule,
                                        java.util.Map<java.lang.String,​java.lang.Object> model)
        Description copied from interface: TemplateProcessor
        Template processing with specified TemplateRule.
        Specified by:
        process in interface TemplateProcessor
        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
      • process

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

        public void process​(TemplateRule templateRule,
                            Activity activity)
        Description copied from interface: TemplateProcessor
        Template processing with specified TemplateRule.
        Specified by:
        process in interface TemplateProcessor
        Parameters:
        templateRule - the template rule
        activity - the activity
      • process

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

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

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

        public void process​(java.lang.String templateId,
                            Activity activity,
                            java.util.Map<java.lang.String,​java.lang.Object> model,
                            java.io.Writer writer)
        Description copied from interface: TemplateProcessor
        Template processing with specified TemplateRule by its ID. Writing the generated output to the supplied Writer.
        Specified by:
        process in interface TemplateProcessor
        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.
      • process

        public void process​(TemplateRule templateRule,
                            Activity activity,
                            java.util.Map<java.lang.String,​java.lang.Object> model,
                            java.io.Writer writer)
        Description copied from interface: TemplateProcessor
        Template processing with specified TemplateRule. Writing the generated output to the supplied Writer.
        Specified by:
        process in interface TemplateProcessor
        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