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
Refactor SubmissionConfigReader to use a map for the item process configurations based on entityType #9478
Conversation
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.
Thank you @toniprieto for this contribution! With this PR, we don't need to reload (can also be configured to do it so) submission configuration every time we change a collection. It's a much better implementation. It also ensures that if we specify an handle, it will be given priority to that configuration.
I just have one request, if you within this PR, could remove unused collectionService code
- findAllCollectionsByEntityType.
dspace-api/src/main/java/org/dspace/app/util/SubmissionConfigReader.java
Show resolved
Hide resolved
@@ -238,6 +244,16 @@ public SubmissionConfig getSubmissionConfigByCollection(Collection col) { | |||
return getSubmissionConfigByName(submitName); | |||
} | |||
|
|||
// get the name of the submission process based on the entity type of this collections |
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.
👍 this will ensure that if an handle is specified, then it will be firstly returned
@paulo-graca @tdonohue Thank you for the reviews, the feedback has been addressed. Two extra comments:
|
…igured through the entityType value
…se it is not needed to reload forms if a collection entitytype is changed
98b1b8a
to
b0d314f
Compare
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.
Thank you @toniprieto! All changes are looking perfect to me. It's a +1 on my behalf. I will try to test it in our on-premises setup.
Thank you @toniprieto, @tdonohue: I checked that this PR is solving the issue I was figuring out by starting the backend with the server-boot configuration (#9505 (comment), #9476). |
Thanks for the note @vins01-4science ! I'll test this today as well and, assuming it works for me, I'll get it merged immediately. I'm very glad to hear this refactor should help solve issues that we were having in other PRs! |
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.
👍 Thanks @toniprieto ! This looks great. Verified this fixes #9402. I've also verified it fixes #9217 as well (which is likely why this PR helps fix issues with other PRs, as I think #9217 was the root cause in those scenarios).
Merging immediately as this looks great and provides major benefits the the startup process as well as fixes SubmissionConfigReader bugs.
I've also updated the Submission Docs to remove mentions of having to restart Tomcat whenever a new Entity Collection is created (as this fixes that bug): https://wiki.lyrasis.org/display/DSDOC8x/Submission+User+Interface#SubmissionUserInterface-AssigningacustomSubmissionProcesstoaCollection |
References
Failed to contact Solr at http://dspacesolr:8983/solr/search : IOException occurred when talking to server at: http://dspacesolr:8983/solr/search
)Description
This PR implements the changes described in this comment to utilize a map for returning the item process submission form configured for collections with a specific entityType. The implementation follows a similar approach to #9259
Instructions for Reviewers
List of changes in this PR:
SubmissionConfigReader
to use a new map for entityType-configured submission formsTest that the entityType configurations are working properly after creating o editing the entityType of a collection and that the issue #9402 is also resolved.
Checklist
pom.xml
), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.