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

Integrating OpenCms and Liferay Portal

Feb 12, 2022

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Integrating OpenCms and Liferay Portal

OpenCms Days 2009Integrating OpenCms and Liferay Portal

Dan Liliedahl

Author: OpenCms 7 Development

OSE Consulting

Page 2: Integrating OpenCms and Liferay Portal

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: Integrating OpenCms and Liferay Portal

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: Integrating OpenCms and Liferay Portal

Integration Approaches

Option 1 - Tightly Coupled

Single Web Application

In Context calls

Disadvantages

Maintenance!Container

OpenCms LifeRay

Integration

Page 5: Integrating OpenCms and Liferay Portal

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: Integrating OpenCms and Liferay Portal

ContainerContainer

Solution - Web Services

Liferay OpenCms

Portlet Web ServicesClientSOAP

Loose Coupling

Minimal Impact on Existing OpenCms install

Bonus: re-usable component

Page 7: Integrating OpenCms and Liferay Portal

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: Integrating OpenCms and Liferay Portal

Demo

Page 9: Integrating OpenCms and Liferay Portal

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: Integrating OpenCms and Liferay Portal

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: Integrating OpenCms and Liferay Portal

Portlet Actions / States

View

Error

Edit

Confi

g

Save

ReadAJAX

JSON

Page 12: Integrating OpenCms and Liferay Portal

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: Integrating OpenCms and Liferay Portal

Technical Details

Web Service API

Session Handling

Deployment Details

JAX - RPC

Install AxisServlet into web.xml

Optional AdminServlet, SOAPMonitor, etc

JAX - WS

Page 14: Integrating OpenCms and Liferay Portal

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: Integrating OpenCms and Liferay Portal

Thank you / Questions

Dan Liliedahl

OSE Consulting

http://www.opencmsconsulting.com