Portal Design Introduction

The Java Portlet API (JSR-168) defines the Java standard interface for programming portlets. The Java Portlet API specification enables interoperability between Portlets and Portals. It is the standard specification for developing Java portlets. However the Java Portlet API does not define standards for laying out and aggregating portlets and markup on a page. The documentation here under "Portal Design" covers:

Templates

Rendering one or more portlets into a portlet page is largely made up of the process of aggregating portlets as dynamic content with templates. Jetspeed-2 makes use of Velocity templates in creating a page layout. Although the Jetspeed-2 architecture fully supports the use of JSP templates for decorators and layouts, the developers thus far have chosen Velocity as the tool of choice for writing templates. There are two types of templates in Jetspeed: layouts and decorators. The process of rendering a page is the combined aggregation of a layout template, a page decorator template, a PSML definition, and one or more portlet decorator templates.

Layout Templates

Layout templates are packaged in special Jetspeed-specific and deployable portlet applications. Layout templates control the overall aggregation of a portal page. Layout templates are combined with portlets, providing a component model for aggregation. Jetspeed-2 comes out of the box with several layout components including one, two and three column layouts. See the Layout Documentation for all available Layouts in the default Jetspeed-2 system. Of course you can define and derive your own layouts.

Decorators

Decorator templates are packaged in special Jetspeed-specific and deployable archives. Layout templates control the overall aggregation of a portal page. Layout templates are combined with portlets, providing a component model for aggregation. Jetspeed-2 comes out of the box with several layout components including one, two and three column layouts. See the Decorator Documentation for all available Layouts in the default Jetspeed-2 system. Of course you can define and derive your own layouts.

Template Locators

Templates are located by the Jetspeed Template (and Decorator) Locator Component. These components locates templates using a normalized name/value pair URL scheme. using this scheme in what is called a 'normalized' URL to either a decorator or layout. However, templating engines such as Velocity need to work with templates using paths to templates that are relative of a document root. The Jetspeed Power Tool facilitates conversion between normalized and relative paths. Typically in the Spring configuration, the template root of all decorators is defined as:

${applicationRoot}/WEB-INF/decorations
and the root of all layouts (per portlet application) is defined as:
${applicationRoot}/WEB-INF/templates
The Normalized Path is defined with named pair values. Examples:
type/layout/media-type/html/name/tigris/decorator.vm
type/decorator/media-type/html/language/en/country/US/name/metal/decorator.vm
NameValueDescription
typelayout | portlet | genericThe type of template locator. Expected to be either one of the following values layout, portlet (decorator) or generic (decorator). Layouts can be for either page layouts or decorators. Generic type decorators can be used for either portlets or page decorations.
media-typehtml | wml | dhtml | ...The markup media type to be located. Should be a valid media type (html, dhtml, wml...)
nameA valid decorator or layout nameThe name of the decorator or layout. Usually corresponds to a sub-directory holding the decorator or layout templates, images and stylesheets.
languageA valid ISO-639 standard two-character language abbreviationISO-639 (http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt) defines a standard for language abbreviations. Typical abbreviations are en for english, fr for french, de for German, ...
countryA valid ISO-3166 standard two-character country code abbreviationISO-3166 (http://userpage.chemie.fu-berlin.de/diverse/doc/ISO_3166.html) defines a standard for country code abbreviations. Typical abbreviations are US for United States, FR for France, ...

Terminology

Term Definition
Layout Defines the fashion in which grouping of Fragments will organized relative to the final, aggregated content of a request to the portal. Layouts are defined by a portlet which applies an algorithm to a template to generate the aggregated content of a page. Typical algorithms are two column, three column, nested.
TODO: left off here: fragment, decoration, page, page decorator, portlet decorator, application relative, normalized template path, absolute URL