Class ConfigState
java.lang.Object
ai.attackframework.tools.burp.utils.config.ConfigState
Defines the typed configuration model used by the UI and JSON import/export.
The nested records normalize nullable inputs and defensively copy collections so callers can treat each instance as an immutable snapshot.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumScope kind forConfigState.ScopeEntry.static final recordPersisted preferences for the Log panel UI.static final recordPersisted non-secret OpenSearch settings that should survive config export/import.static final recordOrdered custom-scope entry.static final recordSinks selection and values.static final recordCaptures the full persisted exporter configuration.static final recordPersisted UI preferences that should survive save/export/import. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault interval for exporter stats snapshots.Default exporter sub-options: all tool documents enabled by default.static final intDefault advanced disk-used threshold for file export.static final doubleDefault total cap across exporter files under the selected root, stored as human-friendly GB.Default findings severities: all five.static final StringDefault base template used to derive default index names.static final StringDefault minimum visible level in LogPanel.static final StringDefault persisted OpenSearch auth type selection.Default settings sub-options (project, user).static final intDefault Stats panel chart style (1 = Smooth).Default traffic tool types: all traffic sources enabled by default.static final StringTrust all OpenSearch TLS certificates without verification.static final StringTrust only the session-imported pinned OpenSearch certificate.static final StringVerify OpenSearch TLS certificates against the system trust store. -
Method Summary
Modifier and TypeMethodDescriptionstatic doublebytesToGb(long bytes) Converts runtime bytes to the human-friendly GB value used in config state/export.Default persisted LogPanel preferences.Default persisted OpenSearch non-secret settings.static ConfigState.UiPreferencesDefault persisted UI preferences.static longgbToBytes(double gb) Converts a human-friendly GB value to runtime bytes using half-up rounding.normalizeDataSources(List<String> values) Normalizes config data-source ids to lowercase.static intnormalizeExporterStatsIntervalSeconds(int value) Normalizes the exporter stats interval to a positive number of seconds.normalizeExporterSubOptions(List<String> values) Normalizes exporter sub-option ids to lowercase.static doublenormalizeFileTotalCapGb(double raw) Normalizes stored file-cap GB values and falls back to the default when unset or invalid.normalizeFindingsSeverities(List<String> values) Normalizes finding severity ids to lowercase.static StringnormalizeIndexNameBaseTemplate(String template) Normalizes the stored global index base template.static StringReturns one of trace/debug/info/warn/error, defaulting to trace.static StringnormalizeOpenSearchAuthType(String authType) Returns a normalized persisted OpenSearch auth type, defaulting toDEFAULT_OPEN_SEARCH_AUTH_TYPE.static StringReturns a normalized persisted OpenSearch TLS mode, defaulting toOPEN_SEARCH_TLS_VERIFY.static StringnormalizeScopeType(String raw) Normalizes persisted scope type values to lowercase supported ids.normalizeSettingsSub(List<String> values) Normalizes settings sub-option ids to lowercase.normalizeTrafficToolTypes(List<String> values) Normalizes traffic tool ids to lowercase.
-
Field Details
-
DEFAULT_SETTINGS_SUB
Default settings sub-options (project, user). -
DEFAULT_TRAFFIC_TOOL_TYPES
Default traffic tool types: all traffic sources enabled by default. -
DEFAULT_FINDINGS_SEVERITIES
Default findings severities: all five. -
DEFAULT_EXPORTER_SUB_OPTIONS
Default exporter sub-options: all tool documents enabled by default. -
DEFAULT_EXPORTER_STATS_INTERVAL_SECONDS
public static final int DEFAULT_EXPORTER_STATS_INTERVAL_SECONDSDefault interval for exporter stats snapshots.- See Also:
-
DEFAULT_INDEX_NAME_BASE_TEMPLATE
Default base template used to derive default index names.- See Also:
-
DEFAULT_FILE_TOTAL_CAP_GB
public static final double DEFAULT_FILE_TOTAL_CAP_GBDefault total cap across exporter files under the selected root, stored as human-friendly GB.- See Also:
-
DEFAULT_FILE_MAX_DISK_USED_PERCENT
public static final int DEFAULT_FILE_MAX_DISK_USED_PERCENTDefault advanced disk-used threshold for file export.- See Also:
-
DEFAULT_STATS_CHART_STYLE
public static final int DEFAULT_STATS_CHART_STYLEDefault Stats panel chart style (1 = Smooth).- See Also:
-
DEFAULT_LOG_MIN_LEVEL
Default minimum visible level in LogPanel.- See Also:
-
OPEN_SEARCH_TLS_VERIFY
Verify OpenSearch TLS certificates against the system trust store.- See Also:
-
OPEN_SEARCH_TLS_PINNED
Trust only the session-imported pinned OpenSearch certificate.- See Also:
-
OPEN_SEARCH_TLS_INSECURE
Trust all OpenSearch TLS certificates without verification.- See Also:
-
DEFAULT_OPEN_SEARCH_AUTH_TYPE
Default persisted OpenSearch auth type selection.- See Also:
-
-
Method Details
-
defaultLogPanelPreferences
Default persisted LogPanel preferences. -
defaultUiPreferences
Default persisted UI preferences. -
defaultOpenSearchOptions
Default persisted OpenSearch non-secret settings. -
gbToBytes
public static long gbToBytes(double gb) Converts a human-friendly GB value to runtime bytes using half-up rounding. -
bytesToGb
public static double bytesToGb(long bytes) Converts runtime bytes to the human-friendly GB value used in config state/export. -
normalizeOpenSearchTlsMode
Returns a normalized persisted OpenSearch TLS mode, defaulting toOPEN_SEARCH_TLS_VERIFY. -
normalizeOpenSearchAuthType
Returns a normalized persisted OpenSearch auth type, defaulting toDEFAULT_OPEN_SEARCH_AUTH_TYPE. -
normalizeLogMinLevel
Returns one of trace/debug/info/warn/error, defaulting to trace. -
normalizeFileTotalCapGb
public static double normalizeFileTotalCapGb(double raw) Normalizes stored file-cap GB values and falls back to the default when unset or invalid. -
normalizeDataSources
Normalizes config data-source ids to lowercase. -
normalizeSettingsSub
Normalizes settings sub-option ids to lowercase. -
normalizeTrafficToolTypes
Normalizes traffic tool ids to lowercase. -
normalizeFindingsSeverities
Normalizes finding severity ids to lowercase. -
normalizeExporterSubOptions
Normalizes exporter sub-option ids to lowercase. -
normalizeIndexNameBaseTemplate
Normalizes the stored global index base template. -
normalizeExporterStatsIntervalSeconds
public static int normalizeExporterStatsIntervalSeconds(int value) Normalizes the exporter stats interval to a positive number of seconds. -
normalizeScopeType
Normalizes persisted scope type values to lowercase supported ids.
-