Class SingleDocOutcomeRecorder
java.lang.Object
ai.attackframework.tools.burp.sinks.SingleDocOutcomeRecorder
Shared single-document outcome accounting for reporters that push one document at a time.
Complements BulkOutcomeRecorder for callers such as ExporterIndexConfigReporter,
ExporterIndexLogForwarder, ExporterIndexStatsReporter, and
SettingsIndexReporter, which each push individual documents via
OpenSearchClientWrapper.pushDocument and would otherwise duplicate the same
recordSuccess/recordFailure/recordLastError triplet on every call site.
When openSearchActive is false, counters are not touched (file-sink
accounting is handled elsewhere). Callers are responsible for any panel-only log output;
this helper intentionally avoids emitting logs because prefix and wording vary per reporter.
-
Method Summary
-
Method Details
-
record
public static void record(String indexKey, boolean ok, boolean openSearchActive, String errorSummary) Records one single-document push outcome forindexKey.- Parameters:
indexKey- logical index key (for example"exporter","settings"); must not benullor blankok-truewhen the push succeeded;falsewhen it failedopenSearchActive- whether the OpenSearch sink was active for this push; whenfalsethe helper returns without touching counterserrorSummary- short error description stored viaExportStats.recordLastError(String, String)when!ok; blank ornullfalls back to"Single-document push failed"- Throws:
IllegalArgumentException- ifindexKeyisnullor blank
-