Make domain pricing customizable

By refactoring TldSpecificLogicProxy (and renaming it to DomainPricingLogic) into
a FlowScope object that is injected into each flow, we can further inject a
DomainPricingCustomLogic into the pricer, which has hooks into each pricing
calls, e. g. getCreatePrice(), getRenewPrice(), etc.

The benefit of these customization hooks is that methods like getCreatePrice()
get called in multiple flows, such as DomainAllocateFlow,
DomainApplicationCreateFlow, and DomainCreateFlow. By customizing the return
value of getCreatePrice() itself, all of its callers gets the amended price.

This CL only includes the basic infrastructure needed, with no actual hooks
placed into each flow.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140616990
This commit is contained in:
jianglai 2016-11-30 10:01:59 -08:00 committed by Ben McIlwain
parent e51e220a98
commit 99c16dc345
4 changed files with 413 additions and 0 deletions

View file

@ -60,4 +60,9 @@ public class CustomLogicFactory {
EppInput eppInput, SessionMetadata sessionMetadata) {
return new DomainDeleteFlowCustomLogic(eppInput, sessionMetadata);
}
public DomainPricingCustomLogic forDomainPricing(
EppInput eppInput, SessionMetadata sessionMetadata) {
return new DomainPricingCustomLogic(eppInput, sessionMetadata);
}
}