rackerlabs/cloudfeeds-atomhopper — pull request #7 by shintasmith (2014-09-16 19:39:18+00:00)
Title: B-77840: replace the external_href.xsl with a servlet filter

Accidentally merged the original PR. Here it is again, with the modifications suggested by @usnavi

-----
This PR adds filters and functionality that will be the replacement for the current external_href.xsl Repose Translation filter. The current external_href.xsl operates on HTTP Response, and does multiple things:
* inserts back the tenantId (stripped by tenant-feed.xsl) into the URI
* removes the tenanted search (inserted by tenant-feed.xsl) from the 'search' query parameter
* replaces Location and Link header with the correct hostname, only for requests coming from external Repose nodes, which are denoted by the presence of 'x-external-loc' header, which is a new header that external Repose will be configured to add.
* replaces the @href attributes of atom:link nodes (in Repose body) with the correct hostname. It will only do this for atom:link elements with @rel attributes containing the value of "previous", "next", "current", "self", and "last".

The first 2 functionality is added to the existing TenantedFilter because it belongs to the functionality of tenanted requests.

The last 2 functionality is added to a new ExternalHrefFilter.

This PR is to be accompanied with a PR to the puppet changes.

I have ran the system regression tests against my iNova internal & external, running feeds-atomhopper-1.1.0-SNAPSHOT. They are all passing (except for the MigrationAdapterTest).