Class DatabaseImporter

java.lang.Object
DatabaseImporter

public class DatabaseImporter extends Object
CLI utility to import a directory of project files into the application's projects repository and persist a corresponding database record.

Usage:

  java DatabaseImporter --import-folder /path/to/folder --recipient NAME --projectType TYPE
On success the tool prints a single JSON line including the newly created project's id and name.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Private constructor to prevent instantiation; this class is a CLI utility.
  • Method Summary

    Modifier and Type
    Method
    Description
    private static void
    copyRecursive(Path src, Path dst)
    Recursively copy files from src to dst, preserving directory structure.
    static void
    main(String[] args)
    CLI entry point for importing a folder of project files into the application.

    Methods inherited from class Object

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

    • DatabaseImporter

      private DatabaseImporter()
      Private constructor to prevent instantiation; this class is a CLI utility.
  • Method Details

    • copyRecursive

      private static void copyRecursive(Path src, Path dst) throws IOException
      Recursively copy files from src to dst, preserving directory structure. Throws IOException on failure.
      Parameters:
      src - source path
      dst - destination path
      Throws:
      IOException - when IO operations fail
    • main

      public static void main(String[] args)
      CLI entry point for importing a folder of project files into the application.
      Parameters:
      args - command-line arguments. Expected options:
      • --import-folder <path> (required)
      • --recipient <name>
      • --projectType <type>