Class CheckResultsSection
java.lang.Object
com.scivicslab.turingworkflow.plugins.report.sections.basic.CheckResultsSection
- All Implemented Interfaces:
SectionBuilder
POJO section builder that collects and outputs messages with % prefix.
Pure business logic - no CallableByActionName.
Use CheckResultsSectionActor to expose as an actor.
The % prefix is used in workflows to mark lines that should be collected and displayed in the final report.
- Since:
- 2.16.0
- Author:
- devteam@scivicslab.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerate()Generates the section content.getTitle()Returns the section title.voidsetConnection(Connection connection) Sets the database connection for log queries.voidsetSessionId(long sessionId) Sets the session ID to query logs from.
-
Constructor Details
-
CheckResultsSection
public CheckResultsSection()
-
-
Method Details
-
setConnection
Sets the database connection for log queries.- Parameters:
connection- the JDBC connection to the H2 log database
-
setSessionId
public void setSessionId(long sessionId) Sets the session ID to query logs from.- Parameters:
sessionId- the session ID
-
generate
Generates the section content.Queries the log database for messages prefixed with
%. Lines matching the pattern (optionally preceded by a[node-xxx]prefix) are extracted, deduplicated, sorted, and output under a[Check Results]header.- Specified by:
generatein interfaceSectionBuilder- Returns:
- the formatted check results content, or empty string if none found
-
getTitle
Returns the section title.If null or empty, the section content is output without a title line.
Always returns
nullbecause the title is embedded within the generated content.- Specified by:
getTitlein interfaceSectionBuilder- Returns:
- the section title, or null for no title
-