Class FileSystemIntegrationConfigLoader

java.lang.Object
com.agentforge4j.config.loader.integration.FileSystemIntegrationConfigLoader
All Implemented Interfaces:
IntegrationConfigLoader

public final class FileSystemIntegrationConfigLoader extends Object implements IntegrationConfigLoader
Loads IntegrationDefinitions from top-level *.json files in a single integrations directory. Each file is one integration in the integration.schema.json envelope; the type-specific config payload is retained verbatim as JSON text and never interpreted here — parsing it is the ToolProviderFactory's job.

Selection is non-recursive: subdirectories and non-.json entries are ignored. Loading is all-or-nothing — a malformed or schema-invalid file fails the whole load with one exception naming every offending file, and a duplicate integration id across files fails naming the id and both files. The loader does not filter on active; inactive definitions load normally and are excluded later by capability resolution.

  • Constructor Details

    • FileSystemIntegrationConfigLoader

      public FileSystemIntegrationConfigLoader(com.fasterxml.jackson.databind.ObjectMapper objectMapper, SchemaProvider schemaProvider, Path integrationsRoot)
      Creates a loader over a single integrations directory.
      Parameters:
      objectMapper - JSON mapper used to parse definition files; must not be null
      schemaProvider - source of integration.schema.json; must not be null
      integrationsRoot - directory holding the integration definition files; must be an existing directory
      Throws:
      IllegalArgumentException - if integrationsRoot is missing or not a directory
  • Method Details