google-nomulus/javatests/google/registry
nickfelt f742ac8056 Refactor RequestHandler to handle request component construction
This refactors RequestHandler so that it handles the construction of the request
component itself, rather than being handed a pre-built request component
instance constructed by the invoking servlet.

The motivation for this change is so that RequestHandler can be extended in
future CLs to compute authentication results, and can provide those results as
an available binding in the constructed request component.  An alternative
approach could have been to compute the authentication results within
RequestModule itself, but I think it's clearer to keep business logic like
that outside of Dagger providers.

This CL makes the following individual changes:

- Adds request component builders, which implement a RequestComponentBuilder
  interface so they can all be manipulated by RequestHandler

- Instead of obtaining request components via factory methods on the global
  components, one now can have global-scoped bindings just inject the request
  component builders (which requires adding a module to each global component
  declaring the subcomponent).  This follows the recommended approach here:
  http://google.github.io/dagger/subcomponents.html

- Instead of exposing request components on the global component interface,
  we now expose module-specific subclasses of RequestHandler that @Inject the
  appropriate request component builder's provider and pass it to the superclass
  (note that inheritance isn't strictly necessary here but saves boilerplate)

- RequestHandler now takes the Provider<RequestComponentBuilder> and builds
  the component itself using its own fresh RequestModule instance. This provides
  some nice encapsulation but is mainly needed for adding a RequestAuthModule
  in future work.

- RequestHandler also takes UserService now, which can be provided via Dagger
  by the subclass.  Longer-term that will go away in favor of instead providing
  AuthStrategy instances, some of which will use UserService internally.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=138815648
2016-11-15 10:49:05 -05:00
..
backup Preserve test logs and test summary output for Kokoro CI runs 2016-10-14 16:57:43 -04:00
batch Clean up billing MR work 2016-10-14 17:47:46 -04:00
bigquery Preserve test logs and test summary output for Kokoro CI runs 2016-10-14 16:57:43 -04:00
builddefs Preserve test logs and test summary output for Kokoro CI runs 2016-10-14 16:57:43 -04:00
config Preserve test logs and test summary output for Kokoro CI runs 2016-10-14 16:57:43 -04:00
cron Preserve test logs and test summary output for Kokoro CI runs 2016-10-14 16:57:43 -04:00
dns Migrate writeLockTimeout field out of DnsQueue 2016-10-14 17:00:33 -04:00
export Make driveFolderId on Registry entity optional 2016-11-15 10:38:20 -05:00
flows Add TLD-specific logic for application creates 2016-11-15 10:39:51 -05:00
groups Preserve test logs and test summary output for Kokoro CI runs 2016-10-14 16:57:43 -04:00
mapreduce/inputs Preserve test logs and test summary output for Kokoro CI runs 2016-10-14 16:57:43 -04:00
model Remove as-of date from argument list for extra create flow logic 2016-11-15 10:46:04 -05:00
module Preserve test logs and test summary output for Kokoro CI runs 2016-10-14 16:57:43 -04:00
monitoring Preserve test logs and test summary output for Kokoro CI runs 2016-10-14 16:57:43 -04:00
pricing Add additional specific PricingEngineProxy methods 2016-10-24 11:57:00 -04:00
rdap Add MOE equivalences for pushes on 2016-10-19 2016-11-02 15:19:34 -04:00
rde Bump RDE test shard count to 4 to help address timeout issues 2016-11-15 10:47:34 -05:00
request Refactor RequestHandler to handle request component construction 2016-11-15 10:49:05 -05:00
security Convert RegistrarServlet to RegistrarAction 2016-11-02 15:19:34 -04:00
server Revert Guava 20 features until we get the build working properly 2016-11-02 15:19:34 -04:00
storage/drive Preserve test logs and test summary output for Kokoro CI runs 2016-10-14 16:57:43 -04:00
testing Use correct <a> tag syntax in javadoc @see tag 2016-11-02 15:19:34 -04:00
tldconfig/idn Preserve test logs and test summary output for Kokoro CI runs 2016-10-14 16:57:43 -04:00
tmch Preserve test logs and test summary output for Kokoro CI runs 2016-10-14 16:57:43 -04:00
tools Get rid of ReferenceUnions entirely 2016-11-15 10:42:58 -05:00
ui Don't throw an exception on orphaned contacts 2016-11-10 11:27:32 -05:00
util Preserve test logs and test summary output for Kokoro CI runs 2016-10-14 16:57:43 -04:00
whois Preserve test logs and test summary output for Kokoro CI runs 2016-10-14 16:57:43 -04:00
xjc Preserve test logs and test summary output for Kokoro CI runs 2016-10-14 16:57:43 -04:00
xml Preserve test logs and test summary output for Kokoro CI runs 2016-10-14 16:57:43 -04:00