Class IncludesHandler

java.lang.Object
sk.iway.iwcm.components.ai.providers.IncludesHandler

public class IncludesHandler extends Object
Protects CMS INCLUDE commands while text is transformed by an AI provider.
  • Method Details

    • getWholeResponse

      public String getWholeResponse()
    • finish

      public void finish(BufferedWriter writer) throws IOException
      Flushes any trailing fragment retained while checking a split protected token.
      Parameters:
      writer - destination for restored response content
      Throws:
      IOException - if the restored content cannot be written
    • handleLine

      public void handleLine(String line, BufferedWriter writer) throws IOException
      Restores and writes the part of a streamed response that is safe to emit.
      Parameters:
      line - next streamed response fragment
      writer - destination for restored response content
      Throws:
      IOException - if the restored content cannot be written
      IllegalStateException - if the stream has already been finished
    • hasIncludes

      public boolean hasIncludes()