mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
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:
parent
e51e220a98
commit
99c16dc345
4 changed files with 413 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue