Refactor the web.dispatcher to not require the presence of the Tenant API
-------------------------------------------------------------------------

                 Key: AMDATU-434
                 URL: http://jira.amdatu.org/jira/browse/AMDATU-434
             Project: Amdatu
          Issue Type: Task
          Components: Amdatu Core
            Reporter: Marcel Offermans


Most of the code in amdatu-web is nicely split between tenant aware and tenant 
unaware code, making it fairly easy for you to use tenants if you want, and 
ignore them if you don't.

The only exception right now is the dispatcher, which has two classes: 
FilterHandlerRegistry and ServletHandlerRegistry that both reference tenants.

I would like to refactor this bundle so it does not require you importing the 
Tenant APIs. The two blocks of code that use tenants are quite similar. Both 
basically retrieve the Tenant instance that was put in the HttpServletRequest 
by one of the tenant resolvers we have, to retrieve the tenant ID from it. Both 
also use a constant that is defined in the Tenant API.

My proposal:
# Store the tenant ID in the HttpServletRequest instead of the tenant instance, 
since all we do anyway is ask the Tenant for its ID (and any code that wants to 
use more than that can always retrieve the Tenant again given this ID).
# Ensure that no import of Tenant ends up in the codebase anymore, which should 
be automatic once we end up using only constants (which should only create a 
compile time dependency as those are inlined by the compiler).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
http://jira.amdatu.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
Amdatu-developers mailing list
[email protected]
http://lists.amdatu.org/mailman/listinfo/amdatu-developers

Reply via email to