Class ConfigState

java.lang.Object
ai.attackframework.tools.burp.utils.config.ConfigState

public final class ConfigState extends Object
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.

  • Field Details

    • DEFAULT_SETTINGS_SUB

      public static final List<String> DEFAULT_SETTINGS_SUB
      Default settings sub-options (project, user).
    • DEFAULT_TRAFFIC_TOOL_TYPES

      public static final List<String> DEFAULT_TRAFFIC_TOOL_TYPES
      Default traffic tool types: all traffic sources enabled by default.
    • DEFAULT_FINDINGS_SEVERITIES

      public static final List<String> DEFAULT_FINDINGS_SEVERITIES
      Default findings severities: all five.
    • DEFAULT_EXPORTER_SUB_OPTIONS

      public static final List<String> 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_SECONDS
      Default interval for exporter stats snapshots.
      See Also:
    • DEFAULT_INDEX_NAME_BASE_TEMPLATE

      public static final String 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_GB
      Default 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_PERCENT
      Default advanced disk-used threshold for file export.
      See Also:
    • DEFAULT_STATS_CHART_STYLE

      public static final int DEFAULT_STATS_CHART_STYLE
      Default Stats panel chart style (1 = Smooth).
      See Also:
    • DEFAULT_LOG_MIN_LEVEL

      public static final String DEFAULT_LOG_MIN_LEVEL
      Default minimum visible level in LogPanel.
      See Also:
    • OPEN_SEARCH_TLS_VERIFY

      public static final String OPEN_SEARCH_TLS_VERIFY
      Verify OpenSearch TLS certificates against the system trust store.
      See Also:
    • OPEN_SEARCH_TLS_PINNED

      public static final String OPEN_SEARCH_TLS_PINNED
      Trust only the session-imported pinned OpenSearch certificate.
      See Also:
    • OPEN_SEARCH_TLS_INSECURE

      public static final String OPEN_SEARCH_TLS_INSECURE
      Trust all OpenSearch TLS certificates without verification.
      See Also:
    • DEFAULT_OPEN_SEARCH_AUTH_TYPE

      public static final String DEFAULT_OPEN_SEARCH_AUTH_TYPE
      Default persisted OpenSearch auth type selection.
      See Also:
  • Method Details

    • defaultLogPanelPreferences

      public static ConfigState.LogPanelPreferences defaultLogPanelPreferences()
      Default persisted LogPanel preferences.
    • defaultUiPreferences

      public static ConfigState.UiPreferences defaultUiPreferences()
      Default persisted UI preferences.
    • defaultOpenSearchOptions

      public static ConfigState.OpenSearchOptions 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

      public static String normalizeOpenSearchTlsMode(String mode)
      Returns a normalized persisted OpenSearch TLS mode, defaulting to OPEN_SEARCH_TLS_VERIFY.
    • normalizeOpenSearchAuthType

      public static String normalizeOpenSearchAuthType(String authType)
      Returns a normalized persisted OpenSearch auth type, defaulting to DEFAULT_OPEN_SEARCH_AUTH_TYPE.
    • normalizeLogMinLevel

      public static String normalizeLogMinLevel(String raw)
      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

      public static List<String> normalizeDataSources(List<String> values)
      Normalizes config data-source ids to lowercase.
    • normalizeSettingsSub

      public static List<String> normalizeSettingsSub(List<String> values)
      Normalizes settings sub-option ids to lowercase.
    • normalizeTrafficToolTypes

      public static List<String> normalizeTrafficToolTypes(List<String> values)
      Normalizes traffic tool ids to lowercase.
    • normalizeFindingsSeverities

      public static List<String> normalizeFindingsSeverities(List<String> values)
      Normalizes finding severity ids to lowercase.
    • normalizeExporterSubOptions

      public static List<String> normalizeExporterSubOptions(List<String> values)
      Normalizes exporter sub-option ids to lowercase.
    • normalizeIndexNameBaseTemplate

      public static String normalizeIndexNameBaseTemplate(String template)
      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

      public static String normalizeScopeType(String raw)
      Normalizes persisted scope type values to lowercase supported ids.