Jetspeed Pipelines

Pipelines are based on the inversion of control pattern. The request processing pipeline is assembled to run in the Spring container. A portal is largely driven by a request/response processing data flow, much like the servlet or HTTP request/response paradigm. Requests are made by client agents such as HTML or WAP browsers, and the portal processes the request on the thread provided by the application server for which Jetspeed is running. Request processing is achieved in a workflow like pipeline, where valves are plugged into the request pipeline. The workflow of the valves is configurable just like any other Spring component. Pipelines reference (via Spring constructor based dependency) one or more valves. Valves are also Spring components.

Requests to the portal always come in via a Portal URL. Jetspeed has URI entry points. The servlet context (/jetspeed) is also easily configurable. Additionally, the request URL can be mapped to a portlet pipeline. The default pipeline aggregates portlet pages. Portlet pages are usually defined with the extension .PSML. If a page is not supplied, default pages can be configured.

Pipeline Driven Processing

Requests to the portal always come in via a Portal URL. Jetspeed has URI entry points. The servlet context (/jetspeed) is also easily configurable. Additionally, the request URL can be mapped to a portlet pipeline. The default pipeline aggregates portlet pages. Portlet pages are usually defined with the extension .PSML. If a page is not supplied, default pages can be configured.



Pipeline Architecture

In Jetspeed-2 requests are processed through a series of Valve assembled together as a pipeline.



Pipeline Mappings

Pipelines mappings allow for prefixed mappings of / context path + servlet path to be mapped to a pipeline. For example:

/jetspeed/portal --> Jetspeed Pipeline
/jetspeed/ajax --> Ajax Pipeline
/jetspeed/portlet --> Portlet Pipeline
/jetspeed/fileserver/file.pdf --> File Servlet Pipeline
/jetspeed/fileserver.file.html --> File Servlet Pipeline
/jetspeed/desktop --> Desktop Pipeline

Pipeline Mapping Configuration

The Pipeline Mapping Configuration can be found in /WEB-INF/assembly/pipelines.xml.

  <bean id='pipeline-map'
        class='java.util.HashMap'>
    <constructor-arg>
        <map>
            <entry key='/portlet'>
                <value>portlet-pipeline</value>
            </entry>            
            <entry key='/portal'>
                <value>jetspeed-pipeline</value>
            </entry>
            <entry key='/ajaxapi'>
                <value>ajax-pipeline</value>
            </entry>
            <entry key='/login'>
                <value>jetspeed-pipeline</value>
            </entry>            
            <entry key='/fileserver'>
                <value>fileserver-pipeline</value>
            </entry>
            <entry key='/ajax'>
                <value>ajax-direct-pipeline</value>
            </entry>
            <entry key='/desktop'>
                <value>desktop-pipeline</value>
					<!-- for jetspeed desktop, the keys /desktop, /action and /render cannot be changed -->
					<!-- without also editing src/webapp/javascript/jetspeed/common.js and these beans: -->
					<!--    the JetspeedDesktop bean expects argument for /desktop (3rd arg in constructor) -->
					<!--    the DesktopPluto bean expects arguments for /desktop, /action and /render -->
					<!--    the DesktopPortalURL bean expects arguments for /render and /action -->
					<!--    the desktopEncoderRedirectValve bean expects arguments for /desktop and /render -->
            </entry>            
            <entry key='/action'>
                <value>desktop-action-pipeline</value>
            </entry>
            <entry key='/render'>
                <value>desktop-render-pipeline</value>
            </entry>
            <entry key='/configure'>
                <value>configure-pipeline</value>
            </entry>            
            <entry key='/dtconfigure'>
                <value>dtconfigure-pipeline</value>
            </entry>                        
            <entry key='/healthcheck'>
                <value>healthcheck-pipeline</value>
            </entry>
        </map>        
    </constructor-arg>        
  </bean>

Pipeline Valves

Valves are units of work along the pipeline workflow. Typically valves represent access to a Jetspeed feature or component, such as aggregation, security, action processing, or device capabilities.



The Jetspeed Pipeline has a request context associated with the entire request pipeline. Using the Request Context API, valves can add or retrieve bits of information to the pipeline request process.

Valve Description
Capabilities Valve Identifies the Capability Map, character encoding, media and Mime types for the browser to the Request Context, sets the content type in the response.
Portal URL Valve Creates the internal Portal URL from the request URL and parameters using the Navigational State component.
Security Valve Builds the Java Security subject for the request, and runs all remaining valves for this request under a privileged action, enabling Java Security checks against the default Jetspeed (JAAS) security policy, or, if configured, another standard JAAS policy.
Localization Valve Sets the Locale (java.util.Locale) into the request context for Java standard internationalization support.
Profiler Valve Uses the Profiler, Site Manager, and Page Manager components to locate the requested page and menu "site" navigations.
Action Valve Determines the targeted action window in the request, if found, executes the action via the portlet container. This is the standard “action phase”, blocking all rendering. At completion of the action phase, the action valve redirects back to the portal to process the render phase.
Decorator Valve Builds the actions available on the page and all portlet windows.
Aggregator Valve Executes the standard “render phase”, where the actual rendering of all portlets and page decorations occurs.
Desktop Valve Renders the skeleton of the Jetspeed Desktop. All desktop portlet rendering is controlled on the client side, with javascript and the portlet pipeline.
Desktop Action Valve Executes Jetspeed Desktop actions over the span of one request. The client-side desktop controls the execution of the action phase, and then the subsequent render phases, achieving parallel processing from the client-side.