Jasig/uPortal — pull request #433 by apetro (2014-10-10 12:43:16+00:00)
Title: UP-4259 : Add BranchingRenderingPipeline.

Adds a `BranchingRenderingPipeline`.

Depending upon a `Predicate`, branches to either a true or false `IPortalRenderingPipeline` attached to this valve.

See also JIRA [UP-4259](https://issues.jasig.org/browse/UP-4259) and [what MyUW is doing with rendering pipeline branching](http://apetro.ghost.io/pipelines-need-valves/).

## Small, composable pipeline component

`BranchingRenderingPipeline` is intended as a generic, re-usable, configurable pipeline component potentially useful across many uPortal adopters. UW-Madison is using it to conditionally redirect the rendering pipeline to a new AngularJS front end where appropriate.

## Logs nicely

(shown here conditioning branching on some Predicates that will be offered in another Pull Request.)

```
DEBUG o.j.p.r.p.ProfileFNamePredicate - User admin does have profile with matching fname bucky.
DEBUG o.j.p.r.p.FocusedOnOnePortletPredicate - Determined request with UrlState MAX does focus on one portlet.
TRACE o.j.p.r.BranchingRenderingPipeline - Branching to the false pipe [DynamicRenderingPipeline using url syntax provider [org.jasig.portal.url.UrlSyntaxProviderImpl@132327c7] and wrapping pipeline component [org.jasig.portal.rendering.AnalyticsIncorporationComponent@690883a1].].
...
DEBUG o.j.p.r.p.ProfileFNamePredicate - Request for user guest presents profile fname default which does not match configured profile fname bucky.
TRACE o.j.p.r.BranchingRenderingPipeline - Branching to the false pipe [DynamicRenderingPipeline using url syntax provider [org.jasig.portal.url.UrlSyntaxProviderImpl@1af31d4f] and wrapping pipeline component [org.jasig.portal.rendering.AnalyticsIncorporationComponent@4f093b5b].].
...
DEBUG o.j.p.r.p.ProfileFNamePredicate - User admin does have profile with matching fname bucky.
DEBUG o.j.p.r.p.FocusedOnOnePortletPredicate - Determined request with UrlState NORMAL does not focus on one portlet.
TRACE o.j.p.r.BranchingRenderingPipeline - Branching to the true pipe [RedirectRenderingPipelineTerminator which redirects to /web .].
```