Skip to content
Snippets Groups Projects
Commit b1bc75b8 authored by Jens Steidl's avatar Jens Steidl :baby_chick:
Browse files

- version 1.7 with more logging

parent 00d32d86
No related branches found
No related tags found
No related merge requests found
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
</fr:x_form> </fr:x_form>
</pl:initParameters> </pl:initParameters>
<pl:description>repairs broken file original paths with dublettes, see <a href="https://intranet.slub-dresden.de/display/LZA/Umgang+mit+Updates+auf+alte+Kitodo-AIPs">https://intranet.slub-dresden.de/display/LZA/Umgang+mit+Updates+auf+alte+Kitodo-AIPs</a></pl:description> <pl:description>repairs broken file original paths with dublettes, see <a href="https://intranet.slub-dresden.de/display/LZA/Umgang+mit+Updates+auf+alte+Kitodo-AIPs">https://intranet.slub-dresden.de/display/LZA/Umgang+mit+Updates+auf+alte+Kitodo-AIPs</a></pl:description>
<pl:version>1.6</pl:version> <pl:version>1.7</pl:version>
<pl:materialType>DIGITAL</pl:materialType> <pl:materialType>DIGITAL</pl:materialType>
<pl:module>Repository</pl:module> <pl:module>Repository</pl:module>
<pl:generalType>TASK</pl:generalType> <pl:generalType>TASK</pl:generalType>
......
...@@ -299,6 +299,10 @@ public class DnxMoveFileOriginalPathDublettesClean implements RepositoryTaskPlug ...@@ -299,6 +299,10 @@ public class DnxMoveFileOriginalPathDublettesClean implements RepositoryTaskPlug
} }
// compare the two dates, if current has an update-candidate with newer modification date, throw an exception // compare the two dates, if current has an update-candidate with newer modification date, throw an exception
if (currentModificationDate.before( updatedFileModificationDate )) { if (currentModificationDate.before( updatedFileModificationDate )) {
log.warn("update needed for IE " + ieEditor.getIEPid() + " RepPid " + repPid + " FilePid " + filePid
+ " (old file_original_path='" + currentFileOriginalPath + "' (modification date=" + currentModificationDate
+ ") to new file_original_path='" + updatedFileOriginalPath + "' (modification date=" + updatedFileModificationDate
+ " filepid=" + updatedFilePid + "), but new file_original_path already exists!");
throw new FileOriginalPathCollisionException( throw new FileOriginalPathCollisionException(
"update needed for IE " + ieEditor.getIEPid() + " RepPid " + repPid + " FilePid " + filePid "update needed for IE " + ieEditor.getIEPid() + " RepPid " + repPid + " FilePid " + filePid
+ " (old file_original_path='" + currentFileOriginalPath + "' (modification date=" + currentModificationDate + " (old file_original_path='" + currentFileOriginalPath + "' (modification date=" + currentModificationDate
...@@ -307,8 +311,10 @@ public class DnxMoveFileOriginalPathDublettesClean implements RepositoryTaskPlug ...@@ -307,8 +311,10 @@ public class DnxMoveFileOriginalPathDublettesClean implements RepositoryTaskPlug
); );
} }
// mark to delete old entry // mark to delete old entry
log.info("mark to delete old entry for IEPID " + iePid);
this.IEPids.add(iePid); this.IEPids.add(iePid);
this.RepPids.add(repPid); this.RepPids.add(repPid);
log.info("added IEPID and REPPID for deletion");
DeleteUpdatedFilePid tmp = new DeleteUpdatedFilePid(iePid, repPid, updatedFilePid); // delete outdated filepid DeleteUpdatedFilePid tmp = new DeleteUpdatedFilePid(iePid, repPid, updatedFilePid); // delete outdated filepid
this.filepids_to_delete.add( tmp ); this.filepids_to_delete.add( tmp );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment