Skip to content
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

DS-3817: Support the DSpace Cover page functionality in the bitstream endpoint #1939

Merged
merged 2 commits into from
Feb 16, 2018

Conversation

YanaDePauw
Copy link
Contributor

https://jira.duraspace.org/browse/DS-3817

Added the DSpace 6 coverpage implementation to DSpace 7. Also added a JUnit test.
When verifying the functionality, make sure the configuration property citation-page.enable_globally is enabled.

@tomdesair tomdesair added the interface: REST API v7+ REST API for v7 and later (dspace-server-webapp module) label Jan 29, 2018
@tdonohue tdonohue added this to the 7.0 milestone Jan 29, 2018
private Pair<InputStream, Long> getBitstreamInputStreamAndSize(Context context, Bitstream bit) throws SQLException, IOException, AuthorizeException {

if (citationDocumentService.isCitationEnabledForBitstream(bit, context)) {
return generateBitstreamWithCitation(context, bit);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR was discussed in today's DSpace 7 meeting. As discussed there (with @abollini and others), we need to have a way to still download the original bitstream, even when the Cover Page feature is enabled. For example, an Administrative user needs to be able to see the original bitstream from the Admin UI, but they may want to also optionally see how the file will look with the Cover Page applied.

We haven't yet decided on the best way to implement this...if the cover page should be a separate endpoint, or maybe there's some sort of parameter that Administrative users can use to still get the original bitstream? Other thoughts welcome.

Meeting notes at: https://wiki.duraspace.org/display/DSPACE/2018-02-01+DSpace+7+Working+Group+Meeting+notes

Copy link
Contributor

@tomdesair tomdesair Feb 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was ported from DSpace 6: https://github.com/DSpace/DSpace/blob/dspace-6.2/dspace-xmlui/src/main/java/org/dspace/app/xmlui/cocoon/BitstreamReader.java#L369

The CitationDocumentService will not add a cover page for admins: https://github.com/DSpace/DSpace/blob/dspace-6.2/dspace-api/src/main/java/org/dspace/disseminate/CitationDocumentServiceImpl.java#L240

So while I agree with the above use case, I think it is an optional nice to have. This PR complies with the DSpace 6 behaviour. So I think it can be merged.

Copy link
Member

@tdonohue tdonohue Feb 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see...looks like it was a misunderstanding around what the isCitationEnabledForBitstream() method does. It never returns true for Admin users.

So, I agree with @tomdesair that the original response here need to be rethought. We should review this as-is. This PR is in line with DSpace 6 behavior.

Copy link
Member

@abollini abollini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested it looks good

@abollini abollini merged commit 724e4cb into DSpace:master Feb 16, 2018
@benbosman benbosman deleted the DS-3817 branch March 13, 2020 16:06
@tdonohue tdonohue modified the milestones: 7.0, 7.0preview Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interface: REST API v7+ REST API for v7 and later (dspace-server-webapp module)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants