extending jboss epp and site publisher your way

19

Upload: rafaelliu

Post on 21-Jun-2015

386 views

Category:

Technology


0 download

DESCRIPTION

JBoss World 2012 Boston, 27/06/2012

TRANSCRIPT

Page 1: Extending JBoss EPP and Site Publisher your way
Page 2: Extending JBoss EPP and Site Publisher your way

Extending JBoss EPP and

Site Publisher your way

Rafael LiuTechnical Account Manager, Red Hat06.27.12

Page 3: Extending JBoss EPP and Site Publisher your way

Agenda● 5 minutes intro

● JBoss EPP● Customizing EPP

● Kernel● Portal Containers

● Demo● JBoss SP

● Customizing SP● Customization features

● Demo

Page 4: Extending JBoss EPP and Site Publisher your way

A comprehensive portal solution● JBoss Enterprise Portal Platform

● Reusable drag & drop portlets● Authn/authz and user management● Use standards● Pluggable

● JBoss Site Publisher● Content Management System● All through GUI: no code, no file editing, no deploy● Content publishing, versioning, collaboration, etc.

Page 5: Extending JBoss EPP and Site Publisher your way

Customizing EPP

● Services / components● Provide some functionality

● e.g.: JCR access, user management

● Configurable● Reusable● Built on top of a kernel

● Changing or creating Portal Containers

Page 6: Extending JBoss EPP and Site Publisher your way

Kernel

● IoC container (PicoContainer)● Declare services● Plugin configurations● classpath:/conf/configuration.xml

● NOTE: restricted support

Page 7: Extending JBoss EPP and Site Publisher your way

Kernel – Declaring new sevices<component> <key>org.exoplatform.container.definition.PortalContainerConfig</key> <type>o.e.c.d.PortalContainerConfigImpl</type> <init-params> <value-param> <name>default.portal.container</name> <value>portal</value> </value-param> <value-param> <name>default.rest.context</name> <value>rest</value> </value-param> <value-param> <name>default.realm.name</name> <value>gatein-domain</value> </value-param>... </init-params></component>

Page 8: Extending JBoss EPP and Site Publisher your way

Kernel – Plugin configuration<external-component-plugins> <target-component>o.e.c.d.PortalContainerConfig</target-component> <component-plugin> <name>Change PortalContainer Definitions</name> <set-method>registerChangePlugin</set-method> <type>o.e.c.d.PortalContainerDefinitionChangePlugin</type> <init-params> <values-param> <name>apply.specific</name> <value>portal</value> </values-param> ... </init-params> </component-plugin></external-component-plugins>

Page 9: Extending JBoss EPP and Site Publisher your way

Kernel – Using servicespublic class SimpleResourceBundleService extends BaseResourceBundleService{

public SimpleResourceBundleService( InitParams params, CacheService cService, LocaleConfigService localeService) throws Exception { log_ = ExoLogger.getLogger("org.exoplatform.services.resources"); localeService_ = localeService; cache_ = cService.getCacheInstance(ResourceBundleData.class); initParams(params); }...}

Page 10: Extending JBoss EPP and Site Publisher your way

Kernel – Some EPP services● TemplateService

● SkinService

● RepositoryService

● UploadService

● LocaleConfigService

● ResourceBundleService

● GadgetRegistryService

● CatalogService

● UserPortalConfigService

● NavigationService

● ApplicationRegistryService

● PicketLinkIDMCacheService

● PicketLinkIDMService

● ApplicationStatisticService

● AccountService

● GateInService

● ...

Page 11: Extending JBoss EPP and Site Publisher your way

What are Portal Containers?

● Servlet Context● http://localhost:8080/<portalcontainer>/<site>

● Rest context● http://localhost:8080/<restcontainer>

● Realm / Security Domain

Page 12: Extending JBoss EPP and Site Publisher your way

What are Portal Containers really?

● EAR packages● Configuration (extension)● Libraries (services)● Web Content (files)

● Create Portal Containers● Resource overriding

● Extend Portal Containers● Different IoC container, isolated set of services

Page 13: Extending JBoss EPP and Site Publisher your way

Demo EPP

Page 14: Extending JBoss EPP and Site Publisher your way

Customizing SP

● A big extension!● A set o new Portlets & Services ● Reuses EPP's base services● A different Portal Container: /ecmdemo

● Configure services, import portlets and create pages

● All EPP customizations are here

● Customization features● Extension points

Page 15: Extending JBoss EPP and Site Publisher your way

Customization features

● Administration● Nodetypes

● Inheritance, aggregation, mixins, properties

● Templates● Groovy● View & Edit

● Actions● Groovy● org.exoplatform.services.cms.scripts.CmsScript

Page 16: Extending JBoss EPP and Site Publisher your way

Demo SP

Page 17: Extending JBoss EPP and Site Publisher your way

Conclusion

● You can extend EPP & SP through Portal Extensions● ... or create whole new Portal Containers● Access core features using built-in services● Besides, SP lets you:

● Create new types of contents● Create or change how content is presented● Script actions to handle content lifecycle events

● Sources: github.com/rafaelliu

Page 18: Extending JBoss EPP and Site Publisher your way

Stay connected through Red Hat Customer Portal

Site Publisher User Guide

How to install EPP and SitePublisher using a single Postgres database

access.redhat.com

Docs

Tech Brief

Page 19: Extending JBoss EPP and Site Publisher your way