SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
4.
GateIn and above <ul><li>GateIn 3.0 released in March 2010 </li></ul><ul><li>GateIn 3.1 scheduled for June 2010 </li></ul><ul><li>eXo Social 1.0 </li></ul><ul><li>eXo WCM 2.0 </li></ul><ul><li>eXo KS 2.0 </li></ul><ul><li>eXo Platform 1.0 </li></ul>
5.
Standards, features and technologies Standards & Features GateIn Portal JBoss eXo Identity integration WSRP Model Object for Portal Gadget Server Portlet Container JBoss Identity eXo JCR / WebDAV Chromattic (JCR / Object) JBoss WS WebUI JSR 286 Portlet Java Content Repository Remote Portlets Rich UI Portal / Portlet Opensocial Gadgets Portlet Bridge / Richfaces Rest / JAX-RS
6.
Major features <ul><li>Aggregation via Portlet and Gadget </li></ul><ul><li>Rich User Interface </li></ul><ul><li>Java Content Repository </li></ul><ul><li>Internationalization / RTL </li></ul><ul><li>Management </li></ul><ul><li>Identity integration (Database, LDAP) </li></ul><ul><li>SSO integration (SSO, CAS, OpenSSO) </li></ul>
7.
Content aggregation <ul><li>Based on standards and specifications </li></ul><ul><ul><li>Portlet 2.0/ GateIn Portlet Container </li></ul></ul><ul><ul><li>OpenSocial Gadgets / Shindig </li></ul></ul>
9.
Portal model Users Admins Classic Root John Mary Demo Group Site Portal Site User Site GateIn Executive Board Home Nav SiteMap homepage Pages sitemap
10.
GateIn Tools and Frameworks <ul><li>Chromattic </li></ul><ul><ul><li>An advanced Java Content Repository to Object mapping framework </li></ul></ul><ul><li>CRaSH </li></ul><ul><ul><li>A shell for Java Content Repository </li></ul></ul><ul><li>Open source under the LGPL license </li></ul><ul><li>Hosted on Google Code </li></ul>
15.
Chromattic <ul><li>Provides a type safe object model for JCR </li></ul><ul><li>Use Java 5 annotation </li></ul><ul><li>Enable development of rich models </li></ul><ul><li>Integrates well with Java language with the use of Java Collection and Generics </li></ul><ul><li>Advanced features like support for JCR multiple inheritance </li></ul><ul><li>Integrates at the Java compiler level via the Java Annotation Processor Tools (APT) </li></ul><ul><li>Generation of node type definitions </li></ul>
16.
Chromattic concepts Chromattic Session build() Chromattic Builder Chromattic Chromattic classes Meta Model Objects open() JCR Node type defs Java classes
17.
Entity life cycle <ul><li>ChromatticSession provides support for interacting with objects life cycle </li></ul>Transient Persistent Removed Chromattic Session create() destroy() persist() insert()
18.
Chromattic classes generation based on APT Class loading Compiler File.java File_Chromattic.java File.class File_Chromattic.class Class<File> Class<File_Chromattic> APT <<extends>>
19.
Property mapping <ul><li>Java types are mapped to JCR property types </li></ul><ul><ul><li>String as JCR String </li></ul></ul><ul><ul><li>Integer/int/Long/long as JCR Long </li></ul></ul><ul><ul><li>Boolean/boolean as JCR Boolean </li></ul></ul><ul><ul><li>Float/float/Double/double as JCR Double </li></ul></ul><ul><ul><li>java.util.Date as JCR Calendar </li></ul></ul><ul><ul><li>InputStream as JCR Binary </li></ul></ul><ul><li>Java enum type mapped to JCR String type </li></ul>
20.
Multivalued property mapping <ul><li>JCR types can be multivalued and are mapped either to native array type and java.util.List java type </li></ul>@Property int[] getIntArray(); @Property Integer[] getIntegerArray(); @Property List<Integer> getIntegerList();
21.
Relationship types <ul><li>Four kinds of relationship </li></ul><ul><ul><li>Hierarchic: the default one </li></ul></ul><ul><ul><li>Reference and path provides support for JCR references </li></ul></ul><ul><ul><li>Embedded enable mapping for super type and mixin </li></ul></ul>
22.
Collection mapping <ul><li>Unordered collection </li></ul><ul><ul><li>Collection<File> getChildren() </li></ul></ul><ul><li>Ordered collection based on JCR node order </li></ul><ul><ul><li>List<File> getChildren() </li></ul></ul><ul><li>Associative collection </li></ul><ul><ul><li>Map<String, File> getChildren() </li></ul></ul>
23.
JCR multiple inheritance support <ul><li>@MixinType(name=“votes”) </li></ul><ul><li>public abstract class Votes { </li></ul><ul><li>public abstract int getVoteCount(); </li></ul><ul><li>public abstract void setVoteCount(int count); </li></ul><ul><li>} </li></ul><ul><li>@PrimaryType(name=“nt:file”) </li></ul><ul><li>public abstract class Document { </li></ul><ul><li>@OneToOne(type = RelationshipType.EMBEDDED) </li></ul><ul><li>@Owner </li></ul><ul><li>public abstract Votes getVotes(); </li></ul><ul><li>} </li></ul>
24.
Parameter type and generics inheritance <ul><li>public abstract class Container<T> { </li></ul><ul><li>@OneToMany </li></ul><ul><li>public abstract Collection<T> getChildren(); </li></ul><ul><li>} </li></ul><ul><li>@PrimaryType(name=“nt:folder”) </li></ul><ul><li>public abstract class Directory extends Container<File> { </li></ul><ul><li>} </li></ul><ul><li>@PrimaryType(name=“identities”) </li></ul><ul><li>public abstract class IdentityContainer<I extends IdentityObject> extends Container<I> { </li></ul><ul><li>} </li></ul>
25.
Eventing <ul><li>The session provides eventing for state changes </li></ul><ul><ul><li>Entity life cycle changes </li></ul></ul><ul><ul><li>State changes (properties) </li></ul></ul><ul><li>Enables dependency injection integration </li></ul>public class InjectingListener implements LifeCycleListener { public created(Object o) { if (o instanceof FrameworkObject) { ((FrameworkObject)o).setFramework(framework); } } … }
29.
Command <ul><li>Written as a Groovy script </li></ul><ul><ul><li>Easy to add new commands </li></ul></ul><ul><ul><li>Found in WEB-INF/groovy/commands </li></ul></ul><ul><li>Annotated with Args4j </li></ul><ul><ul><li>Describe switches and arguments </li></ul></ul>
30.
Groovy integration: property access <ul><li>// Iterate over the properties </li></ul><ul><li>Node.eachProperty({ property -> out.print(property.name);}; </li></ul><ul><li>// This code </li></ul><ul><li>def foo = null; </li></ul><ul><li>if (node.hasProperty(‘foo)) { </li></ul><ul><li>foo = node.getProperty(‘foo’).getString(); </li></ul><ul><li>} </li></ul><ul><li>// Can be replaced by </li></ul><ul><li>foo = node.foo; </li></ul><ul><li>// </li></ul><ul><li>foo = node[‘foo’]; </li></ul>
31.
Groovy integration: node child access <ul><li>// Iterates over the children </li></ul><ul><li>def count = 0; </li></ul><ul><li>node.each({ node -> count++; }) </li></ul><ul><li>// This code </li></ul><ul><li>def foo = null; </li></ul><ul><li>If (node.hasNode(‘foo’) { </li></ul><ul><li>foo = node.getNode(‘foo); </li></ul><ul><li>} </li></ul><ul><li>// can be replaced by </li></ul><ul><li>foo = node.foo; </li></ul><ul><li>// Or </li></ul><ul><li>foo = node[‘foo’]; </li></ul>
32.
GateIn Frameworks <ul><li>Chromattic and CRaSH are powerful tools for building applications on top of GateIn </li></ul><ul><li>http://www.gatein.org </li></ul><ul><li>http://chromattic .googlecode.com </li></ul><ul><li>http://crsh.googlecode.com </li></ul>