guardian/guardian-management — pull request #2 by daithiocrualaoich (2012-03-07 17:42:05+00:00)
Title: Unpick Servlet API from core management library

@philwills, @tackley for the most part, comments welcome from everybody.

This is from the previous (https://github.com/guardian/guardian-management/pull/1) with updates per line comments. Yeah, I snuffed the branch with a thoughtless push, move on.

Note: `IndexPage` will return to `management` in a subsequent pending block of work.

A preliminary step to adding Play management support is to detach the Servlet API interface that is presently used.

This is a real struggle... The management library is relatively Servlet API agnostic and javax.serlvet does come out of the management package leaving the Http.scala interfaces. Unfortunately, the `HttpServletResponse` extraction needs a saw and the mess is unpleasant.

* It's `HttpRequest` for `HttpServletRequest` and `HttpResponse` for `HttpServletResponse`.
* abstract classes are traited because we can.
* naturally a new subproject and a bunch of moves.
* `com.gu.management` in management-servlet gets a package object with plenty of Serlvet API pimps to sharpen the writing in business logic.
* `BodyCachingRequestWrapper` gets some special attention to clean up.