opencms days 2009 - opencms, the open source … / background why integrate? opencms infrastructure...

15
OpenCms Days 2009 Integrating OpenCms and Liferay Portal Dan Liliedahl Author: OpenCms 7 Development OSE Consulting

Upload: dokhanh

Post on 10-Jun-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: OpenCms Days 2009 - OpenCms, the Open Source … / Background Why Integrate? OpenCms infrastructure already in place Existing content Wanted to implement company intranet Chose Liferay

OpenCms Days 2009Integrating OpenCms and Liferay Portal

Dan Liliedahl

Author: OpenCms 7 Development

OSE Consulting

Page 2: OpenCms Days 2009 - OpenCms, the Open Source … / Background Why Integrate? OpenCms infrastructure already in place Existing content Wanted to implement company intranet Chose Liferay

Overview / Background

Why Integrate?

OpenCms infrastructure already in place

Existing content

Wanted to implement company intranet

Chose Liferay Portal Server

How to integrate these two?

Page 3: OpenCms Days 2009 - OpenCms, the Open Source … / Background Why Integrate? OpenCms infrastructure already in place Existing content Wanted to implement company intranet Chose Liferay

Goals

Keep Costs Low = Open Source Platform 100%

Leverage Existing Content / Infrastructure as much as

possible

Avoid content migration

Allow for re-skin / theming of site

Use LifeRay for presentation

Page 4: OpenCms Days 2009 - OpenCms, the Open Source … / Background Why Integrate? OpenCms infrastructure already in place Existing content Wanted to implement company intranet Chose Liferay

Integration Approaches

Option 1 - Tightly Coupled

Single Web Application

In Context calls

Disadvantages

Maintenance!Container

OpenCms LifeRay

Integration

Page 5: OpenCms Days 2009 - OpenCms, the Open Source … / Background Why Integrate? OpenCms infrastructure already in place Existing content Wanted to implement company intranet Chose Liferay

ContainerContainer

OpenCms LifeRay

HTTP

Approach Options...

Option 2 - Loose

Coupling

HTTP Interface or

custom UI in OpenCms

easier to implement

Disadvantages

No access to local

server

Page 6: OpenCms Days 2009 - OpenCms, the Open Source … / Background Why Integrate? OpenCms infrastructure already in place Existing content Wanted to implement company intranet Chose Liferay

ContainerContainer

Solution - Web Services

Liferay OpenCms

Portlet Web ServicesClientSOAP

Loose Coupling

Minimal Impact on Existing OpenCms install

Bonus: re-usable component

Page 7: OpenCms Days 2009 - OpenCms, the Open Source … / Background Why Integrate? OpenCms infrastructure already in place Existing content Wanted to implement company intranet Chose Liferay

Solution Continued...

Locating, retrieval done via Web Services

Plain rendering, elements with DIVs

<DIV class=”param” id=”element”>

Style on Client side using CSS, Liferay themes

URLs fixed up upon delivery

Back end protected via Single Sign On

Page 8: OpenCms Days 2009 - OpenCms, the Open Source … / Background Why Integrate? OpenCms infrastructure already in place Existing content Wanted to implement company intranet Chose Liferay

Demo

Page 9: OpenCms Days 2009 - OpenCms, the Open Source … / Background Why Integrate? OpenCms infrastructure already in place Existing content Wanted to implement company intranet Chose Liferay

Limitations

Currently no Editing on Portlet Side

Web Services API allows it - could be added

without too much work (in progress - stay tuned)

Solution uses xmlpage resource only

Nothing preventing other resource types from being

used, requires render handling

Simple translation of URLs from relative to local

Page 10: OpenCms Days 2009 - OpenCms, the Open Source … / Background Why Integrate? OpenCms infrastructure already in place Existing content Wanted to implement company intranet Chose Liferay

Portlet Design

Liferay supports JSR 268

Liferay Extension Environment

Specific to Liferay - can be made generic without

too much work

Struts / Tiles Portlet

Easier handling of paths

Utilizes AJAX / JSON Actions

Page 11: OpenCms Days 2009 - OpenCms, the Open Source … / Background Why Integrate? OpenCms infrastructure already in place Existing content Wanted to implement company intranet Chose Liferay

Portlet Actions / States

View

Error

Edit

Confi

g

Save

ReadAJAX

JSON

Page 12: OpenCms Days 2009 - OpenCms, the Open Source … / Background Why Integrate? OpenCms infrastructure already in place Existing content Wanted to implement company intranet Chose Liferay

OpenCms Web Services

2 Flavors, Source code is the same

JAX-WS

Newer standard, annotation based generation

JAX-RPC

Older standard, Apache AXIS 1.0

Supported by Liferay

Page 13: OpenCms Days 2009 - OpenCms, the Open Source … / Background Why Integrate? OpenCms infrastructure already in place Existing content Wanted to implement company intranet Chose Liferay

Technical Details

Web Service API

Session Handling

Deployment Details

JAX - RPC

Install AxisServlet into web.xml

Optional AdminServlet, SOAPMonitor, etc

JAX - WS

Page 14: OpenCms Days 2009 - OpenCms, the Open Source … / Background Why Integrate? OpenCms infrastructure already in place Existing content Wanted to implement company intranet Chose Liferay

Technical Details...

JAX-WS

Install filter into web.xml

Install endpoint service into web.xml

Install servlet mappings

Add required JAX-WS libraries

Page 15: OpenCms Days 2009 - OpenCms, the Open Source … / Background Why Integrate? OpenCms infrastructure already in place Existing content Wanted to implement company intranet Chose Liferay

Thank you / Questions

Dan Liliedahl

OSE Consulting

http://www.opencmsconsulting.com