[MGNLDMS-279] Make DMSDownloadServlet more extensible Created: 21/Jan/14  Updated: 16/Mar/23  Resolved: 16/Mar/23

Status: Closed
Project: Document Management System (closed)
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Edgar Vonk Assignee: Unassigned
Resolution: Won't Do Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

We need our own DMS Download Servlet because we need to add extra HTTP response headers for our DMS downloads (and we rather not do this in a new filter) and we would like to extend from the default DMSDownloadServlet. However all the methods that matter are private which makes it hard to extend. We end up copying most of the code from DMSDownloadServlet into our own class.

Is it possible to make the private methods protected so that it will be easier to extend the DMSDownloadServlet class?



 Comments   
Comment by Edgar Vonk [ 21/Jan/14 ]

Ideally I would like to be able to override the handleResourceRequest method. Unfortunately this is also a private method. Now I need to copy all the existing code in DMSDownloadServlet just to get to to the Document. Or maybe you guys have another suggestion?

I do also understand that 'opening up' classes like this for extensibility adds extra functionality in the Magnolia API which need to be documented and maintained. However I do feel that the Magnolia code is sometimes harder to reuse and extend than need to be.

Comment by Thomas Duffey [ 12/Oct/17 ]

Please make `handleResourceRequest` method protected.

Comment by Adam Jones [ 16/Mar/23 ]

Closing due to project being archived.

Generated at Mon Feb 12 00:50:07 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.