Uploaded image for project: 'Document Management System (closed)'
  1. Document Management System (closed)
  2. MGNLDMS-204

ZipUpload: provide hooks for extending

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Won't Do
    • Icon: Minor Minor
    • 1.5.x
    • None
    • N/A
    • Yes

      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
      protected void postProcessFile(Content dmsNode){}
      to class ZipUpload, and make sure it gets called from within processFile for each file handled.

      Alternatively, just make processFile and processEntry protected rather than private.

        Acceptance criteria

              pbaerfuss Philipp Bärfuss
              runger Richard Unger
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: