-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export link to this process the first time you export #3680
Conversation
startExport(process.getParent()); | ||
} | ||
} else { | ||
process.setExported(exported); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A save to DB is missing here (and above in ExportDms).
Please adjust ExportMetsIT to test reload from DB.
Exporting the METS file to the home directory shouldn't set the flag at all, should it? |
|
@@ -100,7 +100,6 @@ public void exportMetsTest() throws Exception { | |||
fileService.createDirectory(ConfigCore.getUriParameter(ParameterCore.DIR_USERS), userDirectory); | |||
} | |||
|
|||
Assert.assertFalse("exportedFlag of process should be false", process.isExported()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are just removing Asserts here?
Are they not working? Or should they be negated?
Both Asserts seems to be valid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They don't work anymore because I changed it, and I think it should be like this: The exported flag should only be set when exported to DMS, but not if an export to the home directory is carried out. The flag should not be set when exporting to the home directory, isn’t it? That's why I removed the tests for it, too.
} | ||
ServiceManager.getProcessService().save(process); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to save the process, when the process flagis not changed again? I think this save is only neccessary when export failed and exportflag changed back. It is indeed only neccessary if the flag ACTUALLY changed. This also counts for first save. So if the process is already exported, no save is needed at all
@@ -69,14 +70,19 @@ public ExportDms(boolean exportImages) { | |||
* Process object | |||
*/ | |||
@Override | |||
public void startExport(Process process) throws IOException, DAOException { | |||
public void startExport(Process process) throws DAOException, DataException, IOException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DAOException and IOExceotion are never thrown in this method. So if you are already changing the signatur, remove not needed exceptions.
Code does not compile :-( |
Fixes kitodo#3623, fixes kitodo#3625, fixes kitodo#3633
ca4345d
to
34fc98c
Compare
Fixes #3623, fixes #3625, fixes #3633