Jasig/uPortal — pull request #435 by apetro (2014-10-10 13:15:14+00:00)
Title: UP-4261 : Add FocusedOnOnePortletPredicate

Add `FocusedOnOnePortletPredicate` which answers whether a given `HttpServletRequest` addresses a particular portlet (i.e., maximized, exclusive, detached) or not.

See JIRA [UP-4261](https://issues.jasig.org/browse/UP-4261) and [context on how MyUW is using this Predicate](http://apetro.ghost.io/pipelines-need-valves/) to condition branching the rendering pipeline.

Intended to be useful in plugging in as the `Predicate` to a `BranchingRenderingPipeline`.

## Logging

Logs how it made its decision at `DEBUG`, useful for development and troubleshooting.

```
DEBUG o.j.p.r.p.FocusedOnOnePortletPredicate - Determined request with UrlState MAX does focus on one portlet.
...
DEBUG o.j.p.r.p.FocusedOnOnePortletPredicate - Determined request with UrlState NORMAL does not focus on one portlet.
```

## Example usage

MyUW's customized `renderingPipelineContext.xml` uses this `Predicate` like this:

```

```