Class IncludesHandler
java.lang.Object
sk.iway.iwcm.components.ai.providers.IncludesHandler
Protects CMS INCLUDE commands while text is transformed by an AI provider.
-
Method Summary
Modifier and TypeMethodDescriptionvoidfinish(BufferedWriter writer) Flushes any trailing fragment retained while checking a split protected token.voidhandleLine(String line, BufferedWriter writer) Restores and writes the part of a streamed response that is safe to emit.boolean
-
Method Details
-
getWholeResponse
-
finish
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
Restores and writes the part of a streamed response that is safe to emit.- Parameters:
line- next streamed response fragmentwriter- destination for restored response content- Throws:
IOException- if the restored content cannot be writtenIllegalStateException- if the stream has already been finished
-
hasIncludes
public boolean hasIncludes()
-