Interface TransformControl


public interface TransformControl
An interface that can be implemented by writers returned from TemplateTransformModel.getWriter(java.io.Writer, java.util.Map). The methods on this interfaces are callbacks that will be called by the template engine and that give the writer a chance to better control the evaluation of the transform body. The writer can instruct the engine to skip or to repeat body evaluation, and gets notified about exceptions that are thrown during the body evaluation.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Constant returned from afterBody() that tells the template engine to end the transform and close the writer.
    static final int
    Constant returned from onStart() that tells the template engine to evaluate the body.
    static final int
    Constant returned from afterBody() that tells the template engine to repeat transform body evaluation and feed it again to the transform.
    static final int
    Constant returned from onStart() that tells the template engine to skip evaluation of the body.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Called after the body has been evaluated.
    void
    Called if any exception occurs during the transform between the TemplateTransformModel.getWriter(java.io.Writer, java.util.Map) call and the Writer.close() call.
    int
    Called before the body is evaluated for the first time.