[MGNLDMS-204] ZipUpload: provide hooks for extending Created: 10/Jan/11 Updated: 04/Nov/15 Resolved: 04/Nov/15 |
|
| Status: | Closed |
| Project: | Document Management System (closed) |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.5.x |
| Type: | New Feature | Priority: | Minor |
| Reporter: | Richard Unger | Assignee: | Philipp Bärfuss |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | dms | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
N/A |
||
| Attachments: |
|
| Template: |
|
| Patch included: |
Yes
|
| Acceptance criteria: |
Empty
|
| Date of First Response: |
| Description |
|
While creating my image-metadata module, I was looking for a way to "hook" into the Zip-Upload in DMS. Unfortunately, there is currently no way to extend the ZipUpload with custom functionality, other than replacing the whole class. My Use-Case is the following: when a user uploads a ZIP-File with images, I want to automatically perform my metadata import (EXIF & XMP tags) for all contained images. Problem is that the class info.magnolia.module.dms.gui.ZipUpload (DMS module) does not provide a hook which is called per processed file, and declares it's methods processFile and processEntry as private, making it impossible to extend the class. Solution: Add a method like Alternatively, just make processFile and processEntry protected rather than private. |
| Comments |
| Comment by Magnolia International [ 10/Jan/11 ] |
|
I think both suggestions make sense - care to provide a patch ? |
| Comment by Richard Unger [ 11/Jan/11 ] |
|
Patch for ZipUpload (revision 41142) Patches the following file: /magnolia-module-dms/src/main/java/info/magnolia/module/dms/gui/ZipUpload.java |
| Comment by Philipp Bärfuss [ 11/Jan/11 ] |
|
Thanks for the patch. Seems to be safe enough to be applied for 1.5.2 (Magnolia 4.4.2) |
| Comment by Richard Unger [ 13/Jan/11 ] |
|
|
| Comment by Boris Kraft [ 06/Feb/12 ] |
|
Can you check if the patch has been applied? |
| Comment by Michael Mühlebach [ 04/Nov/15 ] |
|
Given the thousands of other issues we have open that are more highly requested, we won't be able to address this issue in the foreseeable future. Instead we will focus on issues with a higher impact, and more votes. |