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.
3. Agenda
1 About RISE and LFRZ
2 Introduction to Magnolia’s imaging module
3 Imaging extensions
a. Captcha module
b. Imaging-PDF module
c. Image-metadata module
d. Image-metadata-writer module
4 Questions?
Presentation Title 3
5. About RISE and LFRZ – Partnership
RISE
partner for industry
LFRZ
partner for government
Enterprise extensions to Magnolia's imaging module 5
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 Magnolia's imaging module 6
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 Magnolia's imaging module 7
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 Magnolia's imaging module 8
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 Magnolia's imaging module 9
10. About LFRZ - Clients
LFRZ’s principal customer, principal website
www.lebensministerium.at
Enterprise extensions to Magnolia's imaging module 10
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 Magnolia's imaging module 17
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 Magnolia's imaging module 18
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 Magnolia's imaging module 19
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 Magnolia's imaging module 20
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 Magnolia's imaging module 21
22. Captcha module – Usage in model
verify captcha
@Override
public 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 Magnolia's imaging module 22
23. Captcha module – Conclusion
working well in production
exemplifies magnolia‘s „openness“ and
extensibility
not implemented yet
full configuration
audio-captchas
Enterprise extensions to Magnolia's imaging module 23
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 Magnolia's imaging module 25
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 Magnolia's imaging module 26
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 Magnolia's imaging module 27
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 Magnolia's imaging module 28
29. imaging-pdf – conclusion
working well in production
motivation:
“Publications Database”
Previews
Enterprise extensions to Magnolia's imaging module 29
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 Magnolia's imaging module 31
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 Magnolia's imaging module 32
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 Magnolia's imaging module 33
34. image-metadata – integration in magnolia
Mapping configuration for XMP and IPTC
Enterprise extensions to Magnolia's imaging module 34
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 Magnolia's imaging module 35
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 Magnolia's imaging module 36
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 Magnolia's imaging module 37
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 Magnolia's imaging module 39
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 Magnolia's imaging module 40
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 Magnolia's imaging module 41
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 Magnolia's imaging module 42
43. image-metadata-writer – integration
Setup modifies imaging module config (custom Servlet)
Usage configured in theme via variations
Enterprise extensions to Magnolia's imaging module 43
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 Magnolia's imaging module 44