quarkus projektordner umbenannt
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package de.galabau.dateieingang.model;
|
||||
|
||||
/**
|
||||
* Repräsentiert eine einzelne Datei aus einer entpackten ZIP.
|
||||
* Das Feld {@code ociKey} wird erst beim OCI-Upload befüllt.
|
||||
*/
|
||||
public class FileEntry {
|
||||
|
||||
/** Relativer Pfad innerhalb der ZIP, z.B. {@code subdir/datei.csv}. */
|
||||
public final String relativePath;
|
||||
|
||||
/** Dateigröße in Bytes. */
|
||||
public final long fileSize;
|
||||
|
||||
/** {@code true} für die Marker-Datei {@code _READY_FOR_DB_PROCESSING_}. */
|
||||
public final boolean isMarker;
|
||||
|
||||
/**
|
||||
* Vollständiger OCI Object Key, z.B. {@code eingang/export-2026-04-08/subdir/datei.csv}.
|
||||
* Wird von {@code OciUploadService} gesetzt.
|
||||
*/
|
||||
public String ociKey;
|
||||
|
||||
public FileEntry(String relativePath, long fileSize, boolean isMarker) {
|
||||
this.relativePath = relativePath;
|
||||
this.fileSize = fileSize;
|
||||
this.isMarker = isMarker;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package de.galabau.dateieingang.model;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Zustandsobjekt eines einzelnen ZIP-Verarbeitungslaufs.
|
||||
* Wird zu Beginn jeder ZIP-Verarbeitung erstellt und durch die Pipeline-Steps angereichert.
|
||||
*/
|
||||
public class ProcessingContext {
|
||||
|
||||
/** Eindeutige Lauf-ID — wird als MDC-Feld {@code runId} gesetzt. */
|
||||
public final UUID runId;
|
||||
|
||||
/** Originaler ZIP-Dateiname auf dem SFTP-Server, z.B. {@code export_2026-04-08.zip}. */
|
||||
public final String zipFilename;
|
||||
|
||||
/** ZIP-Name ohne Endung, z.B. {@code export_2026-04-08}. Wird als OCI-Unterordner genutzt. */
|
||||
public final String zipNameWithoutExt;
|
||||
|
||||
/** Startzeitpunkt des Laufs. */
|
||||
public final LocalDateTime startTime;
|
||||
|
||||
/** Lokaler Pfad der heruntergeladenen ZIP-Datei. Gesetzt von {@code SftpService}. */
|
||||
public Path localZipPath;
|
||||
|
||||
/** Lokales Verzeichnis mit entpackten Dateien. Gesetzt von {@code ZipExtractionService}. */
|
||||
public Path localExtractDir;
|
||||
|
||||
/** Entpackte Dateien. Gesetzt von {@code ZipExtractionService}. */
|
||||
public List<FileEntry> extractedFiles = new ArrayList<>();
|
||||
|
||||
/** {@code true} wenn der Marker erfolgreich in OCI hochgeladen wurde. */
|
||||
public boolean markerUploaded = false;
|
||||
|
||||
/** Aktueller Verarbeitungsstatus. */
|
||||
public ProcessingStatus status = ProcessingStatus.PENDING;
|
||||
|
||||
public ProcessingContext(UUID runId, String zipFilename) {
|
||||
this.runId = runId;
|
||||
this.zipFilename = zipFilename;
|
||||
this.zipNameWithoutExt = zipFilename.endsWith(".zip")
|
||||
? zipFilename.substring(0, zipFilename.length() - 4)
|
||||
: zipFilename;
|
||||
this.startTime = LocalDateTime.now();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package de.galabau.dateieingang.model;
|
||||
|
||||
/** Status eines ZIP-Verarbeitungslaufs. */
|
||||
public enum ProcessingStatus {
|
||||
PENDING,
|
||||
PARTIALLY_UPLOADED,
|
||||
MARKER_UPLOADED,
|
||||
ORDS_NOTIFIED,
|
||||
FAILED
|
||||
}
|
||||
Reference in New Issue
Block a user