- Andrew Kos
- Bill Burlein
- Bryan Williams
- Christian Vozar
- Jeff Brown
- John Kraus
- Joseph Mak
- Mark Daugherty
- Matt Van Bergen
- Melissa Geoffrion
- Michael Kang
- Michael Chan
- Michael Hodgdon
- Mike Motherway
- Molly McDaniel
- Nadia Maciulis
- Pat McLoughlin
- Paul Michelotti
- Puru Hemnani
- Rohit Srinath
- Ryan Lunka
- Tom Kelly
All Blogs
CITYTECH Blogroll:
CITYTECH Reseller Portal – Leveraging GateIn and Seam
Sunday, June 6, 2010
Overview
GateIn Portal, a JBoss Community project, is a merge of the JBoss Portal and eXo Portal projects and forms the primary component of the new JBoss Enterprise Portal Platform 5 released just 10 days ago. The CITYTECH Reseller Portal (CRP), which runs in and leverages GateIn provided features, provides CITYTECH a web-based channel for selling Red Hat software (RHEL and JBoss). The current version (1.0) allows CITYTECH Sales Representatives to quickly create software quotes on-demand, generate PDF quote documents, and send these to customers.
JBoss Portlet Bridge
Thanks to the JBoss Portlet Bridge, all business functionality has been developed using Seam, JSF, Facelets, and RichFaces. Essentially, all business functionality and corresponding user interfaces are provided by a Seam based web application deployed alongside GateIn Portal. Each major area of functionality (quotes, products, customers, distributors, price lists, etc.) is configured as an individual portlet that is deployed to GateIn Portal. This approach has provided the following benefits:
- Leverage Seam, JSF, and RichFaces features and developer knowledge of these widely used frameworks, while at the same time eliminating the need to learn and code to the Portlet API.
- Majority of development and testing of functionality done outside of the portlet container.
- Leverage GateIn out-of-the-box features such as runtime administration of portal, portal page, and portlet level security and customization via the GateIn provided user interface.
Deployment
Currently, all CRP portlets are bundled in the same war. Seam, JSF, Facelets, and RichFaces framework libraries are bundled in the CRP war as well. GateIn and CRP can be deployed independently from one another for upgrades, bug fixes, enhancements, new features, etc.

GateIn and Seam
Once the JBoss Portlet Bridge is configured to support these frameworks, exposing the different functional areas of the seam application as portlets is straightforward. Basically, in the portlet.xml configuration file a portlet definition is added and configured with the seam app facelets page to initially render. This is specified via an initialization parameter, as shown below on line 9.
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
<portlet>
<portlet-name>Quotes</portlet-name>
<portlet-class>javax.portlet.faces.GenericFacesPortlet</portlet-class>
<init-param>
<name>javax.portlet.faces.defaultViewId.view</name>
<value>/QuoteList.xhtml</value>
</init-param>
<init-param>
<name>javax.portlet.faces.preserveActionParams</name>
<value>true</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html,application/pdf</mime-type>
<portlet-mode>VIEW</portlet-mode>
</supports>
<portlet-info>
<title>Quotes</title>
</portlet-info>
</portlet>
</portlet-app>
Security
GateIn security features are leveraged to implement authentication and authorization for the CRP application.
Authentication
CRP users are stored in the GateIn identity service datastore which has been configured to use a database on CITYTECH’s production MySQL database server. The GateIn provided sign-in form is used to authenticate users against this datastore.

A future enhancement to CRP will be to integrate with CITYTECH’s existing corporate Active Directory LDAP so that CITYTECH employees who use the CRP application will not need accounts created and maintained for them additionally in GateIn . This should be again a matter of configuration as GateIn uses PicketLink IDM under the covers for identity management which supports the use of different identity stores such as LDAP.
Use of the JBoss Portlet Bridge automatically provides single sign-on between GateIn and the seam application. A user must authenticate only once via the GateIn sign-in form and their authenticated session is shared between both GateIn and the portlet backing seam application.
Authorization
In GateIn, there are users, groups, and memberships. A membership represents the role a user plays within a group he belongs to. Access and edit permissions at the portal, portal page, and portlet levels are based on which groups, or memberships within those groups, have been granted these permissions (access or edit). The role based security requirements for CRP are mapped to the GateIn model as such:

With this mapping, all authorization requirements of the CRP application are met by configuration via the GateIn portal administration user interface. For example, access to the CITYTECH portal site is restricted to users who belong to the group CITYTECH. Access to the quote portlet which provides functionality to generate and send quotes to customers is restricted to users who have Sales membership in the CITYTECH group. Access to the quote approval portlet is restricted to those who have Executive membership. Within these restrictions, users can create their own customized portal pages and arrangement of portlets which they have authorized access to.
The security manageability of the CRP application is very flexible and is provided entirely by GateIn out-of-box functionality.
Future Enhancements
It is envisioned that CITYTECH will offer customers access to the Reseller Portal for viewing and approving quotes and orders and making purchases. With the CRP customer facing, it will make sense to have different themes for the different product lines being sold. It is likely this will be achieved by creating different portal sites for each product line and giving each it’s own customized portal skin.
Additionally, using static content portlets that allow System Admins, Executives and Sales Reps the ability to write content related to the products, specials, promotions, etc. they are selling via the CRP.
GateIn’s support for running multiple portal sites and it’s customization and personalization features should go a long way in achieving this vision.
Technologies
- Java 6 using Sun JDK
- JBoss Developer Studio 3.0.0
- Seam 2.2.0.EAP5
- Facelets for JSF View
- Richfaces for widgets
- GateIn 3.0.0
- JBoss AS 5.1.0
- JBoss Portlet Bridge 2.0.0
- JasperReports/iReport 3.7.2
Bill Burlein
For the past 12 years Bill has been designing, developing, testing and deploying Java and JEE based systems and applications, currently as a CITYTECH Technical Architect.
Recent Posts
- Invisible requirements within Business requirements
- Building a better Options Predicate
- Javascript, This, and You.
- Extensionless URLs with Adobe Experience Manager
- The Life of a Tester in Adobe CQ World!
- Limitations of the CQ Parsys Model and the Implementation of a Nested Paragraph System
- Google Analytics and AEM: No JavaScript? No Problem.
- Using Apache FOP to generate a PDF document based on a form submission data
- Configuring SAML in AEM 5.6
- Why You Should Get the WCM Experts Involved Early
