good gatein stuff

Post on 06-Dec-2014

3.829 Views

Category:

Technology

3 Downloads

Preview:

Click to see full reader

DESCRIPTION

Some slides I presented to eXo folks about GateIn stuff to give an overview

TRANSCRIPT

Good GateIn stuff

Disclaimer : this will not be about visual things

Model Object for Portal

• Workspace: the global object– Site: three kind of sites portal, group, user• Navigations: a tree of links

– Link : page link, URL link– Each navigation points to a layout reduced to using the

navigation of the root

• Pages: a tree of pages– The tree structure provides inheritance for page state reduced

to a flat set of named pages– Each page points to a root UI container

Object structure

Workpace

Site Navigation

Page

UI Container

Link

Page Link

URL Link

… Link

<<layout>>

<<shows>>

Content customization

Customization

Clone Specialization

CustomizationContextState

<<inheritance>>

Content

Portal customization context

• Several levels are potentially available– Shared by workspace objects• Workspace: used by application registry• Site: declared in portlet-preferences.xml• Page: usedfor page deep cloning

– Non shared: window

Customization inheritance

• Basic use case supported in 3.0– Application dropped from composer in page– The window customization references a

workspace customization

Additional customization context

Customization

Window context

Identity Context Navigation Context

Julien Tug Nav 1 Nav 2

MOP Framework Only

Content plugability

• Native support for content– Statefull • Portlet: Map<String, String[]>• Gadget: Map<String, Object>• WSRP: byte[]

– Stateless• Current status– Persistence : supported by adding new node type– GateIn level : partially supported

Layouting

• Three nested layouts– Shared layout

• Shared by all sites and not editable/persisted at the moment

– Site layout• Portal: the classic portal layout• Group layout: useful for adding group logo• User layout: shows the dashboard tab• Todo: per navigation node layout to provide different layout

of a navigation subtree

– Page layout• Layouts are pages in an hidden space

Model extension

• Each entity has a set of generic properties– Useful for driving the behavior

• Possiblity to add mixin to mop node types– Need to make mixin available at the object level

(Chromattic and MOP support)– Use case : add mixin to Site to add contain

additional resources

Content extension

• Content type plugin– MOP plugin• manages the content customization• manages import / export of the content• manages versionning of the content

– UI plugin• Show the content visually in the UI composer• Manage content in the application content registry

Chromattic and GateIn

• An object / JCR mapping engine– Not perfect yet– But heavily tested

• Enable development rich models• Efficient lazy loading• Controls the flow of your code (get rid of

hasNode/hasProperty/RepotoryException)

Type safe and simple access to datapublic Integer getFooOfBar(Bar bar /* type safe */){ return bar.getFoo(); // simple and typed}

public Integer getFooOfBar(Node bar) throws RepositoryException /* WTF? */ {

// Is it the right node? Should check its type… Integer size = null; if (node.hasProperty(“foo”)) // Is it here ? return (int)node.getProperty(“foo”).getLong(); return null;}

List support for ordering

List<Foo> foos= bar.getFoos();foos.add(0, foos.get(2));

throw new UnsupportedOperationException(“need to find someone to implement element order change as the nobody understands the API to do it”);

Find references by UUID (or Path)// Find the bar node pointing to fooBar bar = foo.getBar();

// With@OneToMany(type = RelationshipType.REFERENCE)@MappedBy(“foo”);public abstract Foo getFoo();

PropertyIterator i = foo.getReferences();while (i.hasNext()) { Property p = i.nextProperty(); Node referent = p.getParent(); if (isTypeOfNode(reference, “foo”)) { return referent; }}return null;

Chromattic work to do

• Detach / attach entity graph• Embeddable object support• Nodetypes.xml generation• Finalize 1.0 public API

Web Container Integration

• Deployment is based on Web Container Integration framework (aka WCI)– GateIn component that focus on integrating the

web container deployment and runtime– Easily be aware of web application life cycle

• Removes the need of ServletContextListener intrusion in web.xml– One listener to rule them all

GateIn descriptors

• Based on WCI events

– /WEB-INF/gatein-resources.xml• Declares CSS, skins and javascript

– /WEB-INF/gadgets.xml• Was already existing but now with a XSD

Groovy template

• Groovy template engine was rewritten– Increased performances– Provides contextual exceptions with template

name, line of code and even an excerpt of the failing code

Gadget unification

• Dashboard container is now stored in the containing MOP page instead of having a portlet that pointed to another container

• Use native gadget support• Avoid data federation• Simplify data life cycle (i.e page deletion

transitively deletes the dashboard)

Other stuff

• Identity integration via JBoss Picket Link• Open source SSO support (CAS, Josso,

OpenSSO)

top related