Class TemplatedExecutableStatementBuilder

    • Field Detail

      • log

        private final org.slf4j.Logger log
        Class logger.
      • template

        private Template template
        Template to be evaluated.
      • templateText

        private String templateText
        Template (as Text) to be evaluated.
      • engine

        private org.apache.velocity.app.VelocityEngine engine
        VelocityEngine.
      • eventHandler

        private org.apache.velocity.app.event.ReferenceInsertionEventHandler eventHandler
        Event handler used for escaping.
      • v2Compatibility

        private boolean v2Compatibility
        Do we need to make ourself V2 Compatible?
    • Constructor Detail

      • TemplatedExecutableStatementBuilder

        public TemplatedExecutableStatementBuilder()
    • Method Detail

      • getTemplateText

        @NonnullAfterInit
        public String getTemplateText()
        Gets the template text to be evaluated.
        Returns:
        the template text
      • setTemplateText

        public void setTemplateText​(@Nullable
                                    String velocityTemplate)
        Sets the template to be evaluated.
        Parameters:
        velocityTemplate - template to be evaluated
      • getVelocityEngine

        @Nullable
        @NonnullAfterInit
        public org.apache.velocity.app.VelocityEngine getVelocityEngine()
        Gets the VelocityEngine to be used.
        Returns:
        the template
      • setVelocityEngine

        public void setVelocityEngine​(@Nonnull
                                      org.apache.velocity.app.VelocityEngine velocityEngine)
        Sets the VelocityEngine to be used.
        Parameters:
        velocityEngine - engine to be used
      • getReferenceInsertionEventHandler

        @Nullable
        public org.apache.velocity.app.event.ReferenceInsertionEventHandler getReferenceInsertionEventHandler()
        Gets the ReferenceInsertionEventHandler to be used.
        Returns:
        the reference insertion event handler
      • setReferenceInsertionEventHandler

        public void setReferenceInsertionEventHandler​(@Nullable
                                                      org.apache.velocity.app.event.ReferenceInsertionEventHandler handler)
        Sets the ReferenceInsertionEventHandler to be used.
        Parameters:
        handler - reference insertion event handler to be used
      • isV2Compatibility

        public boolean isV2Compatibility()
        Are we in V2 Compatibility mode?
        Returns:
        Returns the v2Compat.
      • setV2Compatibility

        public void setV2Compatibility​(boolean compat)
        What is out V2 Compatibility mode.
        Parameters:
        compat - The mode to set.
      • addExtraVelocityContext

        protected void addExtraVelocityContext​(@Nonnull
                                               org.apache.velocity.VelocityContext velocityContext,
                                               @Nonnull
                                               AttributeResolutionContext resolutionContext)
        Method to allow private additions to the velocity context.
        Parameters:
        velocityContext - where to add the information
        resolutionContext - current resolution context