ZipUpload: provide hooks for extending
--------------------------------------

                 Key: MAGNOLIA-3500
                 URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-3500
             Project: Magnolia
          Issue Type: Improvement
          Components: admininterface
    Affects Versions: 4.4.1, 4.4, 4.3.8
         Environment: N/A
            Reporter: Richard Unger
            Assignee: Philipp Bärfuss



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.




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to