Nachbearbeitung: Meilensteinbezüge aus Produktiv-JavaDoc und
package-info entfernt
This commit is contained in:
@@ -42,7 +42,7 @@ import de.gecheckt.pdf.umbenenner.domain.model.RunId;
|
||||
* Responsibilities:
|
||||
* <ol>
|
||||
* <li>Load and validate the startup configuration.</li>
|
||||
* <li>Initialise the SQLite persistence schema (M4-AP-007).</li>
|
||||
* <li>Initialise the SQLite persistence schema.</li>
|
||||
* <li>Resolve the run-lock file path (with default fallback).</li>
|
||||
* <li>Create and wire all ports and adapters via configured factories.</li>
|
||||
* <li>Start the CLI adapter and execute the batch use case.</li>
|
||||
@@ -59,22 +59,20 @@ import de.gecheckt.pdf.umbenenner.domain.model.RunId;
|
||||
* during the run.</li>
|
||||
* </ul>
|
||||
*
|
||||
* <h2>M4 wiring (AP-006 / AP-007)</h2>
|
||||
* <h2>Adapter wiring</h2>
|
||||
* <p>
|
||||
* The production constructor wires the following M4 adapters:
|
||||
* The production constructor wires the following adapters:
|
||||
* <ul>
|
||||
* <li>{@link SqliteSchemaInitializationAdapter} — SQLite schema DDL at startup (AP-007).</li>
|
||||
* <li>{@link SqliteSchemaInitializationAdapter} — SQLite schema DDL at startup.</li>
|
||||
* <li>{@link Sha256FingerprintAdapter} — SHA-256 content fingerprinting.</li>
|
||||
* <li>{@link SqliteDocumentRecordRepositoryAdapter} — document master record CRUD.</li>
|
||||
* <li>{@link SqliteProcessingAttemptRepositoryAdapter} — attempt history CRUD.</li>
|
||||
* <li>{@link SqliteUnitOfWorkAdapter} — atomic persistence operations.</li>
|
||||
* </ul>
|
||||
* <p>
|
||||
* Schema initialisation is performed once in {@link #run()} before the batch loop starts
|
||||
* (AP-007). A {@link DocumentPersistenceException} during schema initialisation is treated
|
||||
* Schema initialisation is performed once in {@link #run()} before the batch loop starts.
|
||||
* A {@link DocumentPersistenceException} during schema initialisation is treated
|
||||
* as a hard startup failure and results in exit code 1.
|
||||
*
|
||||
* @since M2 (extended in M4-AP-006, M4-AP-007)
|
||||
*/
|
||||
public class BootstrapRunner {
|
||||
|
||||
@@ -142,21 +140,21 @@ public class BootstrapRunner {
|
||||
/**
|
||||
* Creates the BootstrapRunner with default factories for production use.
|
||||
* <p>
|
||||
* Wires the M4 processing pipeline:
|
||||
* Wires the processing pipeline with the following adapters:
|
||||
* <ul>
|
||||
* <li>{@link PropertiesConfigurationPortAdapter} for configuration loading.</li>
|
||||
* <li>{@link FilesystemRunLockPortAdapter} for exclusive run locking.</li>
|
||||
* <li>{@link SourceDocumentCandidatesPortAdapter} for PDF candidate discovery.</li>
|
||||
* <li>{@link PdfTextExtractionPortAdapter} for PDFBox-based text and page count extraction.</li>
|
||||
* <li>{@link Sha256FingerprintAdapter} for SHA-256 content fingerprinting.</li>
|
||||
* <li>{@link SqliteSchemaInitializationAdapter} for SQLite schema DDL at startup (AP-007).</li>
|
||||
* <li>{@link SqliteSchemaInitializationAdapter} for SQLite schema DDL at startup.</li>
|
||||
* <li>{@link SqliteDocumentRecordRepositoryAdapter} for document master record CRUD.</li>
|
||||
* <li>{@link SqliteProcessingAttemptRepositoryAdapter} for attempt history CRUD.</li>
|
||||
* <li>{@link SqliteUnitOfWorkAdapter} for atomic persistence operations.</li>
|
||||
* </ul>
|
||||
* <p>
|
||||
* Schema initialisation is performed explicitly in {@link #run()} before the batch loop
|
||||
* begins (AP-007). Failure during initialisation aborts the run with exit code 1.
|
||||
* begins. Failure during initialisation aborts the run with exit code 1.
|
||||
*/
|
||||
public BootstrapRunner() {
|
||||
this.configPortFactory = PropertiesConfigurationPortAdapter::new;
|
||||
@@ -191,7 +189,7 @@ public class BootstrapRunner {
|
||||
* @param configPortFactory factory for creating ConfigurationPort instances
|
||||
* @param runLockPortFactory factory for creating RunLockPort instances
|
||||
* @param validatorFactory factory for creating StartConfigurationValidator instances
|
||||
* @param schemaInitPortFactory factory for creating PersistenceSchemaInitializationPort instances (AP-007)
|
||||
* @param schemaInitPortFactory factory for creating PersistenceSchemaInitializationPort instances
|
||||
* @param useCaseFactory factory for creating BatchRunProcessingUseCase instances
|
||||
* @param commandFactory factory for creating SchedulerBatchCommand instances
|
||||
*/
|
||||
@@ -212,7 +210,7 @@ public class BootstrapRunner {
|
||||
/**
|
||||
* Runs the application startup sequence.
|
||||
* <p>
|
||||
* M4 startup flow (AP-007):
|
||||
* Startup flow:
|
||||
* <ol>
|
||||
* <li>Load configuration via {@link ConfigurationPort}.</li>
|
||||
* <li>Validate the configuration via {@link StartConfigurationValidator}; validation
|
||||
@@ -223,7 +221,7 @@ public class BootstrapRunner {
|
||||
* batch document loop begins. A {@link DocumentPersistenceException} here is a hard
|
||||
* startup failure and causes exit code 1.</li>
|
||||
* <li>Resolve the run-lock file path, apply default if not configured.</li>
|
||||
* <li>Create the batch use case with all M4 adapters wired.</li>
|
||||
* <li>Create the batch use case with all required adapters wired.</li>
|
||||
* <li>Execute the CLI command and map the outcome to an exit code.</li>
|
||||
* </ol>
|
||||
* <p>
|
||||
|
||||
@@ -6,8 +6,8 @@ import org.apache.logging.log4j.Logger;
|
||||
/**
|
||||
* Main entry point for the PDF Umbenenner application.
|
||||
* <p>
|
||||
* AP-003: Delegates to {@link BootstrapRunner} for manual object graph construction
|
||||
* and execution of the minimal no-op startup path.
|
||||
* Delegates to {@link BootstrapRunner} for manual object graph construction
|
||||
* and execution of the startup sequence.
|
||||
*/
|
||||
public class PdfUmbenennerApplication {
|
||||
|
||||
|
||||
@@ -7,28 +7,28 @@
|
||||
* Components:
|
||||
* <ul>
|
||||
* <li>{@link de.gecheckt.pdf.umbenenner.bootstrap.BootstrapRunner}
|
||||
* — Orchestrator of startup sequence and object graph construction (M2-AP-005)</li>
|
||||
* — Orchestrator of startup sequence and object graph construction</li>
|
||||
* <li>{@link de.gecheckt.pdf.umbenenner.bootstrap.PdfUmbenennerApplication}
|
||||
* — Main entry point that invokes BootstrapRunner (M1)</li>
|
||||
* — Main entry point that invokes BootstrapRunner</li>
|
||||
* </ul>
|
||||
* <p>
|
||||
* M2 Implementation:
|
||||
* Implementation approach:
|
||||
* <ul>
|
||||
* <li>Uses factory pattern with pluggable interfaces for all ports and use cases</li>
|
||||
* <li>Manually constructs object graph without framework dependencies</li>
|
||||
* <li>Ensures strict inward dependency direction toward application and domain</li>
|
||||
* <li>Ready for extension by later milestones via factory methods</li>
|
||||
* <li>Provides a minimal, controlled startup path without dependency injection frameworks</li>
|
||||
* </ul>
|
||||
* <p>
|
||||
* AP-003: Provides a minimal, controlled startup path without dependency injection frameworks.
|
||||
* <p>
|
||||
* AP-005: CLI adapter and complete M2 object graph wiring.
|
||||
* <p>
|
||||
* AP-006: Wires FilesystemRunLockPortAdapter (adapter-out) from validated config; retired temporary no-op lock.
|
||||
* <p>
|
||||
* AP-007: Adds SQLite persistence schema initialization at startup via
|
||||
* {@link de.gecheckt.pdf.umbenenner.application.port.out.PersistenceSchemaInitializationPort},
|
||||
* ensuring the database is ready before document processing begins. Schema initialization failure
|
||||
* is treated as a hard bootstrap error and causes exit code 1.
|
||||
* Startup sequence:
|
||||
* <ul>
|
||||
* <li>Load and validate configuration from properties file and environment variables</li>
|
||||
* <li>Wire run lock adapter to prevent concurrent instances</li>
|
||||
* <li>Initialize SQLite persistence schema at startup via
|
||||
* {@link de.gecheckt.pdf.umbenenner.application.port.out.PersistenceSchemaInitializationPort},
|
||||
* ensuring the database is ready before document processing begins.</li>
|
||||
* <li>Schema initialization failure is treated as a hard bootstrap error and causes exit code 1</li>
|
||||
* <li>Invoke the batch processing CLI adapter</li>
|
||||
* </ul>
|
||||
*/
|
||||
package de.gecheckt.pdf.umbenenner.bootstrap;
|
||||
Reference in New Issue
Block a user