Class DatabaseImporter
java.lang.Object
DatabaseImporter
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 TYPEOn success the tool prints a single JSON line including the newly created project's id and name.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePrivate constructor to prevent instantiation; this class is a CLI utility. -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidcopyRecursive(Path src, Path dst) Recursively copy files fromsrctodst, preserving directory structure.static voidCLI entry point for importing a folder of project files into the application.
-
Constructor Details
-
DatabaseImporter
private DatabaseImporter()Private constructor to prevent instantiation; this class is a CLI utility.
-
-
Method Details
-
copyRecursive
Recursively copy files fromsrctodst, preserving directory structure. ThrowsIOExceptionon failure.- Parameters:
src- source pathdst- destination path- Throws:
IOException- when IO operations fail
-
main
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>
-