0
Welcome.
Enterprise extensions toMagnolias imaging moduleMagnolia Conference 2012 – Technical TrackPresented by Richard Unger and R...
Agenda1   About RISE and LFRZ2   Introduction to Magnolia’s imaging module3   Imaging extensions    a. Captcha module    b...
About RISE and LFRZ
About RISE and LFRZ – Partnership RISE   partner for industry LFRZ   partner for government                           ...
About RISE   Corporation, www.rise-world.com        TU Spin Off, founded 1987        TU Vienna, INSO – The Think Tank o...
About RISE - Project examples   2003 – 2006: ID Card for all Austrians + country-wide IT infrastructure    8 mio. electro...
About RISE - Clients   AMS Österreich   Oesterreichische Kontrollbank AG   Bank Austria Treasury Merger & Systemupgrade...
About LFRZ “Land-, forst- & wasserwirtschaftliches  Rechenzentrum GmbH” – www.lfrz.at IT service provider located in Vi...
About LFRZ - Clients LFRZ’s principal customer, principal website   www.lebensministerium.at                      Enterp...
Magnolia’s imaging module
Magnolia‘s imaging module generate images on the fly  as needed by website designs cache generated images  generate once...
Magnolia‘s imaging module               Enterprise extensions to Magnolias imaging module 13
Imaging extensions
Imaging extensions – Custom modules captcha  captcha image generation imaging-pdf  extension of imaging module for PDFs...
Captcha module
Captcha module Generate captchas via imaging Uses open-source java captcha library  http://jcaptcha.sourceforge.net/ In...
Captcha module – jcaptcha library pure java captcha image generation flexible configuration – compose different “captcha...
Captcha module – Integration in Magnolia Configuration via  content2bean Multiple captcha-engines  configurable    diff...
Captcha module – Integration in Magnolia Standard Imaging  generator   generator: “captcha” Custom ParameterProvider  ...
Captcha module – Usage in template                              <script>                              function guidGenerat...
Captcha module – Usage in model   verify captcha@Overridepublic String execute() {    // check captcha    if (checkCaptch...
Captcha module – Conclusion working well in production exemplifies magnolia‘s „openness“ and  extensibility not impleme...
imaging-pdf module
imaging-pdf module image variations of PDF documents uses open-source PDF library  http://www.jpedal.org/ integrated in...
imaging-pdf module - jpedal pure java PDF to image conversion works with most PDFs STK “variations”    configured in t...
imaging-pdf – integration in magnolia Custom image-op for loading Extends standard “FromNodeData” image-op Overrides lo...
imaging-pdf – integration in magnolia Output format is configured for generator   “stk” generator config is modified   ...
imaging-pdf – conclusion working well in production motivation:    “Publications Database”    Previews                ...
image-metadata module
image-metadata module – use case photographers take pictures, often >100 at one event pictures need to be published on w...
image-metadata module imports metadata from image files uses apache “sanselan” library – all formats  supported custom ...
image-metadata – integration in magnolia Apache sanselan library    open source    reads image metadata from different ...
image-metadata – integration in magnolia Mapping configuration for XMP and IPTC                    Enterprise extensions ...
image-metadata module – challenges DMS content editing dialog is “single step” Metadata-import requires 2 steps:    loa...
image-metadata module – implementation DMS tree and edit dialog   custom, 2-step “DMS editing Wizard Dialog”   custom t...
image-metadata module – conclusion works well in production   some problems due to tools used by photographers   photog...
image-metadata-writer module
image-metadata-writer module writes metadata to image files on output strips existing metadata writes metadata as IPTC ...
image-metadata-writer - implementation uses “ImageRO” library    closed source, commercial     http://reader.imagero.com...
image-metadata-writer – integration extends core components of imaging module duplicates some code, unfortunately  cus...
image-metadata-writer – integration custom ImagingServlet    initializes and uses the custom Streamers Image-Op „Metada...
image-metadata-writer – integration Setup modifies imaging module config (custom Servlet) Usage configured in theme via ...
image-metadata-writer module – conclusion enabled simplified workflow for editors and photographers problem: images bein...
Thank you!
Questions?
Enterprise Extensions to Magnolia's Imaging
Upcoming SlideShare
Loading in...5
×

Enterprise Extensions to Magnolia's Imaging

836

Published on

In order to meet customer requirements the LFRZ has created several interesting modules that build on magnolia's powerful imaging functionality. Features added include metadata import, metadata export, captcha-image generation and handling of PDFs. We will demonstrate these features in action, explain the motivation enterprise customers have for extending magnolia in this way, and show we implemented these features building on magnolia's imaging functions.

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
836
On Slideshare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Enterprise Extensions to Magnolia's Imaging"

  1. 1. Welcome.
  2. 2. Enterprise extensions toMagnolias imaging moduleMagnolia Conference 2012 – Technical TrackPresented by Richard Unger and Rihard Monovic
  3. 3. Agenda1 About RISE and LFRZ2 Introduction to Magnolia’s imaging module3 Imaging extensions a. Captcha module b. Imaging-PDF module c. Image-metadata module d. Image-metadata-writer module4 Questions? Presentation Title 3
  4. 4. About RISE and LFRZ
  5. 5. About RISE and LFRZ – Partnership RISE  partner for industry LFRZ  partner for government Enterprise extensions to Magnolias imaging module 5
  6. 6. About RISE Corporation, www.rise-world.com  TU Spin Off, founded 1987  TU Vienna, INSO – The Think Tank of RISE, 40 PhDs Competences  More than 300 world-class IT-engineers & architects  Highly acknowledged R&D-enterprise in Europe  Top-Developer (e.g. part of the world-wide Java-Eclipse provider community, component delivery)  Specialists in IT-Infrastructure and IT-Integration  Top-Experts in e.g. IT-Architecture, IT-Strategy, IT-Security, Usability, Transport IT, System-Performance Locations  HQ in Schwechat/Airport and Vienna  offices in several countries  RISE personell works world-wide Enterprise extensions to Magnolias imaging module 6
  7. 7. About RISE - Project examples 2003 – 2006: ID Card for all Austrians + country-wide IT infrastructure 8 mio. electronic ID-Cards, 24.000 specially designed components for offices, delivered in 24 months 2005 – 2008: overall health network in Germany, architecture, planning and project/program management for the at that time largest IT project in Europe (1,8 billion €), design at CeBit 2005, leaded till 2008 2009 – 2012: country-wide ticketing for railway / public transport in Austria, 10 million tickets/year, highly complex interoperability, all access channels (clerk counter, pos-automat, internet, travel agent, mobile phone) 2007 – 2008: design and architecture of the government network plus the school&health network of Qatar, including NOC (network operating center) and SOC (security operating center) 1993 – today: IT infrastructure, software projects, rollouts, IT architec- tures for e.g. MoI, MoH, MoF, MoA, MoS, MoX… in several countries Enterprise extensions to Magnolias imaging module 7
  8. 8. About RISE - Clients AMS Österreich Oesterreichische Kontrollbank AG Bank Austria Treasury Merger & Systemupgrades Österreichische Universitäten – IT-Gesamtstrategie Bundesrechenzentrum – Test- und Multiprojektmanagement Bundesverwaltung – ELAK Einführung IT-Portfolio – Die Presse Dresdner Bank Bundesministerium für Gesundheit Berlin Justizministerium United Arabic Emirates ICT Qatar (gesamtes IKT-Portfolio) Usability- und Web-Strategie der indischen Regierung Qatar Foundation (Infrastruktur-Planung) e-Governement-Strategie Libyen Enterprise extensions to Magnolias imaging module 8
  9. 9. About LFRZ “Land-, forst- & wasserwirtschaftliches Rechenzentrum GmbH” – www.lfrz.at IT service provider located in Vienna owned by Austrian „ministry of agriculture“, which is also the principal customer approx. 30 employees + external consultants focus is on GIS, SSO, custom application development in Java, data integration, IT operations  and CMS Enterprise extensions to Magnolias imaging module 9
  10. 10. About LFRZ - Clients LFRZ’s principal customer, principal website  www.lebensministerium.at Enterprise extensions to Magnolias imaging module 10
  11. 11. Magnolia’s imaging module
  12. 12. Magnolia‘s imaging module generate images on the fly as needed by website designs cache generated images generate once, serve quickly after first request flexible, extensible configurable generators, image-ops, chains STK integration „stk“ generator, variations configured in theme Enterprise extensions to Magnolias imaging module 12
  13. 13. Magnolia‘s imaging module Enterprise extensions to Magnolias imaging module 13
  14. 14. Imaging extensions
  15. 15. Imaging extensions – Custom modules captcha captcha image generation imaging-pdf extension of imaging module for PDFs image-metadata EXIF, IPTC and XMP metadata import image-metadata-writer output of image metadata Enterprise extensions to Magnolias imaging module 15
  16. 16. Captcha module
  17. 17. Captcha module Generate captchas via imaging Uses open-source java captcha library http://jcaptcha.sourceforge.net/ Integrated into magnolia’s imaging Highly configurable Enterprise extensions to Magnolias imaging module 17
  18. 18. Captcha module – jcaptcha library pure java captcha image generation flexible configuration – compose different “captcha engines”  WordGenerator, FontGenerator, BackgroundGenerator, TextPaster, ImageDeformation  various different implementations of each CaptchaService  Stores generated captchas for verification  Control TTL and max stored captchas  Simple methods to generate or verify a captcha-image Enterprise extensions to Magnolias imaging module 18
  19. 19. Captcha module – Integration in Magnolia Configuration via content2bean Multiple captcha-engines configurable  different look & feel  different security requirements Many configuration options exposed Enterprise extensions to Magnolias imaging module 19
  20. 20. Captcha module – Integration in Magnolia Standard Imaging generator  generator: “captcha” Custom ParameterProvider  URLs of form: /.imaging/captcha/<captchaengine>/<id> CaptchaParameterProviderFactory  parses URLs, no caching (NullCachingStrategy) Custom image-op for loading: CaptchaLoader  generates and returns the image Enterprise extensions to Magnolias imaging module 20
  21. 21. Captcha module – Usage in template <script> function guidGenerator() { generate id var S4 = function() { return (((1+Math.random())*0x10000)| 0).toString(16).substring(1);  any string }; return (S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4() +S4()); } var SubUUID = guidGenerator(); </script> include captcha include id <script> document.write(<img src="${contextPath}/.imaging/captcha/default/+SubUUID+.png"/>); document.write(<input type="hidden" name="captchaid" value="+SubUUID+" />); </script> <input name="captcha" value="" /> Why use JavaScript? Enterprise extensions to Magnolias imaging module 21
  22. 22. Captcha module – Usage in model  verify captcha@Overridepublic String execute() { // check captcha if (checkCaptcha()){ // do something… }}protected boolean checkCaptcha() { // get service name from paragraph definition captchaServiceName = (String) getDefinition().getParameters().get("captchaServiceName"); if (StringUtils.isEmpty(captchaServiceName)) return true; // if not set, captcha-check is skipped and we return true if (StringUtils.isEmpty(getCaptcha()) || StringUtils.isEmpty(getCaptchaid())) return false; if (!CaptchaModule.verifyCaptcha(captchaServiceName, getCaptchaid(), getCaptcha())) return false; return true;} Enterprise extensions to Magnolias imaging module 22
  23. 23. Captcha module – Conclusion working well in production exemplifies magnolia‘s „openness“ and extensibility not implemented yet  full configuration  audio-captchas Enterprise extensions to Magnolias imaging module 23
  24. 24. imaging-pdf module
  25. 25. imaging-pdf module image variations of PDF documents uses open-source PDF library http://www.jpedal.org/ integrated in magnolia’s imaging transparent operation Enterprise extensions to Magnolias imaging module 25
  26. 26. imaging-pdf module - jpedal pure java PDF to image conversion works with most PDFs STK “variations”  configured in theme  provide thumbnails  used by “stk” imaging generator variations are cool  but only support image formats readable by java ImageIO Enterprise extensions to Magnolias imaging module 26
  27. 27. imaging-pdf – integration in magnolia Custom image-op for loading Extends standard “FromNodeData” image-op Overrides loadSource() Checks for PDF Defers to superclass if not PDF Custom “OutputFormat” Changes format to “PNG” if source is PDF Enterprise extensions to Magnolias imaging module 27
  28. 28. imaging-pdf – integration in magnolia Output format is configured for generator  “stk” generator config is modified  PDF-enabled variation configured in theme Enterprise extensions to Magnolias imaging module 28
  29. 29. imaging-pdf – conclusion working well in production motivation:  “Publications Database”  Previews Enterprise extensions to Magnolias imaging module 29
  30. 30. image-metadata module
  31. 31. image-metadata module – use case photographers take pictures, often >100 at one event pictures need to be published on website (“Fotoservice”) each picture needs:  title, alt-text (WCAG !)  description, location  attribution: copyright, owner, source manual metadata input for 100s of pictures not practical photographers enter this information in image metadata  using their normal tools (eg. Adobe Photoshop) photographers upload images using ZIP-Upload to DMS Enterprise extensions to Magnolias imaging module 31
  32. 32. image-metadata module imports metadata from image files uses apache “sanselan” library – all formats supported custom “image-upload-wizard” also works for ZIP-Upload metadata: EXIF, IPTC, XMP import metadata to contentNode under image mappings to import metadata into properties of image node Enterprise extensions to Magnolias imaging module 32
  33. 33. image-metadata – integration in magnolia Apache sanselan library  open source  reads image metadata from different formats metadata is imported on upload to DMS  individual upload or ZIP-upload supported metadata is imported to contentNodes: EXIF, XMP and IPTC image-metadata module has configurable mappings  metadata also set in DMS image properties via mapping Enterprise extensions to Magnolias imaging module 33
  34. 34. image-metadata – integration in magnolia Mapping configuration for XMP and IPTC Enterprise extensions to Magnolias imaging module 34
  35. 35. image-metadata module – challenges DMS content editing dialog is “single step” Metadata-import requires 2 steps:  load image and import metadata  then display metadata for editing Metadata formats very “unclean”  different tools create various forms of wrong metadata  in particular, encodings are a huge problem (ÜÖÄß) Enterprise extensions to Magnolias imaging module 35
  36. 36. image-metadata module – implementation DMS tree and edit dialog  custom, 2-step “DMS editing Wizard Dialog”  custom trees and tree-config to enable use of dialog ZIP Upload  custom “ZipUploadPage” Apache sanselan  compiled sanselan from source (for newest version)  modified sanselan to perform “encoding detection” Enterprise extensions to Magnolias imaging module 36
  37. 37. image-metadata module – conclusion works well in production  some problems due to tools used by photographers  photographers get training, documentation makes large photo libraries manageable for editors  editors are not computer experts improves data quality Enterprise extensions to Magnolias imaging module 37
  38. 38. image-metadata-writer module
  39. 39. image-metadata-writer module writes metadata to image files on output strips existing metadata writes metadata as IPTC  uses the same configuration objects as image-metadata “closes loop” with image-metadata module  metadata is imported to and edited in magnolia’s DMS  output images can use edited metadata Enterprise extensions to Magnolias imaging module 39
  40. 40. image-metadata-writer - implementation uses “ImageRO” library  closed source, commercial http://reader.imagero.com/  not recommended  no support for metadata writing (XMP, IPTC) in java ImageIO very limited support in other libraries (eg. sanselan)  not working well – ImageRO was the only working solution writing image metadata seems to be unsolved in java Enterprise extensions to Magnolias imaging module 40
  41. 41. image-metadata-writer – integration extends core components of imaging module duplicates some code, unfortunately  custom ImageStreamer  writes images with metadata if requested  defaults to normal behaviour (via superclass) if not custom CachingImageStreamer  remembers „content-disposition“ in imaging cache  normal .imaging links work for embedded images  for our purpose we needed to download images Enterprise extensions to Magnolias imaging module 41
  42. 42. image-metadata-writer – integration custom ImagingServlet  initializes and uses the custom Streamers Image-Op „MetadataWriteOp“  used to indicate when metadata should be written  sets flag, doesn‘t do anything to image Image-Op „SetContentDispositionOp“  set content-disposition to enable downloads  sets header, doesn‘t do anything to image Enterprise extensions to Magnolias imaging module 42
  43. 43. image-metadata-writer – integration Setup modifies imaging module config (custom Servlet) Usage configured in theme via variations Enterprise extensions to Magnolias imaging module 43
  44. 44. image-metadata-writer module – conclusion enabled simplified workflow for editors and photographers problem: images being rewritten  IPTC is supported only for JPEG, PNG  output always JPEG  changes image format, quality and size future version  set metadata without rewriting pixels  use other image library, when available Enterprise extensions to Magnolias imaging module 44
  45. 45. Thank you!
  46. 46. Questions?
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×