Class CommentHook

java.lang.Object
pro.verron.officestamper.core.CommentHook
All Implemented Interfaces:
Hook, DocxHook

public class CommentHook extends Object implements DocxHook
A hook that processes comments in a document.
  • Method Details

    • run

      public boolean run(EngineFactory engineFactory, ContextRoot contextRoot, OfficeStamperEvaluationContextFactory evaluationContextFactory)
      Description copied from interface: DocxHook
      Executes the hook's logic within the context of a document processing flow.
      Specified by:
      run in interface DocxHook
      Parameters:
      engineFactory - a factory responsible for creating instances of the Engine class, which may be used during the execution of the hook's logic
      contextRoot - the root of the context tree, representing the hierarchical structure of context branches available during document processing
      evaluationContextFactory - a factory for creating evaluation contexts, which are used to evaluate expressions and handle dynamic behavior during the document processing flow
      Returns:
      true if the execution of the hook was successful, otherwise false
    • setContextKey

      public void setContextKey(String contextKey)
      Description copied from interface: Hook
      Sets the context key associated with this hook. The context key is a unique identifier that can be used to match or scope the hook's execution within a specific ContextTree branch during document processing.
      Specified by:
      setContextKey in interface Hook
      Parameters:
      contextKey - the unique key representing the context in which this hook should operate