mirror of
https://github.com/google/nomulus
synced 2026-07-19 22:42:23 +00:00
Use string keys for the multimap of pricing engines for TLDs
This is better than the previous way of using the canonical name of the class, because the previous way did not allow for refactoring, and also required the PremiumPricingEngine to live in the model package lest there be circular dependencies, which does not seem ideal. Note that, for reasons of backwards compatibility with existing persisted data, the name of the static premium pricing engine has been set to its canonical class name, but the class can now be refactored going forward so long as this string remains unchanged, and any new pricing engine implementations can use whatever string key they want (it doesn't have to be a canonical class name). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=129215185
This commit is contained in:
@@ -34,6 +34,9 @@ import org.joda.time.DateTime;
|
||||
/** A premium list pricing engine that stores static pricing information in Datastore entities. */
|
||||
public final class StaticPremiumListPricingEngine implements PremiumPricingEngine {
|
||||
|
||||
/** The name of the pricing engine, as used in {@code Registry.pricingEngineClassName}. */
|
||||
public static final String NAME = "google.registry.model.pricing.StaticPremiumListPricingEngine";
|
||||
|
||||
@Inject StaticPremiumListPricingEngine() {}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user