Module agentforge4j.config.loader
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 Summary
ConstructorsConstructorDescriptionFileSystemIntegrationConfigLoader(com.fasterxml.jackson.databind.ObjectMapper objectMapper, SchemaProvider schemaProvider, Path integrationsRoot) Creates a loader over a single integrations directory. -
Method Summary
-
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 benullschemaProvider- source ofintegration.schema.json; must not benullintegrationsRoot- directory holding the integration definition files; must be an existing directory- Throws:
IllegalArgumentException- ifintegrationsRootis missing or not a directory
-
-
Method Details
-
load
Description copied from interface:IntegrationConfigLoaderLoads the configured integration definitions.- Specified by:
loadin interfaceIntegrationConfigLoader- Returns:
- the loaded definitions; never
null
-