Class InitialDataLoader

java.lang.Object
ai.mindconnect.cli.InitialDataLoader

@Component public class InitialDataLoader extends Object
Loads initial data from classpath:initial-data/ on startup.

  • initial-data/llm-configs/*.json — imported if no config with the same name exists; if the stored config differs from the classpath version the supplied InitialDataLoader.ConfirmOverwrite callback is invoked and the record is overwritten only if it returns true.
  • initial-data/agent-definitions/*.json — same semantics per name+namespace.
New records are always imported. Existing identical records are silently skipped.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
    Called when a stored entity differs from the classpath version.
  • Constructor Summary

    Constructors
    Constructor
    Description
    InitialDataLoader(ai.mindconnect.llm.port.out.LlmConfigRepository llmConfigRepository, ai.mindconnect.agent.port.out.AgentDefinitionRepository agentDefinitionRepository, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Load without interactive prompts — existing differing records are skipped with a log warning.
    void
    Load with a confirm callback for overwrite decisions.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • InitialDataLoader

      public InitialDataLoader(ai.mindconnect.llm.port.out.LlmConfigRepository llmConfigRepository, ai.mindconnect.agent.port.out.AgentDefinitionRepository agentDefinitionRepository, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
  • Method Details

    • load

      public void load()
      Load without interactive prompts — existing differing records are skipped with a log warning.
    • load

      public void load(InitialDataLoader.ConfirmOverwrite confirmOverwrite)
      Load with a confirm callback for overwrite decisions.