Presentation is loading. Please wait.

Presentation is loading. Please wait.

Rendering Contexts and Components What is a uPortal3 context ? –Defines all aspects of a traditional portal instance Design, navigation, profiles Parameter.

Similar presentations


Presentation on theme: "Rendering Contexts and Components What is a uPortal3 context ? –Defines all aspects of a traditional portal instance Design, navigation, profiles Parameter."— Presentation transcript:

1 Rendering Contexts and Components What is a uPortal3 context ? –Defines all aspects of a traditional portal instance Design, navigation, profiles Parameter syntax Portlet selections, session scopes –Multiple, concurrent contexts can be used Example contexts –static frame showing a single portlet –simple navigation with human-readable URLs –uPortal2 clone

2 Rendering Contexts and Components context Bcontext X … context resolver context A parameter processing rendering pipeline layout source transformer … filter serializer selects a context to be used in processing the incoming request parses request URL syntax initiates actions on: portlets rendering pipeline elements generates initial user layout markup. Aggregated, simple layouts a chain of transformers and filters compiles presentation markup. URL command syntax can be customized by providing alternate processing and URL generation components

3 Context resolvers Servlet Path context resolver –switch contexts by going to a specific servlet path –http://hostname/uPortal/context/.../render.uP –default, ServletPathContextResolver implementation Alternatively contexts can be resolved using –user information authentication state user affiliation (groups), attributes (permissions) –user agent information (browser) –internal states, session (ex.:down for maintenance)

4 Context responsibilities uPortal Framework User InteractionPresentation Channel

5 Context responsibilities uPortal3 Context User InteractionPresentation Portlet IPortletWindowManager / JSR168 container (Pluto)

6 Contexts IContext –service(HttpRequest, HttpResponse) CompoundContext implements IContext –separates parameter processing and rendering –IRequestParameterController processParameters(HttpRequest, HttpResponse) –IPortalRenderer render(HttpRequest, HttpResponse)

7 Rendering: drilling down TreeRenderer implements IPortalRenderer –Responsible for rendering cycle initiation/events –Assumes a rooted structure of components IRenderingComponentManager –Defines the topology of rendering components –Responsible for finding optimal cache entry points PipelineComponentManager –defines linear pipeline rendering structures

8 Rendering: SAX pipelines uPortal2-like pipeline in which components pass SAX events to each other ISaxConsumer and ISaxRenderer Components –abstract Filters and Buffers –Serializers –XSL transformers SAX Cache entry points –know how to replay cache –returned by cache managers implementing IPipelineCacheManager

9 Rendering: String pipelines Pipeline that operates by transforming Strings quick, non-restricted IStringRenderer and IStringFilter Components –RegexStringFilter PortletRenderingInitiationFilter –StringResponseWriter String cache filters, managers, entry points

10 Rendering: Hybrid pipelines Pipelines that can be configured with multiple types of components –org.jasig.portal.rendering.hybrid –component manager implementation connector structure –cache manager implementation multiple cache types prioritized Should be primary choice for configuring context rendering uP2 context example

11 Rendering: XML layout sources Starting point for the SAX pipelines –XmlFileLayoutSource implements IPortalRenderer, ISaxRenderer org.jasig.portal.layout.uportal2 package –LegacyLayoutSource wraps IUserLayoutManager –SimpleUserLayoutManager lightly modified uPortal2 version with simplified DAO Impl

12 Rendering: XSLT TransformationFilter A flexible XSLT SAX rendering component –Configured with ITransformerPreferences –Insert arbitrary element attributes & params Transformer preferences –contain IStylesheetDescription location, mime type, etc. IParamDescription and IElementAttributeDescription –default values, persistance scope, target elements –responsible for keeping track of current values of stylesheet params, attributes –RuntimeTransformerPreferences (in memory) –TransformerPreferencesImpl (persistent) ITransformerHelper – stylesheet handling

13 Contexts IContext –service(HttpRequest, HttpResponse) CompoundContext implements IContext –separates parameter processing and rendering –IRequestParameterController processParameters(HttpRequest, HttpResponse) –IPortalRenderer render(HttpRequest, HttpResponse)

14 CompoundContext parameter processing Before the rendering starts, need to make sense of the request parameters … RequestParameterProcessorListController –based on a prioritized list of parameter processors –each parameter processor talks to some component –ordered list of IRequestParameterProcessors boolean processParameters(req, res) allows multiple rounds of processing for variable evaluation –set of IUrlConstructorProviders Example: uPortal2 transformation legacy syntax

15 Context patterns: parameter-aware component Goal –isolation and targeted injection of components Parameter-aware context component –directly involved in the rendering –assisting other rendering components –assisting other parameter processors Pattern: –Implement URL constructor (i.e. how to write) –Implement ParameterProcessor (i.e. how to parse) –Connect processor, component itself and other pieces using dependency injection –Test URL constructor and processor against eachother

16 Context patterns: parameter-aware component Example 1: Legacy (uP2) Layout param syntax –see PDF Example 2: Persistence manager –job: fire off persistence events –request param command to initiate persistence –no rendering, just param processing –injected into secondary parts of the downstream components (i.e. preferences impl for the XSLT Filter) –Commands interface (optional) –IRequestParameterProcessor impl. –URL constructor impl.

17 The fate of the URL constructors Controller configuration is passed to Pluto’s PortletURLFactoryImpl PortletURL delivered to the portlets –implements IPortletUrl adds ability to obtain uPortal-specific URL constructors getUrlConstructor(name) –IPortletUrlConstructor implements portlet URL syntax also configurable


Download ppt "Rendering Contexts and Components What is a uPortal3 context ? –Defines all aspects of a traditional portal instance Design, navigation, profiles Parameter."

Similar presentations


Ads by Google